General ⇒ position of optional parameter in a LaTeX command.
position of optional parameter in a LaTeX command.
But the \blindlistlist command in the blindtext package takes an optional parameter after an obligatory parameter: \blindlistlist[<level>]{<env>}[<x>]
What is the benefit of taking an optional parameter after an obligatory parameter? And how do I define such a command?
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
position of optional parameter in a LaTeX command.
One could add optional parameters without getting incompatible to its previous syntax, e.g. extend its syntax fromyoo wrote:What is the benefit of taking an optional parameter after an obligatory parameter?
\xxx[<o-arg 1>]{<m-arg>}
to
\xxx[<o-arg 1>]{<m-arg>}[<o-arg 2>]
LaTeX and their packages are Open Source, so just take a look at the code of \blindlistlist.And how do I define such a command?
-
- Site Moderator
- Posts: 814
- Joined: Tue Jul 01, 2008 2:19 pm
position of optional parameter in a LaTeX command.
Code: Select all
\DeclareDocumentCommand \blintext {o +m o}{%
% Code
}