documentationcode-formattingmanualsframemaker

How to format source-code in a Framemaker document?


I have to write up a technical document in Framemaker that explains various programming source-code.

So my document consists of a bunch of text, followed by a bunch of source code (Java, XML) and then followed by more text, etc.

This question is not about whether I should or should not use Framemaker - that is the software I have to use . . .

What I'm confused about is how to format source code as part of my document. Has anyone done this for a technical document and come across any instructions or tips? So far my Googling hasn't produced anything relevant to what I need to do.


Solution

  • At the very least, create a paragraph style for code samples, use a good monospaced font, and don't forget to turn off hyphenation.

    When I used to do this, I would create a table style and paste the code in there, so I had a nice title header above it, and it stood out a bit. The only gotcha there is that Frame table cells won't break across a page break, so if your code is longer than a page or threatens to go below the bottom of a page, you'll need to create multiple rows in your table and break up the code across the rows.