Hi all! I’m wanting to print out my code to put into my notebook but I can’t find a way to keep the color formatting while printing. I know I can just copy-paste into a text file, but that ends up looking pretty boring because it’s all black and white. Does anyone know a way to get the code to print out with the color formatting? (besides taking a million screenshots)
Well if you are using vexcode you can switch to light mode then copy and paste everything into a word doc and print that. If you try in dark mode it will put a black highlight on everything and that wastes a ton of ink.
Have you tried using a tool like Notepad++? You can set it to format in C++ but not sure of ot would print in colour. Worth a look.
I have used Notepad++ and it does print in color. All you have to do is open the file (dark or light mode doesn’t matter) and print. Do be careful as if you edit on Notepad++ and save, it directly changes the actual files.
I use https://www.editplus.com/ and I love it. Not free, but cheap, and it prints in color
It understands weird languages that I use like AWK and Lua that makes me productive.
you could make screenshots using snipping tool. It’s on windows, and you do have to buy or download anything. just press the windows key and type in snipping tool
This seems to work great and it’s easier to format for code than a word doc. Thanks!
As a bit of a side note, I’m realizing that pasting all my code into the notebook would take up too many pages. How have any of you handled this in the past? I’ve heard of teams having a separate code binder but that wouldn’t count as a bound notebook.
LaTeX with either the
minted package will probably give you the most professional result, but you have to know how to use the tool. I can share a minimum working example if anyone wishes.
If LaTeX is not an option, I would recommend using Notepad++ with the NppExport plugin to Copy RTF to clipboard and then paste in Microsoft Word or similar. https://stackoverflow.com/a/5106990
I wouldn’t necessarily recommend printing directly from Notepad++.
It would be much easier to answer your question if this Q&A was answered.
What would you recommend instead?
yes it would
I literally gave two alternatives in my post.