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

learn more… | top users | synonyms

11
votes
1answer
318 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} ...
3
votes
1answer
468 views

Statecharts using TikZ

I haven't found any example of using TikZ for drawing Harel's statecharts notation. There are numerous examples of finite-state automata, but that cannot be applied for statecharts for two reasons: no ...
5
votes
1answer
145 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 ...
2
votes
0answers
46 views

Escape hash symbol (#) in inner macro definition [duplicate]

Possible Duplicate: What is the meaning of double pound symbol (##1) in an argument? I'm quite sure this question has been asked many times but I can't find the answer. I'd like to make a ...
7
votes
1answer
150 views

How to allow correct environment nesting when the environment definition involves labels?

The code below shows an improved version of the code provided in this answer to Mark (highlight) a paragraph (\item{...}) with a squiggly line for later attention. The environment tikzborder uses a ...
5
votes
1answer
305 views

Trouble with nested tables

I am using nested table environments in the following snippet: \begin{document} \noindent \begin{tabularx}{\textwidth}{rX lX} COURSEWORK & Machine Learning, Probabilitistic Learning, ...
7
votes
1answer
597 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 : ...
16
votes
3answers
689 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 ...
4
votes
3answers
341 views

Question about enumitem, suspend/resume enumeration, last item of list, nested list

How do I suspend / resume an item of a list, multiple levels, if it is the last item of the list? \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate} \item first ...
4
votes
1answer
553 views

External margins of embedded newmdenv environments

In the code: \documentclass{article} \usepackage[framemethod=default]{mdframed} \newmdenv[backgroundcolor=red]{tBox} \newmdenv[leftmargin=1cm,linecolor=blue]{aBox} \begin{document} ...
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 &= ...
3
votes
1answer
291 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 ...
1
vote
1answer
308 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 ...
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 ...
7
votes
3answers
2k views

Passing arguments to nested newcommands

I thought that doubling hashes was sufficient to pass arguments to nested \newcommand. \newcommand{\notice}[1]{ \vspace{10px} \textbf{#1:} \begin{quotation} ##1 \end{quotation}} ...
18
votes
1answer
374 views

Three quotation levels for csquotes

The recommended way of solving nested quotations in Norwegian is to use «» for the outer level and then alternating between ‘’ and “”. (Source) Is it a large undertaking to do this with csquotes?
6
votes
1answer
368 views

How to achieve nested alignment of formulas?

I'm trying to get a nested alignment in math mode: +----------------------------------------------------------------+ | ..... & ................ | | ...
6
votes
1answer
531 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 ...
7
votes
1answer
271 views

Defining inside an \edef

The following throws an "Undefined control sequence" error: \edef\testa{\edef\testb{foobar}\testb} when it gets to expanding \testb. This problem is also mentioned in "TEX by Topic" 12.6.2. But no ...
2
votes
2answers
431 views

enumitem nextline style: nested item shouldn't start on description label's line

I use enumitem description style nextline to emulate a sort of TOC entry with the following code: \documentclass{article} \usepackage{enumitem} \newenvironment{DLdescription}[1][*]{% ...
7
votes
3answers
456 views

Nested \loop macro

Please are there 'nestable' variants of Knuth's favourite looping macro \loop without the brace-scope introduced in the answer at nested loops. I am developing a package called loops, where I am ...
5
votes
0answers
68 views

How to have nested mdframes with different frame titles [duplicate]

Possible Duplicate: mdframed nested frametitle bug This issue is fixed in version 1.6b mdframed at github It seems as if the frame title used in the mdframed environment can only ...
6
votes
1answer
207 views

Nested endnotes

How can one include an endnote within another endnote? The desired output would be one endnote structure with all endnotes appearing in the order in which they are invoked (i.e., a nested [child] ...
5
votes
1answer
766 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 ...
7
votes
3answers
1k views

Tikz - How to nest nodes in a matrix so they can be connected?

I want to make a matrix which has multiple nodes in a single matrix cell. These nodes should be centered to each other. I managed to make this work by using a nested tikz environment like so: ...
6
votes
1answer
253 views

How to align mdframed inside another frame?

I tried to create a child frame inside a parent frame by mdframed as \documentclass{article} \usepackage{mdframed} \usepackage{lipsum} \begin{document} ...
12
votes
1answer
786 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 ...
5
votes
1answer
573 views

Nested enumerate list, Page breaks

I am currently writing a multiple choice exam: There is a enumerated list for the question number and then a nested list for the choices within each multiple choice question: 1. Question 1 a) ...
8
votes
1answer
944 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 ...
9
votes
3answers
275 views

How to check proper nesting of heading levels

How can we check that heading levels in a LaTeX file are coming in sequence, i.e., \section, \subsection, \subsubsection, \paragraph and \subparagraph. How to catch if \section is followed by ...
4
votes
2answers
651 views

Getting started with TeX - my first table (a nested table)

I am brand new to LaTeX, and I am trying to create a LaTeX string to create a report with a known format. I will be inserting my LaTeX string into an A4 page in a scribus document. Accoring to the ...
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 ...
5
votes
1answer
1k 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 ...
4
votes
2answers
555 views

Nested labeled colored boxes with TikZ

I need nested boxes, as they are shown in this question, but colored ones. I tried both solutions. Using shapes.multipart I totally failed when tried to generate the nodeparts by a foreach command. ...
6
votes
1answer
142 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, ...
10
votes
3answers
358 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 ...
4
votes
3answers
209 views

Environments nested in Lists

I have a list with several items consisting solely of an align environment: \begin{enumerate} \item \begin{align} e^{\pi i} + 1 &= 0\\ 1 + 1 &= 2 \end{align} \end{enumerate} By default, ...
4
votes
1answer
428 views

Proper margins in custom enumeration/itemize environements

I am using two custom list environments (itemize-compact and descriptionhang), which work fine on their own, but not when I nest them. Please consider this MWE: \documentclass[a4paper]{article} ...
2
votes
0answers
1k views

Too deeply nested (itemize) [closed]

So I'm writing this summary for a lecture and I am using itemize a lot. The problem I get now is the two times the error (NB: \bi is my alias for \begin{itemize}) ! LaTeX Error: Too deeply ...
37
votes
1answer
1k 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 ...
3
votes
1answer
453 views

Vertical alignment of tabulars nested in longtable

I tried to nest tabulars in a longtable enviroment. The content of the tabulars is still at the bottom of each row. \begin{longtable}[c]{p{153mm-2\tabcolsep}p{37mm-2\tabcolsep}}\hline ...
8
votes
2answers
1k views

Tikz fit-library vs fill (overlaying nested node colors)

I am trying to figure out the best way of nesting tikz nodes having a different background color. I would like the "inner" nodes to "win" concerning the background color. Currently the "outer" node ...
7
votes
2answers
167 views

why aren't the \left and \right before my parentheses changing their size?

I am working on a document, and in only one case have the \left and \right before my parentheses seemed to do anything. For example, I have this equation: \begin{equation} \mathbb{E}(RS_{nd}) = ...
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. ...
2
votes
1answer
303 views

Nested custom theorems using amsthm

I am having trouble nesting custom theorem environments in such a way that the inner environment does not inherit the characteristics (e.g. HEADFONT, etc.) of the outer environment. Possibly the ...
2
votes
1answer
1k views

Vertical alignment with nested tables

It's almost embarrassing to ask: How can I vertically align the contents of one column to the top beside a second column holding nested tables. Please have a look at the minimal working example: ...
15
votes
2answers
14k 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 ...
15
votes
1answer
474 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 ...
5
votes
3answers
1k views

Have verbatim code as an equation

I have a little snippet of program code / input that needs to be rendered with the exact layout as typed in (verbatim). Is it possible to have this as an equation? I tried to nest the Verbatim ...
9
votes
1answer
155 views

Is there a package to differently color nested expressions in the output?

Say I have an expressions like $(\sin(x-3(z^{(x-2)^2}))+1)^2$ with many nested expressions. To better visualize this in the output (and to help finding missing delimiters when proof-reading) I'd like ...