Top  Previous  Next

User interface > Main menu > Menu: Help > Wizards > New project wizard > Header/Chapters/Footer


A frequent general structure of texts is the subdivision in a header, some chapters and footer. For example in a book, the contents would be the header and the index would be the footer. The wizard described here generates a frame for such a structure. For each: the header, the chapters and the footer, a production will be created, which are called from the start rule.

At first only the SKIP symbol is used in the header and the footer production. The exact structure of these parts must be written by hand.


It is possible for the chapter production to define some tokens succeeding one another in the wizard already.


The input of the values into the table works just like at the tables of other wizards.


If the token by which the chapter production starts is specified obviously so, that it cannot occur in the header part, then executable parsers can already be created with the frame created by the wizard.





To process the keywords in a HTML file, you can "travel" across significant expressions in the file up to search position.


The shortened beginning of the file:




looks like:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">



<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<meta name="GENERATOR" content="TextTransformer">


<META NAME="keywords" CONTENT="Text Konverter">




If a sequence of tokens is defined as presented in the picture:




the text will be skipped by the Header production to the expression "<Head>", then the expression "\"keywords\"" is searched, then "CONTENT" and "=" and finally the searched string will be found. The Footer production will skip the rest of the text.


If you choose the direct output for the actions on the next page of the wizard, you will get the following Chapter production, after you have finished the wizard:



"<HEAD>"     {{out << xState.copy(); }}

( SKIP     {{out << xState.copy(); }} )?

"CONTENT"     {{out << xState.copy(); }}

"="     {{out << xState.copy(); }}

STRING     {{out << xState.copy(); }}


Here you easily can change the action, which is combined with the STRING token according to your plans.


This page belongs to the TextTransformer Documentation

Home  Content  German