Search found 1953 matches

by cgnieder
Wed Apr 18, 2018 10:00 am
Forum: General
Topic: alphalph package
Replies: 1
Views: 85

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: 12
Views: 3109

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: 12
Views: 3109

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: 927

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: 12
Views: 3109

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: 847

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: 836

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: 12
Views: 3109

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...
by cgnieder
Wed Feb 14, 2018 6:33 pm
Forum: Theses, Books, Title pages
Topic: legrand-orange-book: make textbook exercise answer key
Replies: 2
Views: 1718

legrand-orange-book: make textbook exercise answer key

Why not copy all exercises \begin{exercise} This is a good place to ask a question to test learning progress or further cement ideas into students' minds. \end{exercise} from your main document into a new document where you can use exercise or xsim or whatever to print the exercises and their so...
by cgnieder
Wed Feb 14, 2018 1:40 pm
Forum: General
Topic: Specifying arguments with xparse Topic is solved
Replies: 11
Views: 1904

Specifying arguments with xparse Topic is solved

\NewDocumentCommand{\blah}{R<>{Jack} m}{#1~#2} defines a required (!) argument which of course means that an error message is given when the argument is missing. When LaTeX is compiled with interaction=nonstopmode (which is not unusual) the compilation doesn't stop at the error. This is where the d...

Go to advanced search