Questions tagged [starred-version]

{starred-version} is about command variants that are followed by a *.

Command-variants followed by a *, like \section*. These variants act as an alternative to the original command, with conditioning through \if@star or other means. For example, xparse defines a starred variant by means of an "optional argument":

\usepackage{xparse}% http://ctan.org/pkg/xparse
\NewDocumentCommand{\engl}{s o m}{%
  % #1 = *
  % #2 = optional
  % #3 = mandatory
}
181 questions
9
votes
3 answers

Make a simple command to generate a starred variant of a command

Based on the method indicated in this post, I want to make a \starredvariant command that would take a command and output the definition of its starred variant. The point is to be able to use a syntax similar to that of \newcommand, i.e. using…
6
votes
0 answers

Why do we use a star (*) after a command in LaTeX?

I sometimes see some code snippets including star (*) with command such as \hspace*{.5em}, \newcommand*{}, \chapter*{}. I wonder what the star is for in latex format when collaborating with a command?
Hakan
  • 546