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 ...
2
votes
2answers
70 views

Is it possible to pagebreak a longtable if the next “n” amount of rows won't fit on page?

I want to produce a longtable where some "elements" consist of multiple rows (see picture). I want the longtable to pagebreak if the next element doesn't fit in the table. Is there a way to tell ...
11
votes
3answers
407 views

Insert newpage before section but prevent pagebreak after part

Maybe some of you can already guess what I'm trying to achieve; I want to redefine some commands with the following result: every \section should start on a new page except for sections which are ...
7
votes
1answer
66 views

I need an hrule, but not when at the top of the page

I have a multi-page document that has many small sections split with \hrule lines. Occasionally a section will end immediately before a page break, and so the next section will begin right at the top ...
4
votes
1answer
271 views

How to prevent a page break between paragraphs

I would like to typeset something like a "quote plus attribution", e.g. at the beginning of a book chapter. It should look like this: CHAPTER TITLE This is an introductory quote. ...
28
votes
7answers
1k views

How to replace a large block of text by an empty block of the same size?

I know there exists the \phantom command, but does it work on large blocks of text (containing several paragraphs or even several pages)? What I want is to have some commands, call them \hide and ...
2
votes
1answer
194 views

Can I write a macro for placing a vertical, breakable rule along arbitrary paragraphs without an output routine?

I answered a question last week about creating a continuous but breakable rule next to an arbitrary number of paragraphs in Plain TeX. My solution gathered the paragraphs to rule in a vbox; my output ...
2
votes
1answer
281 views

Insert text before end of page, and at the begining of the next page

I'm putting a template together and I have created a custom command which I'm going to use to set specific margins on the text passed to its argument and a few more formatting things, like this: ...
3
votes
1answer
95 views

How can I create a macro that does nothing if it appears at the top of a page?

How can I define a macro that does nothing if it is the first item on a page, but does something (e.g. inserts a rule or a space) if it appears elsewhere? Something along these lines is discussed in ...
6
votes
2answers
123 views

What is the command to just slightly increase the text height of a particular page?

There is a command for just slightly increasing the text height of a particular page, something like stretchthispage or so. I know where it is in the LaTeX guide that I have at home, but I'm at work ...
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 ...
2
votes
1answer
460 views

Macro after heading shall not allow page break.

In a previous question I needed a solution for the following problem: I had defined a command for inserting special custom notes in my document with the fixme package and if those notes followed a ...
4
votes
2answers
240 views

Ending all pages with period/fullstop

I want to have LaTeX (LyX) make its pages end at a fullstop (.). In other words no broken sentences carried to next page. I hope to use \raggedbottom so that pages will be shortened by a few lines ...