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:
Richard Hensh <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Thu, 30 Sep 1999 09:29:57 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
Yes it does. Thanks.

BTW, there has been some discussion about the Latex Companion in ctt.
Is a revised edition in the works? ;->

ricky

-----Original Message-----
From: Mailing list for the LaTeX3 project
[mailto:[log in to unmask]]On Behalf Of Frank Mittelbach
Sent: Thursday, September 30, 1999 5:26 AM
To: Multiple recipients of list LATEX-L
Subject: Re: xparse and end-users


Richard Hensh writes:
 > What does (or will) xparse offer to the casual end user? How about
someone
 > who is not afraid to write a few macros but is not interested in
designing
 > classes?

well xparse offers the ability to produce macros that have the look
and feel of standard LaTeX without the need to resort to lowlevel
programming, e.g., if you want to write a macro which has two optional
argument (with default values) and one mandatory one you simply write

\DeclareDocumentCommand \foo { O{default1} O{default2} n }
  { < code for the macro where #1 is first optional #2 is second optional
      and #3 is mandatory argument > }

doing this in current LaTeX would require several macros using
\@ifnectchar ... calling each other

if you like this is a generalization of
\newcommand\foo[2][default]{...}  which allows you to define a new
command with a single optional argument and one mandatory one (or
several ones if you replace 2 by a higher number).

does this answer your question?

frank

ps stuff like template.dtx on the other hand is effectively of
interest only for class file writers or more explicitly for anybody
who wants to change the layout of a class (once classes are written
using this mechanism) --- in other words the concept of instances is
relevant to everybody (hopefully) even though only a few people will
ever write templates for instances.

ATOM RSS1 RSS2