Apply border, as you like. However, I am bound to Word for this. Save that table style and enjoy! However, I ended up using an entirely different approach which suited my needs. The post is longer than I would have liked, but I believe screenshots are always helpful. I guess you could put the code in a 1×1 table, which would then make it an object?
I don’t think this supports captioning does it? Sign up using Email and Password. Steps are listed below:. The post is longer than I would have liked, but I believe screenshots are always helpful. Code snippet shall have spell-check disabled. Then, under styles, deselect the “margin” property in “.
However, I ended up using an entirely different approach which suited my needs. What is the most convenient way to format code in a Word document, particularly, in regard to keeping the syntax highlighting, etc.?
Resulting text has spell-check disabled. Personally, I’d want syntax highlighting in every situation where I read code. Click “Show Highlighted” button. That is because, the website is using html and css to achieve the background color see the.
Note that some editors e.
How to format code in a thesis (Word document)? – Academia Stack Exchange
In some situations the code may also benefit with from numbers for example, if you want to refer to a particular line in the code. I think this is going to depend on the purpose.
MatthiasDiener Don’t put the keywords in bold. Jimi Sanchez Jimi Sanchez 11 1. Firstly, I would suggest you to aord consider whether you indeed want to retain syntax highlighting in a source code, embedded into a thesis document. It kind of depends on the IDE.
What is the best way to insert source code examples into a Microsoft Word document? Sorry typo, should have been how to save it to normal.
It will not maintain code thdsis although someone could improve my trick. Is there at least some sort of verbatim style similar to the LaTeX rhesis Apply border, as you like. To achieve requirement 5, follow the steps below: The post is longer than I would have liked, but I believe screenshots are always helpful. If the snippets are to be in-line with text, rather than in say an appendix, then consider whether you want full-on coloured syntax highlighting or whether that would stand out too much compared to the rest of the document.
Now your code is ready to be pasted into Microsoft word. Does this apply to the embedded code as well?