Change spacing of TOC entries in WebWorks Help 5.0

User question:

I can't seem to find instructions for changing the "line height" (the vertical spacing above and below a line) for the for the entries in the TOC panel. They are scunched up together and I would like to have more white space above and below each TOC entry.

WebWorks.com answer:

The TOC for WebWorks Help 5.0 is created at runtime by several JavaScript actions. Some of the styling of the TOC entries (and other navigation panel items) can be controlled by overriding a file called wwhelp_settings.xml, but the particular effect you're looking for requires a modification of the JavaScript code itself. Follow these steps:

1. Perform an override on a file called 'outline.js,' located by default in the ePublisher Pro installation directory here: Formats/WebWorks Help 5.0/Files/wwhelp/wwhimpl/js/scripts/ Note: for more information on overrides, please see this TechNote article: http://webworks.com/Technical_Assistance/Tech_Notes/Common/EX_ePub_Project_Format_Overrides.shtml

2. Once you have copied the file into the corresponding folder in your project directory, open it in a text editor, such as NotePad.

3. Scroll to the bottom of the file and locate the WWHOutlineImaging_GetEntryHTML function. This function is responsible for building the table elements that hold each TOC entry.

4. The first line of that function is:

EntryHTML += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";

That <table> tag is the one that holds the entry text, so you can add style information there to change each entry. For example, change that line to:

EntryHTML += "<table style=\"line-height: 1em;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";

5. Save 'outline.js' and regenerate your output to apply the changes.


CategorySolutionsOverrides

Permalinks/Solutions/Overrides/SpacesInTOC (last edited 2009-05-13 22:16:27 by LaurenLever)