• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Importing Codes into the FM Document...

Contributor ,
Sep 07, 2017 Sep 07, 2017

Copy link to clipboard

Copied

How can I import codes into the Framemaker document?

I need to preserve the spaces in-between the text, such as blank spaces or tabs.

.

I am provide a .txt file which has 70-100 pages of codes. See example on the right.

I have tried to import text but it removes empty spaces and tabs.

Any suggestion will be appreciated.

Thank you.

Views

448

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 07, 2017 Sep 07, 2017

Copy link to clipboard

Copied

I guess you will need to give a few more details. I just tried to import a sample file into an unstructured FrameMaker Document, and it works fine and all spaces are preserved:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 07, 2017 Sep 07, 2017

Copy link to clipboard

Copied

Hi Stefan,

Can you please explain what are the steps you used to import the text?

I used File >Import File (Copy into Document).

Then selected Text option and clicked Convert button.

Then selected Treat Each Line as Paragraph option and ANSI (Windows) as Encoding.

Then clicked on Import button. My result is shown in the image below:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 07, 2017 Sep 07, 2017

Copy link to clipboard

Copied

I used the exact same way. However, in the txt file I created, I had used spaces, not tabs.

But as I can see in your screenshot, the tabs are imported just fine in your side as well.

Try the following which should work for you:

Create a paragraph style and give it a fitting name like "Code". Then define some tabs in the style. Maybe several like every 0.5 cm or so. Play with what will look best. Then apply the new style to all the code paragraphs.

You can adjust the tab stop definitions at any time later.

This should give you the result you want.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 07, 2017 Sep 07, 2017

Copy link to clipboard

Copied

By the way, check if your txt file is actually in ANSI format. If it has non-western characters you might need to select Unicode / UTF-8.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 13, 2017 Sep 13, 2017

Copy link to clipboard

Copied

Hi Stefan,

Sorry for the delay in response (company relocation issues).

Now onto the Importing Codes from Noptepad into the Framemaker.

For some reason, I am still getting the same error as my last Response (2).

To your Response (3)

I have created Paragraph Tag called "Code".

But in my document, I have to go through each line and click tab in order to move the text to the right.

To your Response (4)

How can I make sure (or convert) my Text document is ANSI or UTF-8?

Some info on that would be great.

Thank you for your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Sep 21, 2017 Sep 21, 2017

Copy link to clipboard

Copied

LATEST

Stefan's tips look good to me – of course ;-} as long as you've set up the tabs in your

 style correctly.

As for the encoding of your text file, you could start with the editor: I use Notepad++ on Windows, which displays both encoding (UTF-8) and line-end style (Dos\Windows) in the status bar and lets me change them as required.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines