Print

Print


I believe it was agreed upon that the names of the control sequences in
which templates and related data structures are stored should be changed,
but no new naming scheme was specified. I would like to have those naming
schemes set so that I can get on with the non-LaTeX2e* version of docindex.
(The templated interfaces are great, but they are not yet ready for use in
non-experimental contexts. In particular, using of the galley package seems
to wreck havok on most layout elements---probably because it is hiding a
bunch of primitives.)

In case you haven't already decided on new names, here are my suggestions.
I hope you don't mind me writing the names as calls to \describecsfamily;
the frequent use of < and > in the old names make it a little hard to use
these as representations of angle brackets, though.

Template type data:
  Current name: \describecsfamily{TP@<\meta{type}>}
  New name: \describecsfamily{TP@T{\meta{type}}}

Template defaults:
  Current name: \describecsfamily{TPD>/\meta{type}/\meta{template}}
  New name: \describecsfamily{TP@D{\meta{type}}{\meta{template}}}

Template code:
  Current name: \describecsfamily{TP>/\meta{type}/\meta{template}}
  New name: \describecsfamily{TP@C{\meta{type}}{\meta{template}}}

(Collection) Instance:
  Current name:
\describecsfamily{<\meta{collection}>\meta{type}/\meta{template}}
  New name:
\describecsfamily{TP@I{\meta{collection}}{\meta{type}}{\meta{template}}}

Please confirm or correct.

Finally, here are the definitions for a couple of macro-like environments
that I've written for documenting template-related things:

\usepackage{xdoc2}

\makeatletter
\NewMacroEnvironment{templatetype}{\XD@grab@harmless\relax}{1}%
   {\MacroFont#1\ \normalfont type}%
   {\XDMainIndex{\LevelSorted{#1}{\texttt{#1} template type}}}%
   {{#1}{\texttt{#1} template type}}%
   {}%
\NewMacroEnvironment*{template}{%
   \XD@grab@harmless\relax\XD@grab@harmless\relax
}{2}%
   {\XDParToMargin{\MacroFont #1\textnormal{\slash}#2 \normalfont
       template}}%
   {\XDMainIndex{
      \LevelSorted{#1}{\texttt{#1} template type}%
      \LevelSorted{#2}{\texttt{#2} template}%
   }}%
   {{#1/#2}{\texttt{#1}\slash\texttt{#2} template}}%
   {}%
\NewMacroEnvironment*{instance}{%
   \XD@grab@harmless\relax\XD@grab@harmless\relax
}{2}%
   {\XDParToMargin{\MacroFont #1\textnormal{\slash}#2 \normalfont
       instance}}%
   {\XDMainIndex{
      \LevelSorted{#1}{\texttt{#1} template type}%
      \LevelSorted{#2}{\texttt{#2} instance}%
   }}%
   {{#1/#2}{\texttt{#1}\slash\texttt{#2} instance}}%
   {}%
\NewMacroEnvironment*{collectioninstance}{%
   \XD@grab@harmless\relax\XD@grab@harmless\relax\XD@grab@harmless\relax
}{3}%
   {\XDParToMargin{\MacroFont #2\textnormal{\slash}#3 \normalfont
      instance (\texttt{#1} collection)}}%
   {\XDMainIndex{
      \LevelSorted{#2}{\texttt{#2} template type}%
      \LevelSorted{#3}{\texttt{#3} instance}%
      \LevelSorted{#1}{\texttt{#1} collection}%
   }}%
   {{#2/#3/#1}%
    {\texttt{#2}\slash\texttt{#3} instance (\texttt{#1} collection)}}%
   {}%
\makeatother

Environment syntaxes are:
  \begin{templatetype}{<type>}
  \begin{template}{<type>}{<template>}
  \begin{instance}{<type>}{<instance>}
  \begin{collectioninstance}{<collection>}{<type>}{<instance>}

Lars Hellström