(register)   username:   password:  

Community KB :: DITA / FrameMaker

A collection of tips and troubleshooting information. Feel free to register and add your own items.


FMN DITA .. refers to the DITA support that is provided by default in FM9 and FM8.

DITA-FMx .. is a plugin that provides extended DITA authoring support for FM9, FM8, FM7.2 and FM7.1. More info...

Submitted by: Scott Prentice (2008-07-21)

TAGS:  Authoring, FM8 DITA, DITA-FMx 0.0, DITA-FMx 1.0, FM 7.1, FM 7.2, FM 8.0
SUMMARY:  Paragraph returns aren't preserved when code samples are pasted into a codeblock element
ISSUE:  If you copy and paste code samples into a codeblock element then save and reopen the file, the line breaks are gone.
SOLUTION:  Only "forced returns" ("SHIFT+ENTER") are preserved in codeblock or other "preformatted" elements. When you paste in multiple lines of text, those lines are terminated with a "normal" return (end of paragraph), which are ignored when saving to XML. This may look OK after pasting in the content, but after saving and reopening the file, they will be gone. In order to keep these returns they must be converted into forced returns. You can do a search/replace to clean this up (if you're careful) ..

1) Select the codeblock element
2) Ctrl+F (Find dialog)
3) Enter \p as the text to find
4) Enter \r as the text to replace
5) Select the "Selection" Look In option to replace all instances in the selected element
6) Choose Change All

See also: http://kb.leximation.com/dfm/?kbid=35
BACKGROUND:  Line breaks are preserved in an element when you use one of the following in the read/write rules file:

  element "codeblock"
    preserve line breaks;

or ..

  element "codeblock"
    writer line break is 99999 characters;
    reader line break is forced return;