1
vote
0answers
52 views

macro: repeat a command if new page else do nothing

QUESTION: How does one write a pair of macros that work in 1) beamer class and 2) article class, respectively, such that if it, \macroname{...}, is executed at a point in the code, that point ...
8
votes
1answer
129 views

Adding some text on a page break

How can one test if certain chunks of text (say, numbered questions in a questionnaire) is split between two pages and add automatically related text ("Continued question NN") on the top of the second ...
21
votes
2answers
373 views

Show footnotes on odd pages only

I'm writing my thesis using the scrbook-class. Is it possible to display footnotes only on the odd (right) pages? This should mean that \footnote{something} should be collected on even pages and ...
13
votes
1answer
478 views

Column break only if within first column of multicol

Background Creating books automatically using LaTeX-escaped user-generated content. Problem The book layouts make use of the multi-column package, with the book content separated into sections. If ...
18
votes
1answer
246 views

Is something the first item on a page?

How can i identify logically, whether something is the first item on a page, i.e. there is nothing above it (apart from header)? Consider the following, is is basically a feature environment, which ...
7
votes
1answer
193 views

Conditional page breaking

I have used LaTeX on and off for a number of years now for several large documents with evolving versions over long lifetimes. But every time it seems like, powerful and wonderful as LaTeX is, there ...
11
votes
3answers
407 views

How to ensure document total page numbers is a multiple of four?

I'm producing a document (book class) that will ultimately be produced using offset lithography. It's therefore useful to ensure the total number of pages is a multiple of four by adding as many blank ...
4
votes
1answer
675 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 ...
5
votes
1answer
301 views

How to write a TeX conditional to test start of a new page (ConTeXt)

Currently using: \edef\lastpagenumber{\pagenumber} after starting a new page, then in subsequent text: \ifnum\pagenumber>\lastpagenumber do something \else do something else \fi But ...
10
votes
1answer
435 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
308 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 ...
10
votes
2answers
996 views

Test if a paragraph has a page break in it?

I'm trying to use TikZ to make fancier frames. I'm using the clever \tikzmark thing that Andrew Stacey wrote to put nodes at the top left and bottom right of the body of an environment. Then I use ...
9
votes
1answer
289 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 ...
12
votes
1answer
455 views

How do I check whether the text will fit in one page?

I am trying to typeset a page that varies in length. Sometimes it's just shorter than A4, but sometimes it exceeds the length of A4. My question is, how can I check whether the text will fit in one ...
4
votes
0answers
152 views

Condition to determine if current line ends or starts the page [duplicate]

Possible Duplicate: Conditioning behaviour of a macro on whether on top of a new page I have two paragraphs with some separator (rule) between them. I want to make this separator appear ...
15
votes
1answer
351 views

Conditioning behaviour of a macro on whether on top of a new page

Is there a way to find out, whether the currently typeset material will go to top of a page? I am trying to write a macro which, when invoked, typesets a horizontal divider to separate the subsequent ...
16
votes
1answer
664 views

Conditional pagebreak?

Is there a way I can have LaTeX insert a pagebreak, if the last line of the page is a certain string? e.g. \noindent \textsl{Solution}: thanks very much!