{nesting} is about nesting document elements. Use this tag in addition to other tags specifying what should be nested.

learn more… | top users | synonyms

41
votes
1answer
2k views

What is the meaning of double pound symbol (##1) in an argument?

I've seen sometimes that people use a double pound sign (##) when defining/using arguments. What is the difference between the normal argument, #1, and the double sign one, ##1? Are there any ...
26
votes
4answers
1k views

Why do arguments to nested \tilde or \breve commands reappear when amsmath is used?

On LaTeX-Community.org I've noticed a strange problem with nested \tilde and \breve commands, when amsmath is used. In this code the X appears also in the output of the second and the third formula: ...
5
votes
1answer
2k views

How to typeset a TikZ picture inside a node?

The contents of a node are drawn in text mode. Is there a way, short of introducing a tikzpicture environment, to draw a picture inside a node? Nesting tikzpicture environments is problematic, also ...
12
votes
1answer
353 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} ...
16
votes
2answers
1k views

Proper nesting of tikzpicture environments: Reset all PGF values to their defaults

Sometimes, nesting tikzpicture environments seems inevitable, e.g., if you want a node to contain a TikZ picture on its own. (Is it?) However, nesting tikzpicture environments is problematic, also ...
9
votes
2answers
2k views

How to nest a graph within a node in TikZ and draw edges between the graphs?

I'm trying to draw a graph and have a separate graph within one of the outer nodes. I seen this question, but I don't understand how the matrix nodes will help me. I would also like to draw edges ...
16
votes
2answers
2k views

tikz: a big box with fixed width containing smaller boxes

I want to render with tikz something like : The surrounding big box should behave somehow like a minipage : the width is fixed, and the height should grow if we add sufficiently small boxes inside. ...
16
votes
3answers
865 views

How do you end with a single quote followed by a double quote?

I have a paragraph as follows: ``This is a quote. `Here is a quote within a quote.''' But the formatting works out to be a double quote (") followed by a single quote (') instead of the other way ...
8
votes
2answers
991 views

Expandable Nested Boxes with TikZ

Could someone please post a minimal tikz example to draw this: I am currently doing this with nested tables, but would like to see how it can be done with tikz. The nodes would ideally have a ...
16
votes
2answers
772 views

How to align nested cases?

Please consider the code bellow: \begin{align*} function = \begin{cases} case1 &\mbox{if } n = 0 \\ \begin{cases} case2 &\mbox{if } n = 1 \\ ...
20
votes
2answers
1k views

Footnote to a footnote

How can I make a footnote to a footnote? E.g., Playfair's axiom\footnote{so called in honor of mathematician John Playfair, etc, etc., but was actually discovered by Proclus\footnote{Greek ...
11
votes
2answers
795 views

Nested standalone files with standalone package

Is it possible to nest files with the standalone package? I have something like the following: In A.tex: \documentclass{article} \usepackage{standalone} \begin{document} \input{B} \end{document}​ ...
6
votes
1answer
566 views

Nested enumerate (enumitem) interferes with suppressing vertical space after theorem heads.

In the post How to suppress vertical space between theorem heads and enumitem environments? David Carlisle suggested a piece of code that helps suppressing vertical space between theorem heads and an ...
1
vote
1answer
329 views

How to suppress vertical space between proof environment heads and itemize environments?

The user 'egreg' recently helped me to suppress vertical space between theorem heads and enumitem environments (such as itemize; see the link below). I now have a similar problem: When a proof ...
3
votes
2answers
2k views

In LyX, how to have itemize inside a proof?

LyX is great. I use it to write everyday documents. But it seems that its environment can only have one type; different types of environments can't be mixed. For example, you can't have itemize inside ...
12
votes
1answer
912 views

Nesting command definitions more than two levels

How do you access macro arguments if the macros are nested by more than two levels? To explain it in more detail: Creating a new command in another command (nesting command definitions), it is ...
10
votes
3answers
379 views

Adjust environments's behaviour when nested

I would like to define an environment which behaves differently when it is nested. This environment should ignore spaces at the begin and end of the environment. I have this working as I desire when ...
8
votes
1answer
1k views

Nesting “tikzpicture” within “tikzpicture” elements - Good or bad practice?

I often nest a tikzpicture within a tikzpicture element, such as a node, to treat subparts as unity and then place it as such relative to other parts of the picture. However, I'm wondering whether it ...
2
votes
2answers
4k views

How to nest tables?

I want to make a table inside another table as follows. Unfortunately, it does not work. What is wrong with it? \documentclass{minimal} \usepackage{array,longtable,calc} \begin{document} ...
7
votes
1answer
124 views

A follow-up question to: A five level deep list

The solution to A five level deep list implemented an enumerated list that extended to 9 levels of nesting. However, references to nested labels do not list the extended nesting position. I have ...
7
votes
2answers
318 views

Biblatex: nested citations with the \textcites command

I'd like to type a citation within the text and another citation inside the parenthesis for the year, something like this: The work of Author 1 (year; cited by Author 2, year) For this, I've ...
15
votes
1answer
3k views

Nested enumeration numbering

I write homework assignments in LaTex and the assignments are always divided into subparts (i.e. Problem 1 is divided into 1.1, 1.2, 1.3, ...). Currently what I do is I have nested enumerations, but ...
17
votes
3answers
695 views

Is there any difference between nesting \label in \caption and putting \label outside \caption?

Is there any difference in behavior between the following coding styles? Coding style A: \caption does not enclose \label. \begin{figure} \includegraphics{cat.eps} \caption{This is a cat.} ...
6
votes
2answers
2k views

Alignment across nested aligned environments

I have a list of equations with annotations like the one below: \documentclass{scrartcl} \usepackage{amsmath} \begin{document} \begin{align} aaaa &= 1 &&\text{for $X$} \\ bbbb &= ...
15
votes
3answers
610 views

Redefine command when inside a specific other command possible?

How, in general, can I (re)define commands based on in which other command they are nested? A more specific example: I have a custom latex command (say, \code{}) that makes text appear bold. ...
12
votes
1answer
901 views

Infinite-depth list

I want to create a command set that allows me to do something like \nestedlist{ \listitem An item \sublist{ \listitem A sub item \listitem Another sub item } } and get An item 1.1 A ...
11
votes
1answer
275 views

New list environment: automatic enumeration with “a posteriori” format

This is a follow-up question to Nested enumerate labels with parent label appended plus a single set of enclosing parentheses First and foremost, sorry for my English, I'm learning it currently. ...
10
votes
2answers
372 views

Nested enumerate labels with parent label appended plus a single set of enclosing parentheses

I want to have a list like (1) foo (1.1) foo (1.2) foo (2) foo I am using the package enumitem and \begin{enumerate}[label=(\arabic*)] \item foo \end{enumerate} I know that i can append ...
9
votes
2answers
723 views

Using an environ environment with \newenvironment

I want to use an environment defined with NewEnviron from environ in another environment definition: \documentclass{article} \usepackage{environ} \NewEnviron{inner}[1]{% \textbf{#1:} \BODY } ...
16
votes
2answers
16k views

How to change the nested itemize bullet characters?

When creating a nested itemize environment in LaTeX as follows: \begin{itemize} \item one \dots{} \begin{itemize} \item Language Models \item Vector Space Models ...
8
votes
1answer
2k views

Handling quotes inside quotes in a bibliographic field

I have an entry in my bib file of the form @conference{abc, author = "Some name", title = ""This is inside quote" and outside quote content", . . . } when I check this entry through jabref, I get ...
8
votes
3answers
2k views

Take 2: How do automatic overlay specifications work in Beamer (in a nested situation)

I had previous asked a question about this, but I feel that it wasn't focused enough and the answers got a little confused...so instead of editing that question, I've opted to start a new one....I ...
6
votes
1answer
857 views

csquotes and nested citations

It looks like the csquotes package does not allow nested citations such as \foreignblockcquote{foreign language}[pre-note] [post-note with citation \textcite{key2}] {key1}[punctuation]{quoted ...
4
votes
2answers
342 views

Are three boxes inside a box possible?

I am making a yes or no question inside a box and I have difficulty on creating the command for it. Would you mind to help me make something that will output this:
3
votes
1answer
182 views

Circling/framing and referring to a bunch of nodes

The end goal: drawing paths between nodes like in the example there but the difference is the nodes are inside a picture here and in particular, the other node is a bunch of nodes in the same picture. ...
15
votes
1answer
514 views

Footception: Footnote within a footnote within a footnote

Inspired by the question Footnote to a footnote (where it was asked if one could have a footnote reference in a footnote), I'm asking something a bit more complex. Before I ask though, let me prefence ...
10
votes
1answer
1k views

biblatex: Enhancing \autocite in case of would-be nested footnotes

This question led to a new feature in a package: biblatex biblatex provides high-level citation commands like \autocite that allow "global switching from inline citations to citations given in ...
7
votes
1answer
700 views

How to adjust brace size for nested braces?

How can I adjust the size of the outer braces to make the following equation neater? \documentclass[a4paper]{scrreprt} \usepackage{amsmath} \begin{document} \[ M = \left\{ x \in X : ...
6
votes
1answer
152 views

Nested parameters lost when generating new macros from package options

I've created a package which I would like to take in options and turn these into new macros (one new macro for each option). I also want these new macros to produce new macros in turn. For example, ...
5
votes
1answer
151 views

Increasing nesting level for parameters and global xparse macros?

This is kind of a double question but closely connected in my case. Inspired by http://tex.stackexchange.com/a/55769/14159 I tried to make an improved version which allows additional parameters for ...
5
votes
3answers
2k views

nested enumeration, skipping items

How can I do a nested enumeration with item being skipped, like this: 1) Level 1 A) sublevel A i) sublevel i a) sublevel a 2) Level 1 [here are the skipped \item] a) sublevel a b) ...
5
votes
3answers
861 views

Tex Nested Loops

I am trying to write a simple nested loop in LaTex, without using any special packages, using only the \loop...\if... \repeat syntax. I think I may be lacking a basic understanding of the rules for ...
4
votes
2answers
127 views

Nesting custom `xparse` environments

I've defined two simple environments with xparse. Problem is when I try to nest todominute environment inside minutes environment: \documentclass[a4paper, 10pt]{article} \usepackage{polski} ...
3
votes
1answer
312 views

Align inside align

I have a list of equations with annotations like the one below: \documentclass{scrartcl} \usepackage{amsmath} \begin{document} \begin{align*} aaaa &= 1 &&\text{for $X$} \\ bbbb ...
3
votes
3answers
998 views

Problem with nesting environments

I have a problem with nesting environments. I have created a MWE for this. I have environment {env1} which I want to contain environments {env2} and {env3} in the following way. What's wrong with the ...
1
vote
1answer
108 views

Drop shadow of node with pgfplot inside

I have this code: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{shadows} \begin{document} \begin{tikzpicture} \node[drop shadow,draw,fill=green] { \begin{tikzpicture} ...