Tailoring HTML Help (.CHM) file
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 3
- Joined: Fri Jan 23, 2009 1:04 am
Tailoring HTML Help (.CHM) file
I am trying to create custom HTML Help output from DITA. I can create the .CHM file, but I cannot tailor it with a .css file. I have tried a number of .css files, but no luck.
My questions are:-
- What Help compiler should I be using? I am currently using HTML Help Workshop 4.74
- Is there a specific .css file out there I should be using?
- Is this an known issue in 10.2?
Thanks
My questions are:-
- What Help compiler should I be using? I am currently using HTML Help Workshop 4.74
- Is there a specific .css file out there I should be using?
- Is this an known issue in 10.2?
Thanks
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Tailoring HTML Help (.CHM) file
Hi John,
The opened CHM output is split in two parts (the index in the left part and the content in the right part).
I assume you want to style the content.
By default the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\resource\commonltr.css is copied to the output folder and used to style all the HTML content.
You can create your own CSS starting from the commonltr.css content or including it.
Then in the transformation scenario you have to set the following parameters:
args.copycss to yes
args.css to your_custom_css_file_name.css
args.cssroot to path\to\directory\containing\css\file
Attention: your custom CSS should have a name different than commonltr.css. This is important because the custom CSS file is copied in the output directory after the default CSS file was copied. If they have the same name the ANT copy task copy-css-user from OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\build_preprocess.xml will fail (as it does not have an overwrite="yes" set to it).
So it is best that your custom CSS file has a name different than commonltr.css, imports it relatively and then sets some styles of its own.
If you want to style the index part of the CHM, this does not seem to be supported by default but I can take a look and propose a solution.
Hope this helps.
Regards,
Radu
The opened CHM output is split in two parts (the index in the left part and the content in the right part).
I assume you want to style the content.
By default the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\resource\commonltr.css is copied to the output folder and used to style all the HTML content.
You can create your own CSS starting from the commonltr.css content or including it.
Then in the transformation scenario you have to set the following parameters:
args.copycss to yes
args.css to your_custom_css_file_name.css
args.cssroot to path\to\directory\containing\css\file
Attention: your custom CSS should have a name different than commonltr.css. This is important because the custom CSS file is copied in the output directory after the default CSS file was copied. If they have the same name the ANT copy task copy-css-user from OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\build_preprocess.xml will fail (as it does not have an overwrite="yes" set to it).
So it is best that your custom CSS file has a name different than commonltr.css, imports it relatively and then sets some styles of its own.
If you want to style the index part of the CHM, this does not seem to be supported by default but I can take a look and propose a solution.
Hope this helps.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 13
- Joined: Mon Mar 24, 2014 11:22 pm
Re: Tailoring HTML Help (.CHM) file
Thanks for this topic. I have a couple questions, since I think there have been changes to the Open Toolkit since this article was posted.
For example, commonltr.css is no longer stored at OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\resource. It has been moved to a plug-in folder (DITA Open Toolkit Release 1.8 feature #1447), but I don't know which one.
Also, I was able to apply my own CSS when I set the following two parameters:
args.copycss to yes
args.css to your_custom_css_file_name.css
When I set this parameter, my styles do not come across in the output.
args.cssroot to path\to\directory\containing\css\file
Questions: Which plug-in directory stores the commonltr.css for CHM outputs? Is args.cssroot no longer required?
Thanks,
Kate
For example, commonltr.css is no longer stored at OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\resource. It has been moved to a plug-in folder (DITA Open Toolkit Release 1.8 feature #1447), but I don't know which one.
Also, I was able to apply my own CSS when I set the following two parameters:
args.copycss to yes
args.css to your_custom_css_file_name.css
When I set this parameter, my styles do not come across in the output.
args.cssroot to path\to\directory\containing\css\file
Questions: Which plug-in directory stores the commonltr.css for CHM outputs? Is args.cssroot no longer required?
Thanks,
Kate
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Tailoring HTML Help (.CHM) file
Post by sorin_ristache »
Hi Kate,
Regards,
Sorin
You can find the commonltr.css file in directory OXYGEN_INSTALL_DIR_frameworks\dita\DITA-OT\plugins\org.dita.xhtml\resource. args.cssroot is not required, just set the args.csscopy parameter to yes and the args.css parameter to the file path of your custom CSS.lopresti wrote:Questions: Which plug-in directory stores the commonltr.css for CHM outputs? Is args.cssroot no longer required?
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service