TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Copy-and-paste from FrameMaker PDF to text editor, preserving leading spaces?
Subject:Copy-and-paste from FrameMaker PDF to text editor, preserving leading spaces? From:"Guy K. Haas" <guy -at- hiskeyboard -dot- com> To:TECHWR-L <techwr-l -at- lists -dot- techwr-l -dot- com> Date:Fri, 06 Oct 2006 22:16:45 -0700
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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
WebWorks ePublisher Pro for Word features support for every major Help
format plus PDF, HTML and more. Flexible, precise, and efficient content
delivery. Try it today! http://www.webworks.com/techwr-l
Easily create HTML or Microsoft Word content and convert to any popular Help file format or printed documentation. Learn more at http://www.DocToHelp.com/TechwrlList