Faithful Import of Code Examples


using import-by-reference , text-insets insert code examples fm document seems slam-dunk natural use of these features. however, i've found them difficult , tedious use because of following shortcomings in fm:<br /><br />1. conditional text settings lost when code re-imported (already filed defect).<br /><br />2. code must imported using "treat each line paragraph" option in order avoid wrapping code english language paragraph.<br /><br />3. smart quotes (if on) wrong thing code examples.<br /><br />treating each line paragraph has 2 serious ill effects.<br /><br />first, depending on "code" paragraph style insert whitespace between lines unless paragraph style says not - in case, have stick empty paragraph between last code line , next paragraph - ugly blurring of distinction between content , presentation.<br /><br />second, can specify high setting orphan lines tend keep them on same page - unless each line own paragraph - forcing author manage hand.<br /><br />smart quotes desirable feature in body of document should never applied code sample. (and loss of condition text) forces author not use automatic update. instead author must:<br /><br />1. turn smart quotes off.<br />2. manually update references.<br />3. turn smart quotes on.<br />4. fix broken conditional text references changed.<br />5. , fix unacceptable orphan lines.<br /><br />nasty!<br /><br />what fm needs fix conditional text settings , "faithful import" paragraph style preference <default off> tells fm to:<br /><br />1. not apply smart quotes - or other feature changes code.<br />2. honor line breaks within imported text treat last 1 end-of-paragraph. fix between lines of code , prevent orphan lines.<br /><br />without these fixes, not see how import can used solve must 1 of common problems.

i haven't tried , without smart quotes on/off, importing code snippets reference works fine me when import , specify source file formatting preserved rather overridden destination file... and, of course, when _is_ formatted. example, sq turned off.

that being said, convert code sample single column table w/o lines can better set off surrounding text , (by adding column) use autonumbering number lines.

art


More discussions in FrameMaker Feature Requests


adobe

Comments