I am trying to paste my code into MS Word for use within a technical document. I have seen other posts on this and videos and it says about copying to HTML. However my software is not giving me the option to copy to HTML as you can see below. Is there another way of doing this?
Using my old MS Word 2003, if I select "Copy for forum" and then in MS Word, Paste Special -> Unformatted Text, I get a black & white "listing". You can do the same with CTRL-A then CTRL-C in the IDE and then CTRL-V in Word.
There's no colour coded syntax highlighting this way in my case.
Hello con2309
Use Notepad editor with Arduino extension to generate coloured PDF listings.
Have a nice day and enjoy coding in C++.
Word is not very suitable for writing technical documentation.
My advice would be to write the documentation in LaTeX, reStructuredText or Markdown and use something like pandoc to convert this to PDF or Word.
Example:
# Test functions
A function can return a value, e.g.,
```cpp
int f() {
return 42;
}
```
Convert with:
pandoc -o test.docx test.md
Output:
Please find the input and output examples attached: test.zip (9.0 KB)
Ctrl-c ctrl-v and use a non proportional font (courrier).
The feature is only available when using Arduino IDE 1.x.
I've always used notepad.
There's also AsciiDoc which is roughly similar to Markdown or reStructuredText. A lot of basic Markdown code is the same or almost the same in AsciiDoc.
I use visual studio for that !!!!
You can copy and paste from Arduino IDE into a project and it formats the code for you and will print in colour if you want . Works very well . Not tried then copying into word tho .
( apparently I hear you can also use it for generating code)
Visual studio is free .
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.