LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
From: Frank Mittelbach <[log in to unmask]>
Date: Wed, 29 Dec 1999 23:07:16 +0100
In-Reply-To: <[log in to unmask]>
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments: text/plain (169 lines)

This file can be run straight through TeX (with some preconditions :-)

The example below assumes that xtitletoc.sty has been updated as
suggested by Javier, i.e., all keys in JB1 are assigned using + syntax

 (sorry about the syntax it was added after the rest and in a way guided by
 the coding: i know that =+ has some meaning in other diciplines (and i don't
 like it either too much); so any body having a better suggestion for a
 expressing global assignment ...)

comments on the templates:

 - i was unable to make the runin paragraph part being ragged right
(haven't looked too closely at the macros but i guess this is due to
using a main body macro which always sets special paragraph values
(like good old \@dottedcontentsline))

 - the unnumbered section "Heading two as section" suddenly does get a
number (more exactly it gets the number of the last numbered
contentsline) --- bug due to the (sometimes) global assignments?

 - also the section "Studio and equipment" lost its number for probably
the same reason --- to late tonight for me to debug that

 - i had some trouble getting the punct-... keys right the first
time. this might mean i'm stupid, but perhaps some other names might

 - would it be necessary/helpful to have something comparable to
punct-end but for the very first entry?

 - what about post-action for a paragraph group?

 - it is a bit of a nuisance that one can't say decls = \itshape but
rather has to repeat this for title/label/page formatting

 - how would one specify different vertical spacing between
   a) section, <???>, section
   b) section, para-block with subsections, <???>, section
as far as i can see there is no way, unless one extends something like
pre-action to get access to the level information (like it is
currently hidden in \contentsafter)

 - the file contains a lot of bells and wistles which are most likely
a direct copy from the original package (including options to set
certain things). question: is a mixture of such layout facilities good
or bad? or in other words how much modification of template code via
external settings should be provided (normally/always/...)? is it
something that should get a suggestion, or is this something really up
to template writers? for example the line
  label-format     = \textsc{\thecontentslabel}\ ,
below seems rather strange to me (after having written a lot of
templates in one style) as i would expect to get the label in #1
rather than having to provide a fixed name --- why then #1 in the
page-format? I'm not saying that i'm right here, but i would like to
invite comments (perhaps that particular example is bad as counters in
LaTeX are sort of strange beasts anyway with their internal
repesentation forms etc)

anyway enjoy --- playing with the templates was fun, thanks Javier



%========================== xtitletoc-test2.tex begins





  pre-action       = \addvspace{1pc plus 1pt},
  right-adjust     = 3pt,
  title-format     = \textbf{#1},
  label-format     = \llap{\textbf{\thecontentslabel}\qquad},
  left-margin      = 0pt,
  label-width      = 0pt,
  page-format      = \textbf{\hfil#1},
  leaders-text     = }

    pre-action     = \vspace*{3pt},
    decls          = \raggedright,
    right-margin   = 60pt,
  title-format     = \textsc{#1},
  label-format     = \textsc{\thecontentslabel}\ ,
  page-format      = {,\nobreakspace#1},                 % default is
                                                         % wrong! ~ is
                                                         % space after \IgnoreWhiteSpace
    punct-sub      = \ (,
    punct-sep      = \quad\textbullet\quad,
    punct-end      =

  title-format     = \textit{#1},
  label-format     = ,
  page-format      = \nobreakspace\textit{#1},
    punct-sup      = )\quad\textbullet\quad ,
    punct-sep      = ;\ ,
    punct-end      = )


\section*{THE TEST: #1}
\contentsobject {1}{1}{section}{1}{Historical outline}{}{12}
\contentsobject {2}{2}{subsection}{\NoValue}{origins}{}{12}
\contentsobject {3}{2}{subsection}{\NoValue}{the first printed book in the west}{}{14}
\contentsobject {4}{2}{subsection}{\NoValue}{from platin to bodoni}{}{18}
\contentsobject {5}{2}{subsection}{\NoValue}{the nineteenth centrury}{}{22}
\contentsobject {7}{2}{subsection}{\NoValue}{the twentieth century}{}{28}
\contentsobject {8}{1}{section}{2}{Studio and equipment}{}{34}
\contentsobject {9}{2}{subsection}{\NoValue}{furniture}{}{36}
\contentsobject {10}{2}{subsection}{\NoValue}{lightning}{}{37}
\contentsobject {11}{2}{subsection}{\NoValue}{basic equipment}{}{37}
\contentsobject {12}{2}{subsection}{\NoValue}{stationary}{}{38}
\contentsobject {13}{2}{subsection}{\NoValue}{special equipment}{}{39}
\contentsobject {14}{2}{subsection}{\NoValue}{reference material}{}{40}
%% some old stuff
\contentsobject {1}{1}{section}{1}{A first section}{}{1}
\contentsobject {2}{2}{subsection}{1.1}{A first subsection}{}{1}
\contentsobject {3}{2}{subsection}{1.2}{A second subsection with an
   awful long title: some text or other to get us going right?
   awful long title: some text or other to get us going right?
   awful long title: some text or other to get us going right?
   awful long title: some text or other to get us going right?}{}{1}
\contentsobject {4}{3}{subsubsection}{1.2.1}{A direct
\contentsobject {2}{2}{subsection}{1.3}{A final subsection}{}{1}
\contentsobject {5}{1}{section}{\NoValue }{Heading two as section}{}{1}
\contentsobject {6}{2}{subsection}{1.3}{With a direct subsection}{}{1}
\contentsobject {7}{3}{subsubsection}{1.3.1}{And some subsubsection}{}{1}
\contentsobject {8}{3}{subsubsection}{1.3.2}{And some subsubsection}{}{1}
\contentsobject {13}{1}{section}{2}{And another
\contentsobject {14}{2}{subsection}{2.1}{that has a subsection}{}{1}
\contentsobject {14}{2}{subsection}{2.1}{that has a subsection}{}{1}
\contentsobject {14}{2}{subsection}{2.1}{that has a subsection}{}{1}
\contentsobject {15}{1}{section}{3}{A test}{}{2}
\contentsobject {16}{2}{subsection}{\NoValue }{with an unnumbered
\csname ttl@finish\endcsname %% Added by titletoc to the toc file


% to add another toc example (chose a collection name FOO)
% add some CollectionInstances above and do:


============================   xtitletoc-test2.tex ends