LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Mailing list for the LaTeX3 project <[log in to unmask]>
Michael John Downes <[log in to unmask]>
Tue, 4 Aug 1998 14:27:49 -0400
Mailing list for the LaTeX3 project <[log in to unmask]>
text/plain (46 lines)
I began putting together a script to facilitate the process of
converting an LaTeX2e package to LaTeX3. (Since, in fact, there is a
largish package that I want to try converting.) Then it occurred to me
I ought to check with the readers of this list to guard against
reinventing a wheel that someone else has done already.

Consider this (slightly simplified) fragment from ltdefns.dtx:

  % \begin{macro}{\CheckCommand}
  %    |\CheckCommand| takes the same arguments as |\newcommand|. If
  %    the command already exists, with the same definition, then
  %    nothing happens, otherwise a warning is issued. Useful for
  %    checking the current state befor a macro package starts
  %    redefining things.  Currently two macros are considered to have
  %    the same definition if they are the same except for different
  %    default arguments.  That is, if the old definition was:
  %    |\newcommand\xxx[2][a]{(#1)(#2)}| then
  %    |\CheckCommand\xxx[2][b]{(#1)(#2)}| would \emph{not} generate a
  %    warning, but, for instance |\CheckCommand\xxx[2]{(#1)(#2)}|
  %    would.
  %    \begin{macrocode}
  %    \end{macrocode}
  % \end{macro}

Naturally we want to convert control sequences in the macrocode
blocks to LaTeX3 equivalents. We also want to convert the argument
of \begin{macro}, as well as references in the commentary to LaTeX2e
internal control sequences. But the mention of \newcommand should
probably be left alone, not to mention the \xxx, and the \emph also
should not be converted.

Macro name references usually take one of the following forms:


I will probably write the script in Emacs Lisp with the idea of
reusing some fragments later in setting up a LaTeX3 programmer's mode
for Emacs. The largest part of the work would seem to be setting up a
table of name pairs.

Michael Downes