{optional-arguments} concerns commands and environments that accept optional arguments. For example the \sqrt command can be used as \sqrt[3]{x}.

learn more… | top users | synonyms

5
votes
0answers
72 views

How to tell LaTeX to throw a warning if argument is not being used?

In this question the given argument wasn't used, because #1 was missing.. One would actually assume an error or a warning be thrown. A little MWE based on 1: \documentclass{article} \usepackage{...
2
votes
0answers
83 views

Autocomplete in TeXstudio for macro with optional argument

I have a macro, such as \newcommand*{\example}[2][]{#1.#2} defined. TeXstudio adds this to its autocomplete list, which is great, but when I actually autocomplete it shows up as \example{arg1}{...
2
votes
0answers
50 views

titlesec extra arguments to sections

Is it possible to add extra arguments to a modified section environment using the titleformat command of the titlesec package? For example, that the section color appears as red when doing \section[...
1
vote
0answers
39 views

Passing optional arguments to a listing environment based on conditionals

I am trying to make a presentation which can optionally compiled for handouts. This presentation also contains highlighted code snippets. For highlighting I use the code from this question. (Which ...