Customizing the treatment of title information

TeXmacs uses the doc-data tag in order to specify global data for the document. These data are treated in two stages by the doc-data macro. First, the document data are separated into several categories, according to whether the data should be rendered as a part of the main title or in footnotes or the abstract. Secondly, the data in each category are rendered using suitable macros.

Each child of the doc-data is a tag with some specific information about the document. Currently implemented tags are doc-title, doc-subtitle, doc-author-data, doc-date, doc-running-title, doc-running-author, doc-keywords, doc-AMS-class and doc-note. The doc-author-data tag may occur several times and is used in order to specify data for each of the authors of the document. Each child of the doc-author-data tag is a tag with information about the corresponding author. Currently implemented tags with author information are author-name, author-address, author-email, author-homepage and author-note.

Most of the tags listed above also correspond to macros for rendering the corresponding information as part of the main title. For instance, if the date should appear in bold italic at a distance of at least 1fn from the other title fields, then you may redefine doc-date as

< document | < assign | doc-date | < macro | body |

<\concat|

<vspace*|1fn>

|

<doc-title-block|<with|font-shape|italic|font-series|bold|body>>

|

<vspace|1fn>

>

> > >

The title-block macro is used in order to make the text span appropriately over the width of the title. The doc-title and author-name are special in the sense that they also render possible references to footnotes. For this reason, you should rather customize the doc-render-title and author-render-name macros in order to customize the rendering of the title and the name themselves.

Notice also that the doc-running-title and author-running-author macros do not render anything, but rather call the header-title and header-author call-backs for setting the appropriate global page headers and footers. By default, the running title and author are extracted from the usual title and author names.

In addition to the rendering macros which are present in the document, the main title (including author information, the date, etc.) is rendered using the doc-make-title macro. The author information, as part of the main title, is rendered using doc-author or doc-authors, depending on whether the document has one or more authors. Footnotes to the title or to one of the authors are rendered using doc-title-note resp. doc-author-note. These footnote macros always expect a document tag on input, because they may compress it into a horizontal concatenation.

The first stage of processing the document data is more complex and the reader is invited to take a look at the short descriptions of the macros which are involved in this process. It is also good to study the definitions of these macros in the package itself. In order to indicate the way things work, we finish with an example on how the email address and homepage of an author can be rendered in a footnote instead of the main title:

<document|<assign|doc-author-main|<macro|data|<document|<quasi|<document|<unquote*|<select|<quote-arg|data>|author-name>>|<unquote*|<select|<quote-arg|data>|author-address>>>>>>>|<assign|doc-author-data-note|<xmacro|data|<quasi|<document|<unquote*|<select|<quote-arg|data>|author-email>>|<unquote*|<select|<quote-arg|data>|author-homepage>>|<unquote*|<select|<quote-arg|data>|author-note|document|<pat-any>>>>>>>>

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".