I've been using FrameMaker for years (currently using the 2017 subscription version), but this is my first foray into generating HTML output. I am so far out of my depth with this, that I'm not even sure what to ask exactly, but here's my best shot:
I was hired to make some updates to a dictionary of terms for PDF and HTML output. I inherited the files in FM 9 and converted them to FM 2017 with no obvious errors. To generate the HTML output, I just clicked through File > Publish > Basic HTML. When I viewed the output it looked good to me and looked and behaved pretty much like the current version on my client's website.
But I've now been asked to change some things in the HTML output:
For these files, could you please change the following:
<p dir="ltr" class="FM_Dictionary_Term"><a name="HT_aaa"></a>AAA</p>
Change all p tags with the class=”FM_Dictionary_Term” <p dir="ltr" class="FM_Dictionary_Term"> to <h3>
Remove all a tags with the name=”HT_ to just name=”aaa” <a name="HT_aaa"></a> to <a name="aaa"></a> - Remove the “HT_
Remove all p tags with class=”FM_Dictionary_Definition” to just <p>
I recognize "Dictionary Term" and "Dictionary Definition" as FrameMaker paragraph tags used in the document. Is there a way somehow (in the output settings or something?) to make these two paragraph tags map to <h3> and <p>, respectively? Or is there some other way to fix this from within FrameMaker?
For the question about the <a> tags, I think that's about hyperlinks but can't get much further than that. There are hypertext markers within the definitions (Jump to First Page) to terms (Specify Named Destination) in the FM document. Maybe I need to use different markers? [For context, in the examples above "AAA" is the first term defined in the dictionary].
I hope there's someone out there who understands what my questions are, even if I don't.
You should be able to adjust your mappings by going into the Publish panel's Edit Settings - there's a Conversion Settings tab that allows your to map FM paragraph & character tags to styles.
Thanks for your help, Jeff. I did as you suggested, mapping The Dictionary Term para format to h3 and the Dictionary Definition para format to p. It's getting closer but there is still extra stuff in there.
With default mapping I got : <p dir="ltr" class="FM_Dictionary_Term">
By adjusting the mapping I got : <h3 dir="ltr">
Now how do I get rid of the dir attribute? so it looks like this: <h3>
And what about the hyperlink tags? How do I remove the "HT_" from the name attribute values?
so that instead of this: <a name="HT_aaa"> I can get this: <a name="aaa">
For more information (that may or may not be relevant): The files came to me in version 9 of FrameMaker, with instructions for using a FrameScript and Mif2Go to generate the html output. The notes that came with the files also said that the files were in CVS using WinCVS but all I got were FM files.
Thanks again for your help.
Ah, MIF2Go - unfortunately the author of that popular product died a few years ago and the newest versions of FM don't work with it anymore from what I understand. FM's native HTML output left a lot to be desired, so tools like MIF2Go stepped in to help. The FM Publish mechanism actually uses the RoboHelp product's FM to RH conversion engine (under the hood) to create it's new output types. You may end up having to play with the generated output to clean it up as required. (Frankly, not really sure why they would care - it should work fine even with those extra tags in there)
I see. So is it possible that there is "stuff" in the FrameMaker code that was created by the plugin and is now getting in the way? And, if so, is there a way to clean it out without having to do a ton of work to redo all the hyperlinks and such?
No, the tool took the FM files and turned them into MIF (Maker Interchange Format) text files & then would create HTML from them based on a set of settings that you would create and save in an .ini file. There's probably nothing happening in your FM source files concerning MIF2Go now.
You've already discovered that any FM_ values can be remedied by explicit mapping in the Edit settings within the Publish pod...
The remaining dir="ltr" is indicating a left-to-right setting for displaying text. I've not seen that attribute in my HTML output, and thus don't know how to remove it. However, you can always eliminate this by post processing your output with a simple text editor like FAR. Just search for the offending value and replace with (nothing), where (nothing) is a blank Replace field.
Likewise, you may need to post process to remove the HT_ value.
(unless your marker in FrameMaker has HT_aaa as the link name, and you change it manually to aaa)
As Jeff mentioned, those attribute values won't prevent use of the code, but I don't know of a way to go under the hood in Fm init files to change the conventions used in producing these attributes.