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
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Sun, 2 Jan 2011 21:25:33 +0000
text/plain (33 lines)
On 02/01/2011 21:03, Philipp Stephani wrote:
> Am 02.01.2011 um 21:07 schrieb Joseph Wright:
>> If the idea is that you can use LaTeX3 without needing to know all of the underlying TeX
> still it would be great if the behavior of the L3 macros were formally defined in TeX terms: I often experience that I cannot use certain L3 macros because it is not documented whether they expand to, say, an<internal integer>  or an<integer denotation>. \dimexpr ... \relax is guaranteed by the e-TeX manual to be an<internal integer>, but what \int_eval:n does is undocumented—in fact, it expands to an<integer denotation>  without trailing space, making things like
> \documentclass{minimal}
> \usepackage{expl3}
> \begin{document}
> \newcount\x
> \ExplSyntaxOn
> \x = \int_eval:n { 1 + 1 } 1
> \ExplSyntaxOn
> (\the\x)
> \end{document}
> possible. 2e's counters and length were designed to make such effects impossible, but L3 reintroduces them :-(
> \dim_eval:n, on the contrary, expands to an<internal dimen>. I think that is the right choice because it is faster and leads to fewer problems. I think a formal description like the following would be nice:

One of the jobs which definitely needs doing for expl3 is tightening up 
the documentation. On this one, at least, I would point out that you are 
abusing \int_eval:n here, as there is a perfectly good, documented 
function for setting int variables (\int_set:Nn).

> "Formal definition: \int_eval:n is a non-long, non-protected, non-outer macro. The token sequence \int_eval:n<left brace>  <integer expression>  <right brace>  expands after an undefined number of expansion steps to a token sequence that represents an<internal integer>."
> Personally I would benefit from such guarantees because I could use more from L3. At the moment, my packages use a mixture of 2e, L3 and TeX primitives, and until L3 can replace every bit of TeX and 2e, the TeX speak won't disappear.

As long as we don't have to endure those unreadble lists of argument 
definition :-)
Joseph Wright