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

Framemaker keeps deleting text overrides ... and I hate it.

Explorer ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

I am using Framemaker with a .MIF file. This file has a lot of custom formatting. Sometimes text is bold, sometimes it is italic ... here is the issue:

  1. We have software that creates a .MIF file to use in Framemaker, and that MIF file has a bunch of paragraphs tagged with very specific paragraph tag names.
  2. We have a template that has every paragraph tag in these MIF files we export defined.
  3. The problem is when there is a paragraph that has the entire content of the paragraph as a specific character override. If the text of the entire paragraph is bold, but the imported paragraph format does not have that style, then it removes the custom bold style.
  4. If there are multiple styles, then it leaves them in

 

What should I do?

 

I put this into ChatGPT and got this answer:

 

  1. Adjust your template: If the imported MIF files consistently use specific character styles, you could modify your template to include those character styles in the definition of the corresponding paragraph styles. This way, the custom formatting will be preserved when the MIF files are imported. Alternatively, you could modify the paragraph styles in the imported MIF files to match the ones in your template, though this may be more time-consuming if you have many files to work with.
  2. Apply character styles after import: If modifying the template or the imported MIF files is not feasible, you could apply the necessary character styles to the affected paragraphs after importing the MIF files into FrameMaker. You can do this by selecting the affected text and applying the appropriate character style from the Character Designer. This approach can be more time-consuming, but may be necessary if the custom formatting is critical.
  3. Use a script: If you have many MIF files to work with and applying character styles manually is not practical, you could consider using a script to automate the process. A script could search for specific character styles in the imported MIF files and apply the corresponding paragraph styles from your template. This approach requires some programming skills, but could save time in the long run.

 

If the actual answer is to use a script ... I'll be sad.

 

Thanks in advance!

Views

279

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
Community Expert ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

What FM version?
Did this ever work?
My initial suspicion would be that the MIF is not strictly valid.

If you can, create a minimal case that fails, and post the MIF for it here as a text file. Be sure to indicate what it's supposed to look like.

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
Community Expert ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

Are the character overrides done with local formatting or are you using a named character format?

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
Explorer ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

<ParaLine
<String ` '> <Font <FWeight `Bold'> ><String `Acetal'><Font <FWeight `'>><String `'>
> # end of ParaLine
> # end of Para
> # end of CellContent
> # end of Cell
<Cell
<CellContent
<Para
<PgfTag `TableTextRight'>
<Pgf
<PgfAlignment Right>
> # end of Pgf

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
Explorer ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

@frameexpert @Bob_Niland 

It is literally a cell with the bolded text "Acetal" on it.

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
Community Expert ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

One thing I would try: create a simple FrameMaker document with the same formatting; a paragraph with local formatting applied to the entire paragraph. Save it as MIF and then open the MIF back up in FrameMaker and see what happens. If the formatting is stripped, then you know it is an issue with the MIF parser. If the formatting remains, check the syntax of that portion of the MIF file and see if your process is using the same syntax.

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
Community Expert ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

I just tried this and the font formatting is preserved on the round trip. Your MIF code is not quite right; I think this is how you want to do it for a paragraph with local formatting on the entire paragraph:

 <Para 
  <PgfTag `Body'>
  <Pgf 
   <PgfFont 
    <FWeight `Bold'>
   > # end of PgfFont
  > # end of Pgf
  <ParaLine 
   <TextRectID 19>
   <String `This is a body paragraph with bold applied to the entire paragraph.'>
  > # end of ParaLine
 > # end of Para

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
Community Expert ,
Mar 17, 2023 Mar 17, 2023

Copy link to clipboard

Copied

LATEST

Here is how to code it if you want to format some text within a paragraph:

 

 <Para 
  <PgfTag `Body'>
  <ParaLine 
   <TextRectID 19>
   <String `This is a body paragraph with '>
   <Font 
    <FWeight `Bold'>
   > # end of Font
   <String `bold'>
   <Font 
    <FTag `'>
   > # end of Font
   <String ` applied to text in the paragraph.'>
  > # end of ParaLine
 > # end of Para

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