Linked Questions

5
votes
1answer
871 views

natbib citep[]{} error if used in theorem options [duplicate]

I am using natbib and amsthm. If I use \citep[Thm. 4.5]{key} in the options of my theorem environment I get the error: Argument of \NAT@@citetp has an extra }. \begin{thm}[\citep[Thm] Why can't I ...
4
votes
1answer
96 views

Russian matryoshka doll of optional arguments [duplicate]

Why this not work. I suspect an expansion problem ... \documentclass{standalone} \newcommand{\foo}[1][foo]{#1} \newcommand{\Fbox}[1][bla]{\fbox{#1}} \begin{document} \Fbox[\foo[bla]] \end{...
0
votes
0answers
245 views

Scaling a graphics leads to an error [duplicate]

I have the following problem: I want to attach a photo in my resume on the right top. If I not use a scale argument, the file compiles but the photo is to large. However using a scale argument leads ...
0
votes
0answers
222 views

Using math expression in short caption for listoffigures [duplicate]

\documentclass[12pt,a4paper]{article} \usepackage{amsmath} \begin{document} \listoffigures \[ \{[\phi(t+h),p(t+h)]_2\} \] \begin{figure}[htb] \centering something here \caption[math $x+...
0
votes
0answers
73 views

Indexing and \footcite prenotes [duplicate]

I am indexing a big latex project (with xindy). I use biblatex for the bibliography and the command \footcite for the references. Sometimes, I write long prenotes which contain some words to be ...
1
vote
0answers
52 views

lipsum as a caption for subfloat [duplicate]

Consider this script: \documentclass{report} \usepackage{subfig} \usepackage{graphicx} \usepackage{lipsum} \begin{document} \begin{figure}[htp] \subfloat[\lipsum[1]]{ \includegraphics{example-...
0
votes
1answer
25 views

Why does “displayquote” break when citing with an optional argument and how to fix it? [duplicate]

If you use the optional argument of “displayquote” from “csquotes” it breaks the “displayquote” environment's optional argument, where you are supposed to put in a cite text. This is really not a ...
39
votes
1answer
3k views

] inside an optional argument

I accidentally discovered (here) that a closing square bracket within an optional argument delimited by [ ] can cause problems. Here is example code illustrating the issue: \documentclass{article} \...
6
votes
1answer
974 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 ...
7
votes
2answers
260 views

How do I nest a command with an optional argument?

I'm having problems making a normalizer command that can nest. Here is my code so far: \documentclass{article} \newcommand{\nrml}[2][]{N_{#1}(#2)} \begin{document} $\nrml[\nrml{H}]{J}$ \end{document}...
1
vote
1answer
2k views

Trouble with displayquote and page numbers for citations

I have a problem trying to get a citekey to work properly in a blockcitation. I have a nested file setup via the subfiles package and using csquotes to generate the block quote as follows: In the ...
3
votes
1answer
541 views

Flexible \IfStrEqCase statement

I am trying to use xstring's \IfStrEqCase to switch between cases. It seems to work fine except for the case where the parameter for the switch is a macro with an optional parameter: \MySwitch{$\...
2
votes
1answer
496 views

Scaling molecules on top of arrow with chemfig

i've a problem with chemfig-package. I want to draw some mulecules above an \arrow{-U>}, but i can't scale them in the right way. Does anybody has an idea to work around or do I just made a mistake?...
0
votes
1answer
60 views

lipsum as caption

The following fails to compile: \documentclass{article} \usepackage{lipsum} \begin{document} \begin{figure} \caption{\lipsum[1]} \end{figure} \end{document} giving the following error: ! Argument ...
0
votes
1answer
34 views

BibTeX: Square brackets in author's name

Consider the following BibTeX entry (I think it was downloaded from ScienceDirect) @article{busoniu2018, author = {Lucian Bu{\c s}oniu and Tim [de Bruin] and Domagoj Toli{\'c} and Jens Kober and ...