LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

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

Print Reply
David Kastrup <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Wed, 7 May 2014 09:20:50 +0200
text/plain (37 lines)
Heiko Oberdiek <[log in to unmask]> writes:

> On 07.05.2014 04:10, Qing Lee wrote:
>> The new definition will be broken if its argument contains additional
>> units. E.g.,
>>     \__dim_strip_bp:n { 1 bp pt }
> The second "unit" is just additional text that serves
> no purpose other than invalidating the argument.


> However the additional text will *not* go away and
> will very likely causing trouble some time later,
> a more mysterious error message or even worse,
> the text could go silently into the output.
> Adding parentheses around "#1" gets an input validation
> check for free.

The sad thing being that the kind of error message TeX delivers is
inscrutable babbling anyway and the error recovery typically bad.

Yes, one gets an extra check and a "premeditated" error, but a low-level
TeX error is not all that much of an improvement for a high-level format
user.  No idea whether LuaTeX offers more complete/enduser-compatible
ways of catching and dealing with errors.

Still, this has the advantage of reigning in "inventive" abuse that
could likely lead to completely different treatment of undefined
behavior in future versions.

David Kastrup