Questions tagged [afterpage]
{afterpage} is a package that provides a means of running commands immediately after the current page is output.
83
questions
0
votes
1answer
35 views
Restoregeometry causes text to run of page
Currently, I am working on a package for an association. I am trying to achieve the following: the geometry of the first page should be different from all the following pages. There are some questions ...
0
votes
2answers
52 views
\afterpage{} not working for \newgeometry and \restoregeometry
My goal is to have a different geometry for the first page compared to the rest of the document.
The only way I found to do this is to use the \afterpage{} command.
MWE (note the different headheights)...
1
vote
0answers
21 views
Whitespace before landscape in twocolumn pages (\afterpage does not work) [duplicate]
How can I eliminate whitespace before a landscape page? \afterpage does not work for me. Please find below an example.
My code is like that :
Text
\afterpage{
\begin{landscape}
Text1
\end{...
0
votes
0answers
28 views
page number on last page of longtable should be suppressed
I don't want to have a page number on the last page of a longtable.
My (sadly not so short, not really minimal) MWE below shows how I would proceed: Use \afterpage{\thispagestyle{empty}}. But that ...
2
votes
1answer
37 views
Strange problem using landscape, afterpage and split
I have a problem in Latex where \afterpage somehow seems to have problems with a split equation, so that the code does not compile. I use \afterpage to fill a page before a large landscape figure is ...
0
votes
0answers
34 views
insert empty page after chapter
I'm sorry, but I'm having trouble inserting a latex code example to explain this problem.
I'm writing a book on environmental hydraulics for university (nothing commercial).
I have a problem inserting ...
1
vote
1answer
46 views
Landscape tables: can I use \toprule inside \afterpage{}? [closed]
I'm experimenting with landscape tables.
I came accross this question, and I'm trying to modify it to get fancier tables.
I would like to use commands like \toprule, to draw horizontal lines.
Here's ...
0
votes
1answer
65 views
Using afterpage with IEEEtran documentclass
I have got an issue with using the \afterpage command in combination with the IEEEtran document class. I have got a large table that I want to put on a landscape page and let the other text 'wrap ...
0
votes
1answer
81 views
Alter geometry for 2 pages after new chapter
Within a twoside, twocolumn document, I'm trying to create a new chapter command, which alters the page geometry for the left-side page the chapter is started on and the right-side page after. Both ...
1
vote
2answers
83 views
Is it possible to define a different page layout for every chapter title page for example?
I attempted to produce a book document that has the following specifications:
A narrow content at the first page of each chapter, but the width of the chapter title is as wide as \textwidth.
A sided ...
0
votes
1answer
43 views
Incompatibility between rotfloat and hyperref?
Latex is creating a blank page before a sideways table. Initially, I thought this was a problem with sideways table (see Landscape mode causes a blankpage). Indeed the blank page goes away if I use ...
0
votes
1answer
32 views
Putting table and image in same landscape page
I am trying to put a long table and three images in the same landscape page. Here is a MWE:
\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{booktabs}
\...
0
votes
0answers
41 views
Repeating text in the beginning of certain pages
With the following code, the text
This is an experiment!
is not placed in the indicated pages: 1, 2 and 4.
Could somebody please help me?
\documentclass[12pt]{article}
\usepackage{lipsum}
\...
1
vote
1answer
24 views
How to organize the appearing of floats when afterpage is used?
earlier I asked how to rotate a page with a sidewaysfigure inside (question here). However I couldn't find a solution. I decided to use the landscape environment with afterpage, but when there's other ...
0
votes
0answers
158 views
How to rotate a page with a rotated figure with “sidewaysfigure”?
I'm dealing with rotated figures on my document. I have 2 alternatives:
sidewaysfigurefrom the rotating package
landscape environment from the pdflscape package
I prefer the sidewaysfigure because ...
0
votes
0answers
284 views
There is an alternative for \afterpage?
I'm experiencing problems with my floats. Reading about it I found that \afterpage could be the responsible for that situation (answer that I read). I use \afterpage for long horizontal tables spread ...
5
votes
1answer
796 views
How to make figures appear landscape properly?
I know of two options to put figures in landscape.
The first is to use the sidewaysfigure environment. This works very well when it comes to keeping the sequence of figures. However, it leaves the ...
2
votes
0answers
223 views
How to solve error - Illegal parameter number in definition of \AP@
I'm new to Latex and struggling to properly format a specific cover for my article.
I have the following code that fulfils what is expected from it and even compiles. However, the "Illegal parameter ...
1
vote
2answers
481 views
Box / Object moves in research article template depending on introduction length. Why?
Dear fellow LaTeX users,
I am new to the field and had to start quite deep with a relatively complex document template (PNAS research article template). The respective files can be obtained at: http:/...
3
votes
1answer
1k views
Can I make the geometry of the first page different from other pages?
I want to make the top margin in the first page larger than other pages. The code I use is:
\documentclass[12pt]{article}
\usepackage{geometry}
\geometry{
top=8cm,
hmargin=1in,
}
\usepackage{...
0
votes
1answer
99 views
How to remove page number for the page includes “algorithm pseudo-code”?
I want to remove page number of the page of algorithm pseudo-code. I used afterpage as explained in this answer as follows:
\afterpage{%
\begin{algorithm}
\begin{algorithmic}[1]
...
2
votes
1answer
189 views
Too many \restoregeometry required with afterpage and geometry packages
I have the following MWE where to get the desired output I need to issue two \restoregeometry commands in order to ensure the second page doesn't spill of the bottom and so that the first page adheres ...
0
votes
2answers
235 views
How to get landscape float with correct numbering?
I am setting a figure in landscape and then two other figures in normal mode. However, the landscape figure goes between the normal figures and the numbering gets messed up, including in the table of ...
3
votes
1answer
101 views
With afterpage the number of each section is not continuous
The following minimum example (MWE) based on this question:
Section doesn't start from Landscape orientation page, includes a numbered section as the first instruction after the afterpage instruction ...
1
vote
2answers
336 views
A \beforepage command
I find recently the afterpage package which brings the \afterpage{<stuff>} command which puts the <stuff> part in the next page.
But I was searching a reversed command, something like \...
1
vote
1answer
796 views
Remove header/footer on page with large figure
I have a question that is similar to this one, though the solutions proposed there do not work for me. I want to insert a large figure in a document that has headers (section titles) and footers (page ...
1
vote
2answers
87 views
Inserting different figures on even numbered pages
Sometimes a discussion on a figure spills over several pages and I want to insert a copy of the figure on every even numbered page while the discusses continues.
There was a closely related question ...
2
votes
0answers
169 views
Table margin, white space problem and position problem
Table margin problem, extra space is appear in the margin of table (see landscape table 3), also table position is wrongly appearing(I have place the second table in last but it appears as second also ...
1
vote
1answer
65 views
avoid extra page for a footnote when a paragraph is split by afterpage
I have a document where text should float around a landscape page that I insert with \afterpage{}. If (as is the case for me) a paragraph is 'broken' by afterpage (i.e. the paragraph starts before the ...
0
votes
1answer
120 views
Set page color for double-double float
I have a custom command, comprising two instances of \@dblfloat. I'd like to change the page color on pages where this occurs. I can do this for a single instance of \@dblfloat, but not more.
In the ...
0
votes
2answers
241 views
Appearing order in a landscape figure and normal figure
I'm working in a text with a lot of figures and some of them are landscape oriented. In the text I created a landscape figure, followed by some paragraphs and then a regular figure. I expected that ...
0
votes
1answer
208 views
Shift landscape environment to the previous page
A typical solution while using the landscape environment provided by the pdflscape package is to wrap the landscape into an \afterpage{} environment to prevent clearing the page between the part to be ...
1
vote
1answer
666 views
\restoregeometry from inside afterpage
I want to create a twoside article as a booklet where the first page is centered, and the rest is not. Using \newgeometry and restoregeometry within the afterpage macro doesn't work for some reason. ...
0
votes
1answer
246 views
How to change font color for only the current page?
As mentioned by the title, I need to change font color for only the current page. After searching the internet, the afterpage package seems to be a good choice, as well as \colorlet{saved}{.} from the ...
3
votes
1answer
3k views
How to leave the rest of a page empty after inserting a figure in latex?
I would like to insert a figure with its caption entirely in a page with the following code:
\documentclass[a4paper,fleqn,usenatbib]{mnras}
\usepackage{newtxtext,newtxmath}
% Depending on your LaTeX ...
0
votes
1answer
41 views
text after aftertable environment not filling white space prior - rotated full page tables
I'm writing a document with some full page tables that need to be rotated. This is fine, but float behaviour is not working like I would expect - I have some text 1, an afterpage environ with full ...
2
votes
1answer
1k views
longtable - start on next page
The formatting guidelines that I am bound to require me to have tables either at the top or bottom of a page. Up to now, I used a longtable for every table - even if it does not span multiple pages (...
2
votes
1answer
370 views
Page break problem after changing the page format
I have the following problem. I am writting my thesis and I need to change the page format from A4 to A3 to include a figure. After this, I would like to return to the original format.
However, an ...
3
votes
2answers
866 views
how to put afterpage inside environment definition?
if i used \afterpage outside the my custom environment, it works fine:
\documentclass{article}
\usepackage{lipsum, afterpage}
\newenvironment{myenv}{
some macros that manipulate page numbering
} {...
2
votes
1answer
338 views
Two column article not adjusting with landscape table
I have a two-column article with a landscape table. Below is a working example of the article.
\documentclass[10pt,twocolumn]{article}
\usepackage{lipsum}
\usepackage{lscape}
\usepackage{afterpage}
\...
2
votes
1answer
710 views
How to get rotated landscape page in LaTeX without flushing other floats?
I would like the landscape tables to appear rotated in the pdf using pdflscape package. However I would still like the text AND figures to float around the table.
As you can see in the portrait view ...
3
votes
1answer
552 views
How do I fix wrong numbering when using afterpage in appendix?
So I'm writing my thesis and was in need of a table in landscape mode as it was too big, and found a simple solution at How to place a table on a new page with landscape orientation without clearing ...
2
votes
0answers
232 views
Geometry: strange behaviour after \restoregeometry in afterpage environment (and longtable)
I have some strange problem tying place a "fake float" with large tables. Here is a MWE:
\documentclass[twoside, a4paper]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{...
1
vote
1answer
44 views
Indexing material that appears inside \afterpage
My document contains some landscape-orientation tables that I set inside an \afterpage command. When I try to index material that appears inside these tables, I sometimes end up with duplicate index ...
1
vote
2answers
701 views
How to fix paragraph's run-in heading on a single page before \afterpage and the text being on the first page after \afterpage?
TeX Live 2014 on Xubuntu 14.04 LTS, compiling with xelatex.
Minimal working example:
\documentclass[11pt, twoside]{book}
\usepackage{geometry}
\geometry{a4paper, left=3.5cm, right=2.5cm, top=3.5cm, ...
2
votes
1answer
899 views
How to fix misplaced \noalign on afterpage with \clearpage and too high longtable head?
TeX Live 2014 on Xubuntu 14.04 LTS.
Minimal working example:
\documentclass[11pt, oneside]{report}
\usepackage{afterpage}
\usepackage{booktabs}
\usepackage{longtable}
\begin{document}
\afterpage{
...
2
votes
4answers
1k views
Insert a blank page on every page break?
I have slides (slides.pdf; my own construction based on scrartcl) to teach from. Students
asked to put in blank slides (to have space to put down notes). I first tried to
write a shell script (getting ...
2
votes
1answer
968 views
No page number after afterpage
Why is no page number shown on the page after the one generated by afterpage?
\documentclass{article}
\usepackage{afterpage, geometry, lipsum}
\begin{document}
\lipsum
\afterpage{%
\clearpage
\...
3
votes
2answers
111 views
after minipage like afterpage
Is it possible to define a command that works like \afterpage, but only applies to minipage environments? The usage I have in mind is as follows
\begin{minipage}
See the graph in Figure~\ref{foo}.
\...
1
vote
1answer
176 views
Use of \afterpage package causes equation to be inserted into following subequations
I have a very long equation, which cannot be split apart, which I place on a landscape page on its own.
However, when I compile the document, this equation now seems to have been placed inside the ...