Copy-and-paste from FrameMaker PDF to text editor, preserving leading spaces?
Guy K. Haas
guy at cliveden.com
Sat Oct 7 08:26:25 PDT 2006
If I create a document in FrameMaker, and it contains some blocks of
sample code...
and the code indents blocks for readability...
and I want the reader to be able to copy from the code material and
paste into a Plain Old Text Editor...
is there any way you know of to do this in a manner that will retain the
indentions?
----
I'm wrestling with conversion of a book that used our old FrameMaker
template, but added some customizations. I'm moving the content over to
a new template set. The code paragraphs (with overrides) in the old
template used tabs to indent. The new template has a different
paragraph style for each level of indention, and defines no tabs in any
of the code paragraph styles.
My template-design sense would be that code paragraph styles should be
used to specify the indention level of the entire block of code,
indenting it to correspond with the body paragraphs it follows:
Code para at the Body para left margin
CodeIndent1 para at the BodyIndent1 para left margin
etc
and then each flavor of code para should have tab stops defined on the
same grid. The code is in a fixed-width font, so as long as the body
para indention system and the character width of the code font can be
made to align (reasonably), I'd be happy.
But when I select text lines of the PDF that contain code and copy them
to the clipboard, then paste them into a text editor, all leading spaces
are omitted.
Ideas?
--Guy K. Haas
Software Exegete in Silicon Valley
More information about the framers
mailing list