6

I would like to display code snippets (created in R) in a .docx file created in Word for Mac 2011 (which I am stuck with). I have tried inserting text boxes but they only display for the length of one page which makes editing difficult. Any suggestions?

P.S. I realize a similar question has been asked before regarding MS Word but none of the solutions seem to work for word for mac 2011.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Elizabeth
  • 6,391
  • 17
  • 62
  • 90
  • 2
    In what way do the previous solutions not work for you ? Why can you not just create a style in Word for code, which has a monospaced font and appropriate tabs, line spacing, etc ? – Paul R Sep 05 '12 at 12:40
  • I suppose I could but that requires redoing the formatting (tabs) and also I wanted to display the code on a light grey background so that it is clear that it is code and looks nice. – Elizabeth Sep 05 '12 at 12:57
  • 1
    You can make the background colour part of the style. The tabs are a pain but you only have to set them up once. Alternatively just use spaces for indentation rather than tabs (just for the code, not for the rest of your document) - since it's monospaced this works well and is in general a better approach both for Word and for text editors, since tab sizes tend to be somewhat arbitrary. – Paul R Sep 05 '12 at 14:05

0 Answers0