Insert a 3x3 table, in my case I always make the total width of the table equals the free page's width ( 3 rows minimum to test the tables style).
It will not maintain code colouring although someone could improve my trick. Easier to handle by simple users ( such as myself).No need for external plugins or MS Word micro coding.I have tried all your methods, but they didn't work for me, in fact I have created an easier method using MS Word Tables. Please provide if you have any feedback or improvements or run into any issues with the approach. Final result is shown in the image below and meets all the requirements. Resulting text has spell-check disabled.Select "Do not check spelling or grammar".Under Language, choose "Proofing Language". To achieve requirement 5, follow the steps below:
Note how nicely it breaks across the page - NO extra effort needed to manage this, which you would face if inserting "OpenDocument Text" object or if using "Simple TextBox". Resulting Microsoft word snippet will appear as shown in screenshot below. I have kept the line numbers to show how well this works with Microsoft word. To achieve requirements 2, 3 and 4 above, use table in Microsoft word, to insert the code snippet. Thanks to this blog for providing this information. Now your code is ready to be pasted into Microsoft word.
One could use notepad plus plus as described above. Use external tool to achieve syntax highlighting requirement 1 above.Code snippet shall have spell-check disabled.Code snippet shall break across pages smoothly without any extra effort.Code snippet shall be inline with other text.Add code snippets to a word document, with syntax highlighting for easier visibility and differentiation of code and other text.Hopefully, the answer would be useful to someone. The post is longer than I would have liked, but I believe screenshots are always helpful. I am sharing the approach and my reasoning of why I chose this approach. However, I ended up using an entirely different approach which suited my needs. I recently came across this post and found some useful hints. Is there some better (and ideally portable) way to do this? Is there at least some sort of verbatim style similar to the LaTeX environment? Is there at least some pretty printer that I could copy-and-paste as RTF? My examples are primarily in Java.Īs someone who is used to LaTeX, doing this in Word is extremely painful. Some of the examples will be written from the IDE, and others would be written in place.
I have to write some documents that will include source code examples. If I DO select an existing object (button for example) and paste = Arial 14 pt. If I DO select an existing text box (Arial 12pt) and paste = Arial 12 pt. SL default text box set to Arial 12pt, in slide master the font set to Arial (across all layouts).įrom Word doc I copy Times New Roman 10pt text. However (and per SL knowledge base), if I do NOT select an object first and paste text, the text is supposed to be inserted into new text box AND retain font style and size of source. I also understand that if an object is selected the pasted font will be inserted using the theme font. I've searched the forum, learned about setting the font style in slide master view. In SL2 (current as of today) when I cut/copy and paste text I can't get SL to retain the Font style nor size of the source text?