Tagged Questions
10
votes
1answer
61 views
How can I detect if an environment is right after a sectioning command?
I'd like to build an environment that would detect if it is right after a sectioning command (\section, \subsection or \subsubsection) and smart enough to detect if a float-type environment (say ...
6
votes
3answers
76 views
How to adjust a counter depending on whether or not we are inside a section or subsection
I want to create an exercise environment that can be used in either section, subsection, etc. As an illustration, consider the following:
when in section 1, the third example should be titled as ...
2
votes
1answer
44 views
System: XeLaTeX, Circumstance: Automation, PROBLEM: error message “missing \item”
I am currently generating PDF's with variable contents from a template I made. Data is fetched from a database and used to create reports. This has been working greatly until recently I needed to ...
2
votes
1answer
73 views
Strange chapter influence on quotation environment
The code below give a strange result when I comment out the \begingroup end \endgroup: the quotation environment has different vertical space to the text before ("Some text").
What is it that chapter ...
5
votes
1answer
70 views
Problem setting lengths in an environment (spilling outside of the environment)
I am having with spacing between paragraphs in my document, and I think I have been able to trace back to a custom environment I have defined.
\makeatletter
\def\remarkname{Remark}
...
6
votes
1answer
158 views
Custom environment move to end of chapter
I have written a custom example environment for formatting mathematical worked examples. These are currently included in the sections they are related to, however are sometimes looking a bit ...
7
votes
2answers
342 views
How to put environment text inside node?
Consider a simple environment in the documentclass as
\newenvironment{abstract}{
\node (tbl) {
};
}
The content of
\begin{abstract}
Content
\end{abstract}
will goes ...
7
votes
2answers
695 views
Defining a custom environment with per-section numbering
I have an enumerate environment that I want to refer to later in my document using \ref and \label, but enumerate doesn't get numbered by section (the way, say, figure would). How can I add section ...
1
vote
1answer
286 views
How to create a new counter for an a new environment that is in sync with subsections
I want to create an example environment with a counter which will be in sync with my subsections. So I'll have:
subsection 3.2
lemma 3.2
example 3.2
example 3.3
lemma 3.3
subsection ...
2
votes
1answer
330 views
Renew section command to wrap whole section in an environment
I am trying to write a beamer template for pandoc. For that I need to convert
\section{Text 1}
Some text.
to
\begin{frame}[fragile]{Text 1}
Some text.
\end{frame}
Is there a way to do this ...
2
votes
1answer
80 views
Package with an environment-based sectioning mechanism?
Is there any package for LaTeX that performs sectioning using environments, where doing something like
\begin{section}[Section Title]
\begin{section}[Subsection Title]
...
15
votes
5answers
565 views
How to put a star (or other symbol) in sections that are “special” (difficult, optional, etc)?
I'm currently writing a book, and I'd like some of the sections to be clearly marked as "difficult" or "optional". Not only sections, but also exercises (I'm using the exercise package) and theorems ...
27
votes
6answers
947 views
Is it possible to automatically enumerate sentences in LaTeX?
1.0.1 Is it possible to automatically enumerate sentences in LaTeX?
2.0.1 I want to thoroughly work through and criticize a longer text. 2.0.2 To facilitate quoting, I would like to typeset the text ...
35
votes
3answers
4k views
Is it a bad idea to use \begin{section} … \end{section} in LaTeX?
In several discussions about relatives merits of LaTeX v. xml, a xml supporter complained that in LaTeX sections, subsections etc are not properly closed, so it is hard to tell where a section ends. ...

