Questions tagged [starred-version]

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

Filter by
Sorted by
Tagged with
2 votes
4 answers
283 views

In(de)finite number of Boolean arguments

I would like to know if it is possible to program a function that would accept a given symbol an infinite number of times. The application I have in mind is the following. I would like, if possible, a ...
Vincent Krebs's user avatar
0 votes
1 answer
54 views

Using \protect to generalise definitions of starred commands?

This very helpful answer led me to define my own starred commands. However, in order to use my commands in, for example, headings, after a round of strange almost frightening thoughts, I managed to ...
mfg's user avatar
  • 499
1 vote
1 answer
55 views

Swap star and non-star versions of DeclarePairedDelimiter without breaking other parameters

I use \DeclarePairedDelimiter from the mathtools package a lot, and I almost always want the delimiters to be automatically resized. Therefore, I switch the definitions of the star and non-star ...
Shai Avr's user avatar
  • 715
2 votes
1 answer
52 views

Locally redefine figure environment as figure* for automated export

I'm using a workflow based on pandoc and Latex to produce papers with my companies layout. Part of the formatting are captions set inside the margin and sometimes using images that span text and ...
lukeflo's user avatar
  • 1,555
1 vote
1 answer
116 views

Wrong TOC page number with starred part + \addcontentsline

When using an unnumbered part (\part*), added to TOC using \addcontentsline, the page number for the part page is wrong. See this MWE : \documentclass{book} \begin{document} \tableofcontents \...
Lempeo's user avatar
  • 173
0 votes
1 answer
59 views

Change color of starred chapter headings

I want to make chapter headings colorful in a memoir. I've tried the approach proposed here. The only problem with this solution is that the unnumbered chapters remain unchanged. Is there a starred ...
Tonechas's user avatar
  • 976
1 vote
2 answers
52 views

Titlesec issue with table of contents and starred chapters

I would like to know why the following code prints the header "CONTENTS" after chapter 1 (Intro) starts, instead of writing the correct chapter name "Intro" in the header (as it ...
Watson's user avatar
  • 902
1 vote
1 answer
35 views

Splitting m Argument in a Starred Command

I have been trying to use \SplitArgument onto a command with also contains an s-type argument. I have tried everything, but the star is not taken into account, and on top of that, I get a parasitic ...
Vincent Krebs's user avatar
1 vote
1 answer
61 views

Why does \WithSuffix\providecommand overwrite command already defined by instance of thmtools's restatable environment?

Consider the output of this MWE: \documentclass{book} \usepackage{amsthm} \usepackage{thmtools} \usepackage{suffix} \declaretheorem[numberwithin=chapter, style=plain,name=Theorem,refname={theorem,...
Linear Christmas's user avatar
9 votes
3 answers
502 views

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 ...
Vincent Krebs's user avatar
2 votes
2 answers
136 views

Macro factory, passing on star arguments

I want to define a set of macros, with similar behaviour but applied to different symbols. To avoid repetitions, I thought it would be a good idea to generate them programmatically from a template. I ...
Aubergine's user avatar
  • 252
2 votes
2 answers
80 views

Generate command definitions that take arguments

I want to define a command \NewSmartOp such that: \NewSmartOp \MYOP \myop would produce the following code (or anything equivalent): \makeatletter \def\MYOP{\@ifstar\MYOP@star\MYOP@nostar} \def\...
Maëlan's user avatar
  • 256
2 votes
1 answer
179 views

\pdfstringdefDisableCommands with starred and non starred commands

The following MCE: \documentclass{article} \usepackage{hyperref} \ExplSyntaxOn \NewDocumentCommand { \foo } { s m } { \IfBooleanTF {#1}{ Foo~ #2 }{ #2 } } \pdfstringdefDisableCommands{ ...
Denis Bitouzé's user avatar
1 vote
0 answers
137 views

Custom section style and corresponding starred command

I need to use a custom format for a conference paper. I am asked to redefine the section, subsection and paragraph headings by the following code in the preamble: \documentclass[a4paper,10pt,twocolumn]...
ggenovese's user avatar
1 vote
1 answer
172 views

Redefining \ref* along the lines of \ref to allow "local labels" in sections

I use the "local labels" hack from this answer to automatically prefix labels in order to be able to reuse the same labels in different places of the same document. Background: Why? There ...
CL.'s user avatar
  • 901
1 vote
1 answer
521 views

Show unnumbered sections anywhere in Beamer TOC

Section 10.5 of the LaTeX Beamer manual specifies the different options for generating a table of contents. One of them is: firstsection=⟨section number⟩ specifies which section should be numbered as ...
Mew's user avatar
  • 843
2 votes
3 answers
184 views

LaTeX3 - Test string equality + Star version

I'm looking for some good advice on switching from (La)TeX to LaTeX3 Here is the first questions corresponding to the toy code below. What is a good way to manage an optional argument with LaTeX3? ...
projetmbc's user avatar
  • 13.3k
3 votes
3 answers
178 views

Using Starred Version as Optional Argument

I have been reading this page on defining commands with *-options. I have got completely stuck, though. I'd like the following. A command with an optional argument and a star option. Optional ...
Sam OT's user avatar
  • 1,329
8 votes
1 answer
114 views

xparse's 's' argument returns \Gamma and \Delta, instead of \BooleanFalse and \BooleanTrue

The xparse documentation says, But that's not what I get when I test s. \documentclass{article} \usepackage{xparse} \NewDocumentCommand{\myfunc}{s}{#1} \begin{document} \myfunc % should return \...
mjc's user avatar
  • 745
0 votes
1 answer
67 views

Testing for \Foo vs \Foo*

This is a follow up to this post whose problem statement (roughly): create a macro that saves a macro and options (\includepdf[angle=90, scale=0.85]), such as to be able to invoke it later (presumably ...
Erwann's user avatar
  • 2,100
0 votes
1 answer
227 views

Redefine \includegraphics* (starred version)

I have this code: \setlength{\fboxsep}{0pt} \let\includegraphicsbak\includegraphics \renewcommand*{\includegraphics}[2][]{\colorbox{white}{\includegraphicsbak[#1]{#2}}} How can I make it work with ...
Gabriele's user avatar
  • 1,923
4 votes
2 answers
275 views

Alignment tab character inside a starred command within align

Here is a minimal example of what I want to do. \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\mylinebreak}{\@ifstar\@mylinebreak\@@mylinebreak} \newcommand{\@mylinebreak}{&...
Lawrence Wong's user avatar
1 vote
1 answer
755 views

\nameref not working with starred sections

I have an appendix in my document which I want to reference by its name in the text. I use the starred \section* command here, because I do not want the appendix to appear in the TOC. However, \...
s6hebern's user avatar
  • 297
3 votes
2 answers
207 views

How to define a starred custom gather new environment

I'm writing a file which I need the equations inside the gather environment to not be numbered. I was able to see the normal version (this answer, which works great: \newenvironment{Lgather}{\...
Bruno Andrade's user avatar
0 votes
1 answer
64 views

Starred chapter title with no chapter number in either toc or header

I am in the same situation as the author of How can I display a short chapter name in the header and a long chapter name in the TOC but, in addition, I also want the starred version for the Epilogue: ...
schremmer's user avatar
  • 2,107
0 votes
1 answer
271 views

Misplaced minitoc

I am struggling to use minitoc when I have a starred chapter before the TOC (that I want to appear in the TOC). In the following MWE, the minitoc of Chapter 1 appears under Chapter 2, despite I used \...
user avatar
0 votes
0 answers
45 views

Reference unnumbered starred header and titlesec [duplicate]

This is a follow up to this question: How to cross-reference an unnumbered section? My issue is that, in my document, I use the {titlesec} package. For some reason that package interferes with the ...
CyanideBaby's user avatar
1 vote
2 answers
121 views

Passing a star to lua

I hope this is a simple question, but I could not find documentation on it. Maybe I am searching for the wrong keywords. I want to pass a star * option to my lua code. I believe it is a boolean, ...
Bob's user avatar
  • 1,280
2 votes
1 answer
407 views

\parttoc does not appear when used in starred \part*

I am trying to create mini-ToC at the begenning of a part level utilizing minitoc package. It works fine for numbered \part, however, it is not rendered when using starred \part*. According to the ...
petrg's user avatar
  • 21
2 votes
1 answer
2k views

How to change the titlespacing of \chapter*{}?

I use this code to change the spacing of \chapter{}: \usepackage{titlesec} \titlespacing*{\chapter}{0pt}{-10pt}{15pt} How can I change the spacing of the starred version \chapter*{}? Here is an MWE:...
leonheess's user avatar
  • 350
0 votes
0 answers
138 views

Unnumbered centered part: linebreak in table of contents

I am working on a XeLaTeX “book” document, which is separated in two unnumbered parts. These two parts need to be entitled according to a “Title / Subtitle” scheme, with a linebreak as a separator ...
FRND's user avatar
  • 73
2 votes
4 answers
359 views

Definition of starred commands with `csname`

I want to define a command, let's call it \commander, for defining starred and non-starred versions of a new command. \commander would be called as follows: \commander[<options>]{\thenewcommand}...
lfba's user avatar
  • 731
2 votes
1 answer
58 views

Defining a command with star argument to be used in pdf strings (e.g. via \section)

I want to define a command with an optional star argument and be able to use it inside pdf strings, e.g. via \section. With the MWE below, I get a Token not allowed in a PDF string warning and \foo is ...
schtandard's user avatar
  • 14.9k
1 vote
1 answer
81 views

Starred version of macro causes hyperref error if used in section command

In the following MWE \documentclass{article} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[utf8]{inputenc} \usepackage[pdftex,unicode,final]{hyperref} \input{glyphtounicode} \...
nagmat84's user avatar
  • 1,115
0 votes
2 answers
117 views

Memoir: How to make `\newfootnoteseries` with multiple paragraphs?

I have two levels of footnotes, one for regular footnotes and one for special editor's footnotes. I would like to put a longer text in an editor's footnote with two paragraphs, however this does not ...
meide's user avatar
  • 1,165
0 votes
1 answer
1k views

How to refer to a subsection of a starred section?

In How to \label-\ref an un-numbered section, Nathan Grigg pointed out that one could use the \hyperref commmand to create a link to a starred section as follows \documentclass{article} \usepackage{...
schremmer's user avatar
  • 2,107
5 votes
3 answers
162 views

How keep macro with \csname from gobbling up starred argument?

For purposes more involved than what's shown here, I want to test certain commands having both an ordinary form and a starred form, with the latter constructed using the suffix package. To do that, I ...
murray's user avatar
  • 7,964
4 votes
3 answers
2k views

How center the chapter* titles

I want center the title "Preface" and "Abstract" only. I do not want to centralize all the chapters. I can not and I should not delete any bookstore, I need all the libraries. \documentclass{book} \...
information's user avatar
  • 1,075
3 votes
1 answer
177 views

How to redefine a command in terms of its starred variant?

I am writing a lab report for a class. I want to redefine \section so that \section{Analysis} has the same output that \section*{\centering Analysis} would normally have. I tried \renewcommand{\...
MathIsFun7225's user avatar
2 votes
1 answer
252 views

Why is this \@ifstar construction not working, when both constituent \cline-like macros work?

I have a macro that makes a \cline of user-specified thickness. I want to create a * and un-* version to account for the difference between two cases depending on whether there is more than one \cline ...
Jim Ratliff's user avatar
  • 1,049
1 vote
1 answer
281 views

Incorrect bookmark level for unnumbered section when added to the table of contents

Following this solution, I have been able to successfully add an unnumbered chapter to a table of contents (ToC) and italicise the font. However, my unnumbered chapter consists of unnumbered sections, ...
Adam's user avatar
  • 157
1 vote
1 answer
155 views

How can I change the footer of an unnumbered chapter inserted after a numbered chapter or an appendix?

Thank you all for your time, I just began to use LaTeX and this website so forgive me if my question has already been made, but I've searched a bit and didn't found anything that works for my ...
Edoardo Serra's user avatar
4 votes
1 answer
428 views

Unable to use display math inside starred enumerate: Missing $ inserted / Bad math environment delimiter

Trying to use display math \[ \] inside a starred enumerate* environment gives an error Bad math environment delimiter or Missing $ inserted. I can imagine this is by design, and that the idea ...
Bart Michels's user avatar
  • 1,298
5 votes
1 answer
97 views

Starred macro with delimited arguments?

My goal is to define a starred and a non-starred version of a macro \foo that will be called as \foo arg {actual argument} or \foo* arg {actual argument}. So I tried the following: \makeatletter \...
dow's user avatar
  • 648
54 votes
1 answer
23k views

What is the difference between a figure environment compared to a figure* (figure star) environment

It is hard to search for this question since most search engines treat the * symbol somehow special, so sorry if that has been asked before. So, basically, I just would like to know what the ...
Markus Weninger's user avatar
4 votes
1 answer
127 views

Are mode/overlay specifications supported by Beamer for starred sectioning macros?

Are mode/overlay specifications unsupported by Beamer when used with the starred versions of sectioning commands? I ask, because I have code which (I am pretty, though not completely, sure) did work ...
cfr's user avatar
  • 199k
2 votes
1 answer
985 views

Error while using table* with XePersian package

When I use table* while having XePersian package, I get this error: Incomplete \iffalse; all text was ignored after line 10. A sample that returns this error is this one: \documentclass[12pt,...
01000110's user avatar
  • 235
4 votes
1 answer
502 views

How do I construct a command name containing a star?

I defined the following command: \NewDocumentCommand \displayls {s m}{% \IfBooleanTF{#1}{\textls*[250]{#2}}{\textls[250]{#2}}% } I would like to refactor the definition to remove the duplication. ...
Reuben Thomas's user avatar
1 vote
1 answer
1k views

How to make beforeskip and afterskip of chapters different from those of starred chapters in KOMA-Script's scrreprt?

I want to make chapters and starred chapters to have different beforeskip and afterskip. In other words, my abstract and bibliography shall have more beforeskip (about 1\baselineskip} than numbered ...
M. Ridha Siregar's user avatar
20 votes
5 answers
4k views

Using \@ifstar to define a star variant

Why does the following not work at all? \documentclass{article} \makeatletter \newcommand{\foo}[1]{\@ifstar{\textbf{#1}}{\textit{#1}}} \makeatother \begin{document} \foo{test} \foo*{test} \end{...
Tae Hyung Kim's user avatar