LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

Subject:

Allowing usage of fragile content

From:

Date:

Sun, 27 Aug 2017 14:15:46 +0200

Content-Type:

text/plain

Parts/Attachments:

 text/plain (48 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   \begin{choicearray}     \choice{Choice 1}     \choice{Choice 2}     \question{Question one}     \question[text=question two]{Question two with \verb^verbatim^}   \end{choicearray} could become   \begin{choicearray}     \choice{Choice 1}     \choice{Choice 2}     \question{Question one}     \begin{question}{question two}       Question two with \verb^verbatim^     \end{question}   \end{choicearray} 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. Benjamin [1] See http://sdaps.org/class-doc/sdapslayout.html#choicearray for some documentation.