Skip to main content
ZeBarron
Inspiring
October 31, 2011
Question

How do I add/import and format source-code?

  • October 31, 2011
  • 1 reply
  • 853 views

Creating a proper workflow on how to add/import and format source-code in FrameMaker seems to be a hassle (to say the least). I have been looking for good examples on how to deal with this; however, the ones I have found so far are at best not even close to being a viable solution.

Here's what I need to do:

  1. Create a FrameMaker document
  2. Include source-code samples
    • Complete (file-referenced), or
    • Partial (file-referenced or copy pasted)
  3. Output PDF
  4. Import the FrameMaker book to RoboHelp
  5. Output WebHelp

Whatever approach I try I always end up getting nothing or each line of code split into separate <pre> paragraphs; however, what I want is (at a minimum) source-code samples in single blocks of code wrapped by single <pre> tags that keep the formatting (e.g. indentation) intact.

In an ideal world I should of course be able to add any source-code with proper syntax highlighting (depending on the programming/scripting language) and have that "live on" once I decide to convert it to WebHelp files using RoboHelp.

Anyone?

Using: FrameMaker 9 and RoboHelp 8

This topic has been closed for replies.

1 reply

Matt-Tech Comm Tools
Community Expert
Community Expert
November 22, 2011
  • What is your FM style?
  • What are you mapping to in RH?
  • Can you provide a sample of both the RH HTML and the HTML you'd like?

-Matt

-Matt Sullivan, FrameMaker Course Creator, Author, Trainer, Consultant
ZeBarron
ZeBarronAuthor
Inspiring
November 22, 2011

Hi Matt,

This is probably not a good answer, but I am only using paragraph styles in FM which are mapped to an equivalent paragraph style in RH. The problem with this is clearly that all lines of code are treated as a single paragraph in order to maintain formatting according to how it would be written in code (e.g. C++, HTML, XML)

My questions should probably be more along the lines ...

  • Does FM support source code injections?
  • Does FM have built-in syntax highlighting?
  • Does RH, if FM have the above features, similar features?

-Jon