Questions tagged [starred-version]

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

Filter by
Sorted by
Tagged with
2 votes
2 answers
54 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\...
user avatar
  • 216
1 vote
1 answer
37 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{ ...
user avatar
1 vote
0 answers
53 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]...
user avatar
1 vote
1 answer
104 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 ...
user avatar
  • 791
1 vote
1 answer
100 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 ...
user avatar
  • 273
1 vote
3 answers
102 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? ...
user avatar
  • 11.5k
3 votes
3 answers
79 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 ...
user avatar
  • 1,157
8 votes
1 answer
96 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 \...
user avatar
  • 715
0 votes
1 answer
57 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 ...
user avatar
  • 1,870
0 votes
1 answer
76 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 ...
user avatar
4 votes
2 answers
120 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}{&...
user avatar
0 votes
0 answers
100 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, \...
user avatar
  • 277
3 votes
2 answers
127 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}{\...
user avatar
0 votes
1 answer
54 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: ...
user avatar
  • 1,975
0 votes
1 answer
87 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
  • 125
0 votes
0 answers
42 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 ...
user avatar
1 vote
2 answers
90 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, ...
user avatar
  • 1,200
1 vote
1 answer
210 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 ...
user avatar
  • 11
0 votes
1 answer
750 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:...
user avatar
  • 330
0 votes
0 answers
135 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 ...
user avatar
  • 63
2 votes
4 answers
254 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}...
user avatar
  • 701
2 votes
1 answer
45 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 ...
user avatar
  • 12.7k
1 vote
1 answer
60 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} \...
user avatar
  • 1,025
0 votes
2 answers
104 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 ...
user avatar
  • 969
0 votes
1 answer
567 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{...
user avatar
  • 1,975
5 votes
3 answers
115 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 ...
user avatar
  • 6,557
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} \...
user avatar
  • 1,035
3 votes
1 answer
108 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{\...
user avatar
2 votes
1 answer
214 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 ...
user avatar
1 vote
1 answer
195 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, ...
user avatar
  • 157
1 vote
1 answer
97 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 ...
user avatar
4 votes
1 answer
253 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 ...
user avatar
  • 1,248
5 votes
1 answer
88 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 \...
user avatar
  • 628
35 votes
1 answer
14k 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 ...
user avatar
4 votes
1 answer
82 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 ...
user avatar
  • 184k
2 votes
1 answer
817 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,...
user avatar
  • 215
3 votes
1 answer
308 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. ...
user avatar
1 vote
1 answer
663 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 ...
user avatar
17 votes
5 answers
3k 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{...
user avatar
3 votes
1 answer
107 views

Patch starred environment and use it as nested environment in a new environment

For every (most?) environment \begin{X}...\end{X} there exists the macros \X and \endX that can be used inside the \newenvironment command. I.e, one can write something like this \newenvironment{Y}{\...
user avatar
  • 1,025
3 votes
1 answer
311 views

How to pass starred command to \fp_eval:n

I would like to define a command that has a starred version and pass it to \fp_eval:n for some calculations. However, regardless of whether I use the starred or the regular version, I get the error ...
user avatar
1 vote
1 answer
103 views

math accent before starred macro, with unicode-math or without amsmath

I have a macro \makebold which takes a star and a shortcut \aaa. I'm trying to use \aaa after \bar to produce a barred, bold letter. \documentclass{standalone} \usepackage{xparse, unicode-math} \...
user avatar
  • 398
1 vote
2 answers
471 views

Why does redefining \contentsname conflict with redefining \section when there is a \tableofcontents?

I am trying to modify the title of table of content and make every title of sections uppercase. But strange compilation errors occurred. The .tex file looks like the following one: \documentclass{...
user avatar
  • 121
4 votes
3 answers
887 views

Defining a double star (**) for theorem environment

This is a follow-up question of QED symbol after statements without proof, and I am really not sure whether this is the right approach to solve the problem raised there. But it seems to solve all ...
user avatar
  • 505
1 vote
1 answer
961 views

Prevent page break after multicols star environment

multicols environment of multicol package produces page break in starred version. How can we prevent this page break? \documentclass{book} \usepackage{amsmath,amssymb,amsthm} \usepackage{multicol} \...
user avatar
  • 1,683
1 vote
1 answer
114 views

How to change sections numbering in starred chapter without changing document class?

My report starts with a starred chapter "Introduction". My problem is with sections' numbers. They all start with 0, so I get 0.1, 0.2 and 0.3 as shown below. I need to delete zeros and keep only 1,2 ...
user avatar
4 votes
2 answers
1k views

\vspace* (star) moves text above it

\documentclass{article} \begin{document} aaa \vspace*{100cm} bbb \end{document} I would expect aaa to be placed at page one, then to see 100cm of white space (distributed over many pages) and ...
user avatar
  • 441
3 votes
2 answers
120 views

PDF plain text for a macro with a starred version

I'm typesetting a document with PDFLaTeX. In some section titles, I use a macro which has a starred version. In the PDF index (the table of contents that PDF viewers typically show in a side pane), I ...
user avatar
15 votes
4 answers
2k views

Defining a command to define an asterisk command

I have the following command \defmeta that defines two other commands (one starred and one unstarred) \documentclass{article} \usepackage{suffix} \newcommand{\genericcmd}[3]{#1 #3 #2 } \newcommand{\...
user avatar
  • 1,533
1 vote
1 answer
247 views

Patching \l@part macro for TOC view

I have patched the standard book class macro \l@part for desirable view. I wish to add some word to the place (in code below) if macro \part unstarred, and do not add anything, if \part* . It is ...
user avatar
  • 5,006