X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["6819" "Wed" "29" "December" "1999" "23:07:16" "+0100" "Frank Mittelbach" "frank.mittelbach@LATEX-PROJECT.ORG" nil "168" "A new set of instances for Javier's toc templates" "^Date:" nil nil "12" nil "A new set of instances for Javier's toc templates" nil nil nil] nil) Return-Path: Received: via tmail-4.1(11) (invoked by user schoepf) for schoepf; Wed, 29 Dec 1999 23:39:03 +0100 (MET) Received: from mailgate2.zdv.Uni-Mainz.DE (mailgate2.zdv.Uni-Mainz.DE [134.93.8.57]) by mailserver1.zdv.Uni-Mainz.DE (8.9.3+Sun/8.9.1) with ESMTP id XAA28918 for ; Wed, 29 Dec 1999 23:39:03 +0100 (MET) Received: from mail.listserv.gmd.de (mail.listserv.gmd.de [192.88.97.5]) by mailgate2.zdv.Uni-Mainz.DE (8.9.3/8.9.3) with ESMTP id XAA15122 for ; Wed, 29 Dec 1999 23:39:03 +0100 (MET) Received: from mail.listserv.gmd.de (192.88.97.5) by mail.listserv.gmd.de (LSMTP for OpenVMS v1.1a) with SMTP id <8.523244C0@mail.listserv.gmd.de>; Wed, 29 Dec 1999 23:38:49 +0100 Received: from RELAY.URZ.UNI-HEIDELBERG.DE by RELAY.URZ.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8b) with spool id 447182 for LATEX-L@RELAY.URZ.UNI-HEIDELBERG.DE; Wed, 29 Dec 1999 23:35:43 +0100 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by relay.urz.uni-heidelberg.de (8.8.8/8.8.8) with ESMTP id XAA16479 for ; Wed, 29 Dec 1999 23:35:25 +0100 (MET) Received: from mailgate1.zdv.Uni-Mainz.DE (mailgate1.zdv.Uni-Mainz.DE [134.93.8.56]) by relay.uni-heidelberg.de (8.9.1b+Sun/8.9.1) with ESMTP id XAA24843 for ; Wed, 29 Dec 1999 23:36:13 +0100 (MET) Received: from mailserver1.zdv.Uni-Mainz.DE (mailserver1.zdv.Uni-Mainz.DE [134.93.8.30]) by mailgate1.zdv.Uni-Mainz.DE (8.9.3/8.9.3) with ESMTP id XAA07160 for ; Wed, 29 Dec 1999 23:36:19 +0100 (MET) Received: from istrati.zdv.uni-mainz.de (dialin368.zdv.Uni-Mainz.DE [134.93.175.68]) by mailserver1.zdv.Uni-Mainz.DE (8.9.3+Sun/8.9.1) with ESMTP id XAA28717 for ; Wed, 29 Dec 1999 23:36:17 +0100 (MET) Received: (from design@localhost) by istrati.zdv.uni-mainz.de (8.9.3/8.9.3) id XAA00366; Wed, 29 Dec 1999 23:07:16 +0100 X-Authentication-Warning: istrati.zdv.uni-mainz.de: design set sender to design@istrati.zdv.uni-mainz.de using -f References: <199912291644.RAA00909@relay.uni-heidelberg.de> Message-ID: <199912292207.XAA00366@istrati.zdv.uni-mainz.de> Reply-To: Mailing list for the LaTeX3 project In-Reply-To: <199912291644.RAA00909@relay.uni-heidelberg.de> Date: Wed, 29 Dec 1999 23:07:16 +0100 From: Frank Mittelbach Sender: Mailing list for the LaTeX3 project To: Multiple recipients of list LATEX-L Subject: A new set of instances for Javier's toc templates Status: R X-Status: X-Keywords: X-UID: 3484 \iffalse 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 help. - 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 frank \fi %========================== xtitletoc-test2.tex begins \documentclass{article} \usepackage{xtitletoc} \IgnoreWhiteSpace %======================== \DeclareCollectionInstance{mixed}{contentsobject}{section}{JB1} { 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 = } \DeclareCollectionInstance{mixed}{contentsobject}{subsection}{JB2} { 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 = } \DeclareCollectionInstance{mixed}{contentsobject}{subsubsection}{JB2} { title-format = \textit{#1}, label-format = , page-format = \nobreakspace\textit{#1}, punct-sup = )\quad\textbullet\quad , punct-sep = ;\ , punct-end = ) } \begin{document} \newcommand\testtoc[1]{ \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 subsubsection}{}{1} \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 section}{}{1} \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 subsection}{}{2} \csname ttl@finish\endcsname %% Added by titletoc to the toc file } \setcounter{tocdepth}{3} \UseCollection{contentsobject}{mixed} \testtoc{3} % to add another toc example (chose a collection name FOO) % add some CollectionInstances above and do: %\UseCollection{contentsobject}{FOO} %\testtoc{3} \stop ============================ xtitletoc-test2.tex ends