[liblouis-liblouisxml] Table of Contents Tool in liblouisxml Completed

  • From: "John J. Boyer" <johnjboyer@xxxxxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 1 Dec 2008 05:52:14 -0600

Here is the documentation for the just-completed table-of-contents tool
in liblouisxml in text form. 

This tool produces a table of contents for an xml file if the file
contains tags which have been defined with the heading1, heading2,
heading3 or heading4 semantic actions. The table of contents will
contain print and braille page numbers if these features have been
enabled. A sequence of fill characters will be inserted before the page
numbers, so that the latter are at the right margin. The fill character
can be specified in a configuration file with the lineFill setting. Qe 
default fill character is an apostrophe (dot 3). 

Five new styles have been defined for the table of contents. The first
is the contentsheader style, which is used to specify where the contents
should be placed and the title that should be given to it. Place the xml
tag declared as contentsheader in your semantic-action file where you
want the contents to be. The others correspond to the four heading
levels and are contents1, contents2, contents3 and contents4.  These
styles are chosen as appropriate while the table of contents is being
made. Do not declare them in a semantic-action file. See the
canonical.cfg file for the current default definitions of all these
styles.

The table of contents begins on a new page. After it is completed the 
braille page number is reset to beginningBraillePageNumber and another 
new page is started. This means that the xml tag with the contentsheader 
semantic action should occur at the end of the information which you 
want to be at the head of the output, such as a title page, dedication, 
etc.

It is not necessary that an xml file contain a tag with the contentsheader 
semantic action. If the file contains headers you can obtain a table of 
contents by specifying "contents yes" in a configuration file or 
"-Ccontents=yes" on the command line of xml2brl . In this case, the 
table of contents will appear at the beginning of the output. Pages 
will be numbered beginning with 1. When the table of contents is 
complete, the material in the file will start on a new page and the page 
number will be the value given in beginningBraillePageNumber.

The contents1, etc. styles all have the "format contents" setting. This 
is a variant of the leftJustified format. It has been necessary to 
change the way firstLineIndent is handled to accommodate multilevel 
lists. Up till now, if firstLineIndent was negative, the first line 
would start at the real left margin, regardless of the value of 
leftMargin. Now the value of firstLineIndent is simply added to 
leftMargin. This means that if it is negative it is really subtracted. 
For example, if leftMargin is 4 and firstLineIndent is -2 the first line 
will start in cell 2.



-- 
My websites:
http://www.godtouches.org
http://www.jjb-software.com
Location: Madison, WI, USA

For a description of the software and to download it go to
http://www.jjb-software.com

Other related posts:

  • » [liblouis-liblouisxml] Table of Contents Tool in liblouisxml Completed - John J. Boyer