9
votes
2answers
172 views

Defining a macro with three optional arguments in the form \newmacro{a}{b}[c]{d}[e][f] and \newmacro{a}{b}[c]{d}*[f]

I am defining a macro in LaTeX2e for writing function declarations. I want that the macro has tree compulsory arguments: the name of the function (v.g f), a depiction of the type of variable it takes ...
12
votes
2answers
178 views

How to test whether the starred-version of a command is defined?

This question is similar to How to conditionally define a new command in LaTeX? but I want to test if the starred version of a command is defined. The naive thing \makeatletter ...
9
votes
2answers
116 views

How to improve maintenance of starred/non starred versions of commands or environments

All documentations I've read about starred/non starred versions of commands recommend more or less the following way of doing (following for instance the UK List of TeX FAQ): ...
5
votes
1answer
65 views

Use \LetLtxMacro with a \Macro* (starred variant)

If I use: \LetLtxMacro{\MacroToUse}{\FormatText} then using \MacroToUse invokes \FormatText exactly as desired. But, how do use this construct to invoke \FormatText*? The MWE below yields: but ...
6
votes
1answer
97 views

Temporarily undefining a “starred” command

I would like to temporarily undefine a command. The reason for this is that I need to use a specific class file which defines the equation* using \@namedef and I would also really like to use the ...
4
votes
1answer
1k views

Command \* already defined … see p.192 of the manual

My code had: \newtheorem*{theI}{Thesis I} And it gives me the error: Command \* already defined. Or name \end... illegal, see p.192 of the manual. 1.16 \newtheorem*{theI}{ ...
6
votes
3answers
304 views

Why are some characters not allowed in command sequences

From my understanding a control sequence is ended by any non-alphabetic character such that \mycsA is one token, but \mycs1 is two tokens. This means things like starred commands \mycs* are actually ...
20
votes
3answers
319 views

If I redefine a command that has a starred variant, will that always disable the starred variant?

If I redefine a command that has a starred variant, will this always effectively disable the starred variant, as a side effect of redefining the unstarred variant? A related question: Do starred ...
16
votes
4answers
504 views

Do starred commands eat up space after them?

Do starred commands eat up spaces after them, like unstarred ones do? That is, is \somecommand* nextword equivalent to \somecommand*nextword? And: Does it depend on the particular way a starred ...
7
votes
1answer
75 views

Is there any reason against changing the starredness of a command upon redefinition?

If an original definition of a command used \newcommand, is there an obligation for me to redefine it with \renewcommand instead of \renewcommand*? If an original definition of a command used ...
11
votes
2answers
131 views

Is there any reason to define a zero-argument macro using a starred defining command?

Is there any reason to define a 0-argument (read: zero-argument) macro with a starred command (\newcommand* instead of \newcommand or \DeclareRobustCommand* instead of \DeclareRobustCommand)? After ...
4
votes
2answers
582 views

New command and the corresponding star counterpart with xparse

The following works as expected: \newcommand{\engl}[2]{#1 (en. \textsl{#2})\index{en-ro}{#2}} However, what I want to achieve would be a * version of it which only adds to the indices, without the ...
1
vote
0answers
46 views

How to define command with * [duplicate]

Possible Duplicate: Defining starred versions of commands I have some user command: \newcommand{\mysection}[1]{\section{#1}} Now I need to use command: \mysection*{name of section} ...
4
votes
1answer
88 views

starred version of DeclareRobustCommand

I generally use \newcommand* instead \newcommand whenever it makes sense, to ease error checking if the command doesn't sensibly take multi-paragraph arguments. Is there a starred version of ...
6
votes
1answer
436 views

suffix package, cannot redefine a suffixed macro

I have two local packages A and B. Package B is used occasionally to override macros defined in package A. Package A defines a macro and, using the suffix package, also defines a starred version of ...
0
votes
0answers
60 views

what does an asterisk (*) character do in a renewcommand? [duplicate]

Possible Duplicate: What's the difference between \newcommand and \newcommand*? I've seen * used in memoir.cls: \renewcommand*{\chapnumfont}{\normalfont\HUGE\sffamily} and ...
17
votes
3answers
694 views

What does \\* do?

I have some code, and when I use \\*, it causes some things to become unaligned, but when I use \\, the alignment is correct. What's the difference?
24
votes
2answers
3k views

Meaning of an asterisk (*) in a macro name

What does the * in the starred version of a macro "mean"? I know for \section and \section* the * controls numbering and for \newcommand and \newcommand* the * determines if the macro is long. What I ...
4
votes
2answers
1k views

\renewcommand with \caption*

I'd like to redefine \caption* as \renewcommand{\caption*}[1]{\vspace{\abovecaptionskip}\caption*{\textbf{Note:} #1}\vspace{-\abovecaptionskip}} but keep getting an error when I try to compile. My ...
2
votes
0answers
104 views

How do I write a starred macro? [duplicate]

Possible Duplicate: Defining starred versions of commands I want to write a macro that has a starred version, e.g. \newcommand*{\blah}{{\bfseries blah}} \newcommand*{\blah*}{{\itshape ...
11
votes
1answer
376 views

Defining variants of \small and \large that use \normalsize's line spacing

As a partial workaround for grid typesetting, I'd like to define variants of \small and \large that behave like their standard counterparts except that they use the line spacing of \normalsize. I know ...
24
votes
4answers
1k views

Do all starred commands have anything in common?

\section* produces an unnumbered section, align* makes the environment unnumbered, which is comparable in a way. \newcommand* doesn't accept \par in its argument, which is different. Stefan Kottwitz ...
7
votes
3answers
291 views

Own Section command working numbered and unnumbered

I use the following command to have section headings with subtitles \newcommand{\Section}[2]{\section[#1]{#1\\\small »#2«}} But now I only can have numbered sections because the * doesn't work for ...
9
votes
4answers
1k views

Swap definition of starred and non-starred command

I don't like the fact that I am required to use \abs* when I want the vertical line of the absolute value to automatically re-size. I pretty much always want it to re-size, so would like to swap the ...
55
votes
3answers
2k views

Defining starred versions of commands (* macro)

I would like to define a *'d version of a command, something like \newcommand{\foo}{blah} \newcommand{\foo*}{blahblah} If I try to do this, LaTeX complains that I'm trying to redefine \foo, so I ...
164
votes
4answers
14k views

What's the difference between \newcommand and \newcommand*?

I just spotted someone use \newcommand* in an answer and realised that I'd never quite sorted out in my head what the star (asterisk) was there for. (This one is practically impossible to search for ...