1

Need to write some note about some program, such note contains source code copied from the source code of that program which need to prevent line wrap. The note also contains comments (not comments in the source code with need to prevent line wrap too) about the source code which need a text editor that can do line wrap like Office Word.

This is like Office Word plus "pasted without line wrap" which create a paragraph that have very long page width.

The note is mainly a note which can be formated like set font size/colors. It is not a source code with comments!

The platform is Windows 10.

  • 1
    Normally, the way people handle this is to use their code editor and write the note in Markdown or HTML or some other markup language. Alternatively, you can paste just the code into Word, and use formatting to differentiate the code from the prose. Whether you use a code editor or a word processor, you most likely won't be able to have some parts (automatically) wrap and some not. If the code you don't want to wrap is wider than the note you want to write, you can set different paragraph "margins" in Word. – John Y Jan 15 at 14:58
  • @JohnY That's too much pain, automation is needed. Now using super large word document with manual line break, even so many code get wrapped. Why not code editor? Need table of contents and fonts/colors for notes. – jw_ Jan 15 at 15:01
  • If you are using Word, then I would definitely NOT use manual line breaks except within the code sections. I don't think you are going to find exactly what you are looking for. Most people either stick to Word and deal with pasting code in, or they learn a full-fledged documentation system, which is always going to be based on some kind of markup language. Those who put a premium on having control generally prefer the latter. Also, it is easier to write scripts to help you with markup than to write scripts to help you with Word. Good luck! – John Y Jan 15 at 16:36
  • @JohnY I'll try manual paste of code to word. – jw_ Jan 16 at 0:16
  • @JohnY In Word you can't set a paragraph to be wider than the page width...Doesn any office like text editor support this? – jw_ Jan 16 at 6:15
0

I would suggest you jump on the developer side of that problem and edit your prose using Asciidoc format. There are quite correct editors (as an example AsciidocFX). This is quite a simple format (more or less like Markdown), but it will allow you to include code with ease, and apply really good text formatting.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.