1
vote
0answers
61 views

Conditional spacing based on length of chapter title

In LaTeX, (or possibly XeLaTeX), how can one achieve the following: A double spacing a 1- or 2-line chapter title, and single spacing under a 3- or more-line chapter title. A triple space ...
6
votes
0answers
136 views

Display beamer headline in frames conditional on section and subsection environments

I'm trying to create a beamer presentation (in LyX) where frames conditionally display a headline containing section and subsection navigation depending on (a) whether a frame is in a section ...
3
votes
1answer
84 views

Check if a number is in a comma separated list (print or display selected sections from a specific list)

I'm trying to check if a section number belongs to a specified list: \ifnum\value{section}=\mylist % check if section number in mylist --- WRONG \dosomething \fi The conditional is ...
5
votes
1answer
57 views

Change Sectional Skip Conditioned on Text Existing or not Before Sectional Division

I have a simple document layout with a main heading for the title, and the possibility of starting the first sectional unit (with a standard \section command) right after the title -- meaning, with no ...
6
votes
1answer
145 views

Test if a chapter has sections

Is there an easy way to test if a chapter has sections? The question is related to short tables of contents displayed at the beginning of each chapter and that would be empty when the current chapter ...
10
votes
1answer
83 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 ...
4
votes
1answer
708 views

Defining a prose-style section break command [duplicate]

Possible Duplicate: Paragraph breaks with asterisks I'm trying to define a command to insert section breaks into a prose manuscript. Specifically, I would like to use a command to insert ...
3
votes
1answer
198 views

Check if non-empty subsection exists under another section

I'd like to try to make a LaTeX class which enforces a number of (non-empty) sections to exist-- if the user doesn't define them manually, then some default section content will be created. ...
9
votes
1answer
280 views

Macros for hiding empty sections do not work properly

In an attempt to make it possible to outline much of my document by adding new parts to it, but without making parts that I have not written anything on show up in the compiled document, I have ...
9
votes
3answers
514 views

Different \section for odd and even pages

I would like to make the section titles look different on even and odd pages. I have the following MnWE with the trivial approach. The problem is that you don't know that your section header gets ...
10
votes
1answer
454 views

How to make \section start automatically in new page, except first in a chapter

I am working in report class. I would like to redefine \section so that it starts on a new page, except for the first section in every chapter. It seems I should just put code from this answer Start ...
10
votes
2answers
312 views

How to check if a section title (or any heading) is the first line of a new page?

I would like to be able to use an \if command to check if a \section appears on the first line of a new page. If a section heading is the first line of a new page, I would like to then adjust some of ...
9
votes
1answer
534 views

Hiding section titles when the section is empty

I have created a macro like this: \newcommand{\showsection}[2]{ \ifstrequal{#2}{}{}{\section{#1} #2} } It should be used like this in the document: \showsection{Books}{ Do you know any ...
0
votes
3answers
630 views

Detecting if inside \section

How can I make a conditional that checks if it is currently inside a \part, \chapter, or \section? IF inside sectioning = TRUE DO "This text is inside a section." ELSE DO "This text is not ...
8
votes
2answers
297 views

French chapter numbers

This question led to a new feature in a package: impnattypo French typography recommends that chapters be numbered in uppercase roman numbers, except for chapter 1 which should be called ...
7
votes
1answer
1k views

How to tell if the current section is defined in Beamer?

I am customising the footer of my Beamer slides. The footer displays the title of the slides, followed by a ":", and then the current section title. This works fine if the current section is defined. ...
9
votes
1answer
301 views

When is \if@nobreak set to \iftrue or \iffalse?

In my answer to a question on page breaking, I used a private switch that the user had to set by hand to prevent tables which start just after a section from breaking (at the first line). It seems ...
7
votes
1answer
299 views

Different content if command returns empty text (ConTeXt)

I have the following code in my ConTeXt environment: \startsetups[sectioninfo] \ss \rlap{\userpagenumber} \hfill § \getmarking[sectionnumber][current] \emspace \bf ...