Print

Print


Frank Mittelbach skrev:
> I do want to try my hand on setting up some templates for headings and for
> that the first step is to define a suitable 
> 
>   \DeclareObjecttype{headings}{?}
> 
> The initial question here is what are the arguments this object type should
> carry? for that I hope some of you can help with some thoughts.
> 
> Here is my current list of candiates:
> 
>   - title of the heading
>   - title version to go in the TOC
>   - title version to go in the running header
>   - subtitle of the heading (e.g., an author name, copyright notice ...)

That one feels a bit wobbly. But is your thinking that this kind of 
information is frequently appearing in page heads, and page head 
contents are being set by this kind of command, so there needs to be a 
way to pass the information?

>   - motto/quote text to display alongside the heading title
>   - flag to number heading

Or should numbered and unnumbered headings be generated by separate 
instances? Needs to be thought about.

One additional item could be an external identifier to use for this 
heading of this document, i.e., the thing that would come after # in an 
URL.

> do we need a way to specify that something is send to the TOC or to the
> running header and if so how do we do that?

Isn't that explicit in the above? Or did you rather think about the 
document-level commands here?

> what else is missing or which of the above aren't sensible in the first place?

One might consider making one argument a keyval dictionary and collect 
many of the above in that instead. This would provide for instances 
behaving as follows:

   When needing a title for the TOC:

   1. If there is a key "toctitle", then use that value.
   2. Otherwise, if there is a key "shorttitle", then use that value.
   3. Otherwise, use the full title.

   When needing a title for the running head:

   1. If there is a key "headtitle", then use that value.
   2. Otherwise, if there is a key "shorttitle", then use that value.
   3. Otherwise, use the full title.

That way, the optional argument of the 2e \section could be passed to 
such an instance as a "shorttitle", whereas a more powerful sectioning 
command could provide for setting "toctitle" and "headtitle" separately.

Lars Hellström