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?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
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
}