Skip to main content
June 11, 2014
Question

Suppress line breaks (paragraph returns) from copy

  • June 11, 2014
  • 2 replies
  • 1502 views

I'm writing a software guide where I need to include code that the reader can copy and paste in their Linux command terminal. I obtained this code from the engineer who wrote the software. He copy and pasted the sections of code for me into a .txt file. I pasted the unformatted text into FM11 and then applied my code example paragraph tag. Please note that the code sections have lots of dashes "-", blank spaces " ", as well as periods "." and slashes"/".

When I convert the FM11 guide to PDF, then copy and paste from the PDF to a Linux terminal window as our readers will need to do, a paragraph return line break is added to each line.

I've tried all of these, without success. I don't know if I need a combination of what I've tried below, or to change a setting when I convert to the PDF, or what else to try.

1. In FM, Paragraph Designer, unchecked hyphenate.

2. In FM, Used Control+space to place a nonbreaking space symbol between all the words in the sections.

3. In FM Format>Document>Text Options, I deleted everything in the" Allow Line Breaks After" field.

4. In FM, I selected a section and tried ESC+n+s to suppress hyphenation.

5. In FM, I use Find for "\r" and found no forced returns. (I work with View>Text Symbols on anyway.)

6. In Acrobat Pro X, I used Tools>Create Accessible PDFs and checkmarked "Metadata". This DID allow me to copy and paste a code section into a .txt without the line breaks, but line breaks are still present for the engineer when he views it in a .txt file on his PC.

Any advice is appreciated. If someone is willing to look at my .fm file, I can upload it and send a link to it.

    This topic has been closed for replies.

    2 replies

    Arnis Gubins
    Inspiring
    June 12, 2014

    The easiest way to do this is to use Shlomo Perets' Timesavers tool to embed text file snippets into the PDF that can be extracted. See his write-up and sample files here: Improve PDFs: Embed (attach) files in PDF

    Bob_Niland
    Community Expert
    Community Expert
    June 11, 2014

    The notion of "paragraph" in FM seems to exist only during edit.

    Even as MIF, each line is a separate

    <ParaLine <String `sample line of para ends at right margin '>  > # end of ParaLine

    within a

    <Para ... > # end of Para

    tag set.

    By the time it gets to PostScript, it's what appear to be just single or short groups of characters with page coordinates. It's a wonder that Acrobat Reader can even figure out the flow.