Choosing and moving to a new laptop is always a big challenge. My latest move, from a Dell Inspiron to a Dell Latitude E6500, had been going quite well. I had installed all my applications, and managed to locate all the corresponding registration codes and licenses (thank goodness for Gmail). The next step was to get my FrameMaker and Acrobat setup working. I copied some old Type 1 fonts that I use from the old laptop, went into the Fonts applet in the Control panel and imported them, only to receive a bunch of "font corrupted" messages. Assuming the Zip file had somehow gotten messed up, I copied the fonts across again, but the same messages appeared.
Googling for a while, I discovered that the Dell Latitude E6500 has a problem with Type 1 fonts. Various forum messages suggested upgrading the NVidia video drivers, which sounded like a lot of hassle. Then I found the following entry on a Dell forum:
Just wanted to let any one know with the type 1 font installation issue - the issue is with the NVIDIA driver. This is only on systems with XP and does not effect Vista. Windows expects the NVIDIA device driver to be a certain size (maximum). The NVIDIA driver is slightly larger than expected. A simple registry entry resolves the type 1 font issue in XP. To resolve the issue, complete the following:
Open the registry editor (START, RUN and type regedit and click OK)
Navigate to the following key - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\SessionManager\MemoryManagement
Add a new REG_DWORD Value - Change the name of the value to SessionImageSize with a value (decimal) of 20 and then reboot the machine.
You will now be able to install your type 1 fonts and have the latest proper video driver as well
Worked perfectly, and now I have all my Type 1 fonts installed. How weird is that?
Based in France, SingleSourceDocs provides solutions for all aspects of single-source documentation
Monday, 22 December 2008
Tuesday, 25 November 2008
Generating PDF output with DITA-FMx
(FrameMaker 8, DITA-FMx v1.00.26, DITA 1.0)
The following is a procedure that I have tested and almost perfected over the past couple of months to make a FrameMaker User Guide (and hence a PDF file) from a set of DITA topics originally targeted as online help.
1. I want my User Guide to have a classic "book" structure rather than the Task/Reference/Concept structure of the online help, so I create a separate DITAMAP file specifically for the User Guide. Bear in mind that only top-level topic references in the DITAMAP file will map to chapters in the FrameMaker book.
2. Create a DITAVAL file. Create or register this DITAVAL file with DITA-FMx using the DITA-FMx > Ditaval manager menu option. Create two entries in the DITAVAL file; "print" and "online". For the User Guide, you'll need to set the print action to "include" and the online action to "exclude". For example:
<val>
<prop att="audience" val="print" action="exclude" />
<prop att="audience" val="online" action="include" />
</val>
3. Add any User Guide-specific content to your DITA topic files. For example, I want screen captures to appear in the User Guide but not in the online help, so I add <fig> elements wherever appropriate. Set the audience attribute on theelement to "print". Similarly, if you have content specific to the online help that you don't want to appear in the User Guide, set the audience attribute to "online".
4. In the DITA-Fmx options window, set the DITA book application to the appropriate "book generation" application. Your application developer should have set this up for you: basically the Book application is a Structured application registered with FrameMaker that points to all the Template, EDD, and DTD files necessary to generate the book. You can review the available applications with StructureTools > Edit Application Definitions. The value of the ApplicationName element is the name that appears in DITA-Fmx's list of available applications.
5. Choose DITA-FMx > Generate Book from Map. You will probably get a "Validation of XML file failed" message box with a bunch of errors. Ignore these for now.
6. Choose the book name. You will be using a "dummy" book originally, so I generally call it something like "DUMMY.book".
7. When the Book window appears, save it immediately with the "real" name (File > Save book as).
8. Working now with the "real" book, add title page, front matter, and back matter files as necessary. I typically have Titlepage, Preface, TOC, and Index files, for example. Add these in a "nonstructured" way as you would with unstructured FrameMaker.
9. I generally use the Titlepage document to contain all the universal variables that I use in the unstructured files and in the headers and footers of the structured files. For example, I set up ProductName and BookTitle variables. This way, I can easily import the variables into all the unstructured and structured files. More of this later.
At this stage, you'll probably want to do a bout of debugging to set up the "real" book exactly as you want it. For fixes to the structured files, obviously do them in the original DITA topic files and DITAMAP, or they'll get overwritten the next time you re-generate the "dummy" book.
When everything is set up as I want, I proceed as follows whenever I need to re-generate my User Guide:
1. Make the User Guide DITAMAP file the current document.
2. Check that the DITAVAL file is set up with "print=include" and "online="exclude".
3. Choose DITA-FMx > Generate Book From Map. Overwrite the "dummy" book file and confirm overwriting all files.
4. Close the "dummy" book file and open the "real" book file.
5. Open the Title page and import its variables into all other files in the book (File > Import > Formats).
6. Apply the correct Master pages to the generated files in the book (Format > Page Layout > Apply Master Pages).
7. Run DITA-FMx > Apply Ditaval as conditions. This sets all text that is marked as "exclude" in the DITAVAL file as conditional text and hides it.
8. Optionally, turn off Conditional text indicators in each of the generated files (by default, text tagged with the "print" action appears in red).
9. Generate the book (Edit > Update book).
10. When it's what you want, File > Save as PDF and create your PDF file.
I have this second procedure down to about 5 minutes per book now!
The only caveat is that if ever you update your DITAMAP with a new top-level entry that causes a new FrameMaker chapter file to be created, you'll need to remember to manually add the new file to the "real" book.
One other "bug" I have noticed is that if you use the locktitle attribute in your DITAMAP to specify Title text specifically for the User Guide, the navtitle text doesn't get copied to the PDF bookmarks when you generate a PDF file. Hopefully this will get fixed in a future release.
The following is a procedure that I have tested and almost perfected over the past couple of months to make a FrameMaker User Guide (and hence a PDF file) from a set of DITA topics originally targeted as online help.
1. I want my User Guide to have a classic "book" structure rather than the Task/Reference/Concept structure of the online help, so I create a separate DITAMAP file specifically for the User Guide. Bear in mind that only top-level topic references in the DITAMAP file will map to chapters in the FrameMaker book.
2. Create a DITAVAL file. Create or register this DITAVAL file with DITA-FMx using the DITA-FMx > Ditaval manager menu option. Create two entries in the DITAVAL file; "print" and "online". For the User Guide, you'll need to set the print action to "include" and the online action to "exclude". For example:
<val>
<prop att="audience" val="print" action="exclude" />
<prop att="audience" val="online" action="include" />
</val>
3. Add any User Guide-specific content to your DITA topic files. For example, I want screen captures to appear in the User Guide but not in the online help, so I add <fig> elements wherever appropriate. Set the audience attribute on the
4. In the DITA-Fmx options window, set the DITA book application to the appropriate "book generation" application. Your application developer should have set this up for you: basically the Book application is a Structured application registered with FrameMaker that points to all the Template, EDD, and DTD files necessary to generate the book. You can review the available applications with StructureTools > Edit Application Definitions. The value of the ApplicationName element is the name that appears in DITA-Fmx's list of available applications.
5. Choose DITA-FMx > Generate Book from Map. You will probably get a "Validation of XML file failed" message box with a bunch of errors. Ignore these for now.
6. Choose the book name. You will be using a "dummy" book originally, so I generally call it something like "DUMMY.book".
7. When the Book window appears, save it immediately with the "real" name (File > Save book as).
8. Working now with the "real" book, add title page, front matter, and back matter files as necessary. I typically have Titlepage, Preface, TOC, and Index files, for example. Add these in a "nonstructured" way as you would with unstructured FrameMaker.
9. I generally use the Titlepage document to contain all the universal variables that I use in the unstructured files and in the headers and footers of the structured files. For example, I set up ProductName and BookTitle variables. This way, I can easily import the variables into all the unstructured and structured files. More of this later.
At this stage, you'll probably want to do a bout of debugging to set up the "real" book exactly as you want it. For fixes to the structured files, obviously do them in the original DITA topic files and DITAMAP, or they'll get overwritten the next time you re-generate the "dummy" book.
When everything is set up as I want, I proceed as follows whenever I need to re-generate my User Guide:
1. Make the User Guide DITAMAP file the current document.
2. Check that the DITAVAL file is set up with "print=include" and "online="exclude".
3. Choose DITA-FMx > Generate Book From Map. Overwrite the "dummy" book file and confirm overwriting all files.
4. Close the "dummy" book file and open the "real" book file.
5. Open the Title page and import its variables into all other files in the book (File > Import > Formats).
6. Apply the correct Master pages to the generated files in the book (Format > Page Layout > Apply Master Pages).
7. Run DITA-FMx > Apply Ditaval as conditions. This sets all text that is marked as "exclude" in the DITAVAL file as conditional text and hides it.
8. Optionally, turn off Conditional text indicators in each of the generated files (by default, text tagged with the "print" action appears in red).
9. Generate the book (Edit > Update book).
10. When it's what you want, File > Save as PDF and create your PDF file.
I have this second procedure down to about 5 minutes per book now!
The only caveat is that if ever you update your DITAMAP with a new top-level entry that causes a new FrameMaker chapter file to be created, you'll need to remember to manually add the new file to the "real" book.
One other "bug" I have noticed is that if you use the locktitle attribute in your DITAMAP to specify Title text specifically for the User Guide, the navtitle text doesn't get copied to the PDF bookmarks when you generate a PDF file. Hopefully this will get fixed in a future release.
Smart quotes with FrameMaker and DITA-FMx
(FrameMaker 8 with DITA-FMx v1.00.26, DITA 1.0)
If you have Smart Quotes turned on in FrameMaker, beware that double quotes (") typed in FrameMaker are by default translated as `` (“) and ” (”) in generated XHTML. Only by turning off Smart Quotes in FrameMaker can I get standard straight quotes " (") in the XHTML. Of course, I then get straight quotes in my PDF files as well.
The solution is to wrap the text in a <q> (quote) element in DITA.
This has several advantages:
1. The correct opening and closing smart quotes are inserted automatically in FrameMaker.
2. The generated XHTML gets straight quotes.
3. The generated PDF gets smart quotes.
4. When the language attribute is set, the quotes get translated to localized versions, for example
« («) and » (») in French.
If you have Smart Quotes turned on in FrameMaker, beware that double quotes (") typed in FrameMaker are by default translated as `` (“) and ” (”) in generated XHTML. Only by turning off Smart Quotes in FrameMaker can I get standard straight quotes " (") in the XHTML. Of course, I then get straight quotes in my PDF files as well.
The solution is to wrap the text in a <q> (quote) element in DITA.
This has several advantages:
1. The correct opening and closing smart quotes are inserted automatically in FrameMaker.
2. The generated XHTML gets straight quotes.
3. The generated PDF gets smart quotes.
4. When the language attribute is set, the quotes get translated to localized versions, for example
« («) and » (») in French.
Labels:
DITA,
DITA+FMx,
double quotation marks,
FrameMaker,
Smart Quotes
Friday, 13 June 2008
Viewing XML in Oxygen's browser
I had a problem viewing XML files in the browser configured within Oxygen 9: IE7 wouldn't launch at all.
I fixed is by running:
regsvr32 msxml3.dll
I was then able to open the XML files with IE.
I fixed is by running:
regsvr32 msxml3.dll
I was then able to open the XML files with IE.
Monday, 10 March 2008
Translating HTML Files with DITA
We've just completed our first translation test with LionBridge.
Overall, very successful, but just a few things to remember:
- The xml-lang attribute must be set in EVERY topic file. It's not enough to set it on the map and expect it to filter down. So for the French files we have for example:
http://dita.oasis-open.org/architecture/2005/">
This causes the DITA-OT to use translated versions of "Related concepts", "Related reference" etc. for link titles.
- Open the HHC, HHK and HHP files in a good text editor (I used Ultraedit) and save them as ASCII/ANSI. This is necessary because the HTMLHelp compiler does not support Unicode. In particular, before converting my HHK file, accented characters in the Index appeared incorrectly.
- I don't know what effect it had specifically, but I set the Language option in the HHP file to French :
Language=0x40c French (France)
You can set this with the Help Workshop:
1. Double-click the Language setting in the [OPTIONS] list.
2. In International Settings, choose the language.
3. Recompile.
Overall, very successful, but just a few things to remember:
- The xml-lang attribute must be set in EVERY topic file. It's not enough to set it on the map and expect it to filter down. So for the French files we have for example:
This causes the DITA-OT to use translated versions of "Related concepts", "Related reference" etc. for link titles.
- Open the HHC, HHK and HHP files in a good text editor (I used Ultraedit) and save them as ASCII/ANSI. This is necessary because the HTMLHelp compiler does not support Unicode. In particular, before converting my HHK file, accented characters in the Index appeared incorrectly.
- I don't know what effect it had specifically, but I set the Language option in the HHP file to French :
Language=0x40c French (France)
You can set this with the Help Workshop:
1. Double-click the Language setting in the [OPTIONS] list.
2. In International Settings, choose the language.
3. Recompile.
Subscribe to:
Posts (Atom)