Search found 1955 matches

by cgnieder
Thu May 03, 2018 2:32 pm
Forum: General
Topic: Change variable of a package Topic is solved
Replies: 5
Views: 458

Change variable of a package Topic is solved

Oh wow! According to expl3 conventions \__mhchem_arrow_options_minLength:n is an internal function with one brace argument. According to \show and the MWE it is used as a length or skip variable. It really should be named something like \l__mhchem_arrow_options_minLength_dim and be set internally wi...
by cgnieder
Thu May 03, 2018 1:31 pm
Forum: Fonts & Character Sets
Topic: expl3: changing the catcode such that _ is understood as subscript
Replies: 2
Views: 319

expl3: changing the catcode such that _ is understood as subscript

Why don't you just use LaTeX's \sb or expl3's \c_math_subscript_token ? \documentclass{article} \usepackage{expl3} \usepackage{xparse} \usepackage{amssymb} \ExplSyntaxOn \tl_new:N \tl_matrix_elem_tl \tl_set:Nn \tl_matrix_elem_tl { \ensuremath { A \sb {ij} } } % or: % \tl_set:Nn \tl_matrix_elem_tl { ...
by cgnieder
Wed Apr 18, 2018 10:00 am
Forum: General
Topic: alphalph package
Replies: 1
Views: 258

alphalph package

The argument is a TeX number. Anything that would be accepted by \number is a valid argument: ⋅  explicite constants, ⋅  macros that expand to a number, ⋅  count registers, LaTeX counter can used via \value , e. g.: \alphalph{\value{page}} This means replace \renewcomm...
by cgnieder
Fri Mar 16, 2018 3:37 pm
Forum: General
Topic: expl3 for dummies Topic is solved
Replies: 13
Views: 3972

expl3 for dummies Topic is solved

I would need, if possible, some clarification as to what the intended purposes of local public, local internal, global public, and public function are. I take it the difference between function and variable is clear? (This is mostly a semantic difference here as in TeX everything is a macro in the ...
by cgnieder
Mon Mar 05, 2018 1:16 pm
Forum: General
Topic: expl3 for dummies Topic is solved
Replies: 13
Views: 3972

expl3 for dummies Topic is solved

Two undescores for internal, one for public TL's. Not only tokenlists but all kinds of variables, even functions. Public means that those variables and functions are allowed to be used by others and ideally are documented (just like all those in interface3). Internal functions and variables are not...
by cgnieder
Fri Mar 02, 2018 6:00 pm
Forum: General
Topic: expl3 for dummies - internal function arguments Topic is solved
Replies: 1
Views: 1104

expl3 for dummies - internal function arguments Topic is solved

Such so-called “delimited” arguments would count as weird ( w ): \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \cs_new_protected:Npn \mypackage_foo:ww #1|#2* { (#1)(#2) } \NewDocumentCommand \foo {u{|}u{*}} { \mypackage_foo:ww #1|#2* } \ExplSyntaxOff \begin{document} \foo...
by cgnieder
Fri Mar 02, 2018 5:55 pm
Forum: General
Topic: expl3 for dummies Topic is solved
Replies: 13
Views: 3972

expl3 for dummies Topic is solved

No in TeX/LaTeX there is no namespace. This is part of the reason for the naming convention. The other reason is readability. After getting accustomed to the convention the code is far easier to read and understand than “traditional” (La)TeX code.
by cgnieder
Thu Mar 01, 2018 11:44 am
Forum: General
Topic: expl3 meta macro Topic is solved
Replies: 1
Views: 1000

expl3 meta macro Topic is solved

The first argument to \NewDocumentCommand can only be one command sequence token and not – like in your case – an instruction to build one. This means you have to build the command sequence token before passing it to \NewDocumentCommand . Also you are not following expl3 guidelines and naming conven...
by cgnieder
Thu Mar 01, 2018 11:35 am
Forum: General
Topic: expl3: arguments wrapped in brackets Topic is solved
Replies: 1
Views: 983

expl3: arguments wrapped in brackets Topic is solved

Here is a suggestion: \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \cs_new_protected:Nn \ewann_foo:n { \tl_if_empty:nTF {#1} {EMPTY} {(#1)} } \NewDocumentCommand \foo {g} { \IfNoValueTF {#1} { \ewann_foo:n {} } { \ewann_foo:n {#1} } } \ExplSyntaxOff \begin{document} \foo{c} % &#...
by cgnieder
Thu Mar 01, 2018 11:30 am
Forum: General
Topic: expl3 for dummies Topic is solved
Replies: 13
Views: 3972

expl3 for dummies Topic is solved

I would I rewrite this code inside a package (*.dtx) using expl3? \def\the@cartoon { Betty Boop } That depends. Is \the@cartoon going to be a tokenlist that is never going to change? Or may it be that its value (definition) changes (maybe depending on user settings)? % constant public variable: \tl...

Go to advanced search