# Linked Questions

27 questions linked to/from ] inside an optional argument
1answer
1k views

### Using square bracket inside square bracket [duplicate]

I have a two-column layout, and I want to put a specific section with images to span the whole page width. So I use: \twocolumn[ ... ] So far, so good. However, when I want to include anything in ...
1answer
2k views

### Square brackets in in the `description' of the theorem environment [duplicate]

The following code works fine \begin{theorem}[Euler] Blah \end{theorem} But whenever I try to use square brackets in the description I get an error. \begin{theorem}[The set $[0, 1]$ is compact] ...
1answer
728 views

### How to temporarily disable a comment delimiter when using listings [duplicate]

In the preamble of my document, I put the following command to allow strings wrapped with < and > printed as italic-styled comment: \lstset{morecomment=[s]{<}{>},commentstyle=\rmfamily\...
1answer
169 views

### Issue Passing an Optional Argument through Theorem Name with thmtools [duplicate]

I am using thmtools to create theorems, and I sometimes want the theorem name to include math symbols. In this particular project, I have used xargs to create a command that uses an optional argument, ...
1answer
96 views

0answers
28 views

### Why do I get an "extra }" error when using a default argument in a theorem name? [duplicate]

Consider the following latex code: \documentclass{article} \usepackage{amssymb} \usepackage{amsthm} \newtheorem{thm}{Theorem} \newcommand{\Zn}[1][n]{\mathbb{Z}_{#1}} \begin{document} $\Zn[p]$ \...
0answers
26 views

### Problem with IfStrEqCase? [duplicate]

I am using \IfStrEqCase to choose between various options within an environment. In the MWE below, if the line with the actions to be performed for any non-recognised option (\ifqsbreak{}.....\fi) is ...
0answers
16 views

### Alternative section title using multicol [duplicate]

Compiling the following documents throws an error: "! Paragraph ended before \@sect was complete." I just want to add an alternative name to the table of contents and have no idea why this should be a ...
0answers
10 views

### Error when citing definitions [duplicate]

I'm looking to cite the source of a definition, but there seems to be a bug. An example of something I'm looking to type: \begin{definition}[\cite[Definition 1.4.2]{Hilbert10}] content \end{...
2answers
2k views

### Stringified commands to macros sequence [closed]

First, what is the proper terminology for a "string" in TeX/LaTeX that is an argument for a macro? e.g., \macro{somestring} Obviously somestring is a token, set of tokens, string, argument, etc. I ...
2answers
6k views

### LaTeX: optional arguments with square brackets

LaTeX is trying to add a missing \$ that I don't want to the following code. Minimal working example: \documentclass[letter,12pt]{article} \newcommand{\monkeyBeans}[2][]{ \parbox{4in}{#1} } \begin{...
1answer
1k views

### Bug? LaTeX misparses nested optional arguments

LaTeX seems to be having problems handling nested optional arguments. I've included a minimal code example that generates the error: \documentclass[12pt,oneside]{book} \begin{document} \newcommand{\...
3answers
205 views

### Macro to be used in a \section command that has no effect in the table of contents

I need a macro that is executed only in the main document (within a section title) and then disappears (for the table of contents). A minimal example where this occurs is this: \documentclass[12pt]{...

15 30 50 per page