0

I am using a code editor called RStudio. It can produce a .docx output of the code that looks fairly nice for publishing. However the .docx document uses the consolas font. In Word, it splits words at the end of a line. So it may do something like this

For consistency, we should choose whe

ther to write W1 first or to write X first.

I can't figure out how to fix this in Word. Does anyone have a suggestion? I tried changing the font but that does not fix the problem. I checked for line-breaks and it does not seem to have them because when I put the insertion bar to the left of the t as suggested and press backspace the e disappears

  • Surely you fix this in Word by removing the line-break which is inserted (position the cursor before the t of ther and press backspace). To fix the root cause it's likely that RStudio needs to change: it may be a simple setting checkbox; it could be a software upgrade. – Andrew Leach Jan 13 at 9:14
  • Thank you. Sorry I was not clear, I have about 3000 of these occurrences and so what I would like to find is some way to either search and replace or some way to use the "copy formatting" feature in Word. – Jen Jan 13 at 11:38
  • 2
    Hi. Weclome to GDSE. This sounds like the lines have line breaks at the end. I don't think it has anything to do with the font as such. Perhaps the fault is with the way the software is outputing the docx? Could you perhaps try reaching out to the developers. It may be a bug. – Billy Kerr Jan 13 at 12:07
  • Thanks for the welcome. I checked for line-breaks and it does not seem to have them because when I put the insertion bar to the left of the t as suggested and press backspace the e disappears. – Jen Jan 13 at 12:48
  • Aha: thanks for trying that. That's important information which should really be added to the question itself. – Andrew Leach Jan 13 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.