LATEX-L Archives

Mailing list for the LaTeX3 project


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
Benjamin Berg <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Sun, 27 Aug 2017 14:15:46 +0200
text/plain (49 lines)
On Tue, 2017-08-22 at 20:41 +0930, Will Robertson wrote:
> On 22 Aug 2017, at 6:57 pm, Benjamin Berg <[log in to unmask]> wrote:
> > Oh, of course it is not a great plan … but in the end I have users that
> > try to do exactly these kind of things. Forcing them to use savebox or
> > similar is quite cumbersome and this is a command structure that is
> > easy to teach to users even if it can break in really odd ways (e.g. if
> > the opening braces is missing).
> I agree this can be awkward. IMO the way to overcome this sort of
> problem is to also introduce environment versions of the same so they
> can use either the more verbose and general syntax or the shorthand
> but slightly-less-flexible syntax.

Yes, I could actually do that, so
    \choice{Choice 1}
    \choice{Choice 2}
    \question{Question one}
    \question[text=question two]{Question two with \verb^verbatim^}

could become
    \choice{Choice 1}
    \choice{Choice 2}
    \question{Question one}
    \begin{question}{question two}
      Question two with \verb^verbatim^

with a separate mandatory argument (to set the "text" keyword).[1]

It does not quite convince me at this point though. The thing is that I
am assuming is that most users don't understand the issue of "fragile"
commands. So either way I need to explain them how to "magically" fix
their issue. Only in one case the instructions are "add a text keyword
argument" and in the other one it is "use the environment version". And
adding the environment version has the disadvantage that it requires
more overall documentation.

I know, not a great argument. I guess I just don't mind that ugly hack
too much as long as this is only used in user facing APIs.


[1] See for
some documentation.