LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Ruben Prins <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Sat, 29 Jan 2000 17:58:33 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (102 lines)
Well, I'm new to this list, so my comments on templates might already have
been discussed, but anyway, here goes

* Templates

How about reusability of templates? That is, if I have a couple of instances
x and y of a template t, and a command

    \DeclareDocumentCommand{\foo}{}{\UseInstance{t}{x}}

where x is the default instance; then how can this instance be `upgraded'
to, say, y? Shouldn't there be a command like

    \LetInstance{<template>}{<old_instance>}{<new_instance>}

This could be very useful when you're using existing document classes, and
extra (read: other's) template/instance files:

    \RequireClass{xbook}
    \RequireInstances{captions} % \input{captions.<nice_suffix>} ?
    \LetInstance{caption}{default}{odd-left}
    \LetCollectionInstance{figure}{caption}{default}{odd-bottom}
    \LetCollectionInstance{table} {caption}{default}{odd-top}

Well, something like that. (Suggestions for \RequireInstances/Templates:
    <nice_suffix> = td  - template definitions (\RequireTemplates),
    <nice_suffix> = tid - template instance definitions,
 like fd for font files.)

PS

How far do collections go? Nesting is probably okay (just taking the top
collection -- couldn't think of any real problems here :-( But how about
combinations of collections:

    \frontmatter  % \UseCollections{frontmatter}
    ...
    \begin{table} % \UseCollections{table}
      ...
      \caption{This table}
    \end{table}
    ...
    \mainmatter   % \UseCollections{mainmatter}
    ...

So,

    \UseCollections{table}

Rather than consecutive

    \UseCollection{caption}{table}
    \UseCollection{footnote}{table}
    ...

Maybe I'm wrong here, but it could be possible that some (class) author
wanted to add a

    \UseCollection{hj}{table}

to tables so that they automatically center stuff after

    \LetCollectionInstance{table}{hj}{default}{centering}

But later (s)he could redesign his/her class to say

    \LetCollectionInstance{table}{hj}{default}{inch-from-left}

This only affects the class, and not the plain LaTeX input. And now that I'm
typing:

    \RemoveCollectionInstance{frontmatter}{head}{*}

Ah, well...


* xinitials

1) You should use `totalheight', not `height' --- just try Palatino J, or
just about any Q. (BTW, this mistake is also made by the dropping package).

2) Accented characters can be used for initial if you just use
\meaning/\@onelevel@sanitize or a plain \string (compare the code the
accents use to check for existing `template instances'  [=composites]).

Neither English nor Dutch use accented initials/caps, but languages like
German, Danish, Swedish, French, Portuguese, etc. do (well, I think so ;-)
So I think support SHOULD be part of a standard template. Don't force people
to constantly work around such idiosyncracies when salvation is so nigh!

Maybe another hint could be to add a feature to the accent commands of
\DeclareTextAccent/\DeclareTextCommand, that they can revert to unaccented
behaviour under certain circumstances, i.e.,
    \"a -> \@firstofone a  (thus practically a mere `a')
There could be several uses for this behaviour (initials being one of them).


Well, that's all for my input today; as for more positive comments: I think
those should be obvious.

Ruben Prins

ATOM RSS1 RSS2