LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Mailing list for the LaTeX3 project <[log in to unmask]>
Mon, 19 Sep 2011 02:14:32 -0500
Mailing list for the LaTeX3 project <[log in to unmask]>
text/plain; charset=ISO-8859-1
Kevin Godby <[log in to unmask]>
text/plain (41 lines)

On Sun, Sep 18, 2011 at 8:47 AM, Joseph Wright
<[log in to unmask]> wrote:
> On 18/09/2011 10:53, Philipp Stephani wrote:
>> I would indeed propose having both _new:N and _new:Nn for all variable
>> types. Adding them should not be a big deal (since all parts are
>> already there), but simulating them manually is quite cumbersome,
>> especially because variable names tend to be quite long due to the
>> lack of namespaces:
>> \int_new:N \l_package_foo_bar_int
>> \int_set:Nn \l_package_foo_bar_int { 1 + 2 }
> I'm still not sure how many real use cases there are where these are not
> either constants or better handled as keyval-assigned variables (where
> 'define' and 'set' are separate).

I'm inclined to agree with Philipp.  Skimming through the existing
LaTeX 2e packages, it looks like a lot of \newlength lines are
followed immediately by setting a default value.  In some cases,
commands are provided to modify the length and in other cases, the
document author is expected to \setlength them in their preamble.
Most of the cases that I spot-checked were non-constant values.

I'm not sure what the LaTeX 3 plans are for the keyval stuff is,
though.  How would you handle this situation using the LaTeX 3 coding

On the topic of constants:  Aside from the c_ prefix indicating to the
reader/author that the value is to be constant, is there anything that
prevents one from changing the value?  How much overhead would it be
to have the LaTeX 3 macros check for the c_ prefix and throw an error
if you try to modify the value?

As for the iow_open question, I think that most languages will
overwrite the existing file by default.  If you want to provide an
option for appending to the file, I'd create an ioa_open:N macro.

--Kevin Godby