Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [afterpage]

{afterpage} is a package that provides a means of running commands immediately after the current page is output.

1
vote
0answers
14 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 ...
0
votes
1answer
37 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:/...
0
votes
1answer
27 views

Sideways Figure alignment and \afterpage

I am trying to place a full landscape page size sideways figure which should come before another tiny figure within the same section. I have used following code and I could get the order and style ...
1
vote
1answer
67 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
19 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
53 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
1answer
47 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 ...
2
votes
1answer
28 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
115 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 \...
0
votes
1answer
60 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
66 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
80 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
41 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
75 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
104 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
111 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 ...
0
votes
1answer
327 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
82 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 ...
2
votes
1answer
999 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
38 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
610 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
203 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 ...
2
votes
2answers
359 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 } {...
0
votes
0answers
456 views

Changing geometry for one page only (two-columns)

Let's say I have a two column book. I'd like to have only one page with a different geometry. What I mean is I want to start a page with a new geometry (using the \newgeometry command just after \...
0
votes
1answer
122 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
392 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 ...
1
vote
1answer
348 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 ...
0
votes
0answers
213 views

How to change geometry and remove page number from page containing one large figure only without automatically inserted blank page?

I want to have a large figure with its label at the very end of the previous page. The figure is very large so I want to set top margin to 0 and remove page number from the page with figure. Figures ...
1
vote
0answers
190 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
34 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
330 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
517 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
713 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 ...
1
vote
1answer
618 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
79 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
77 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 ...
1
vote
1answer
83 views

Extra pages generated by afterpage

I am creating a set of solutions to a test and need to have a header table that indicates the question number, year of test, etc. I have created the code below that uses tikz to create the table and ...
2
votes
1answer
502 views

How to create an environment to dump a longtable sideways after currentpage, which works under pandoc

Sorry for the long title (and even longer question), but this is a rather complex subject and requires a bit of elaboration. Goal: I want to define a pair of latex macros which I can write in the ...
4
votes
4answers
1k views

Newgeometry and afterpage don't adjust the geometry

In the following sample, the geometry doesn't change even though I believe it should. What am I doing wrong and how can I fix it? \documentclass{article} \usepackage{lipsum} \usepackage{afterpage} \...
0
votes
0answers
344 views

`strip` Environment Does Not Work in Empty Document / Interaction with `\afterpage`

I have a question about the interaction of the packages afterpage and cuted in two-column mode near the document end - or about cuted's strip environment in otherwise empty documents for that matter. ...
0
votes
2answers
729 views

Float(s) lost: Problem (Possible) from afterpage + double-column

I am working on a package which allows for figures with many subfigures which can break over multiple pages. So far, my figureSeries package is working in most scenarios, except that I sometimes get "...
2
votes
1answer
588 views

Force figures and figures* to appear in order of appearance

I am using the MNRAS latex template to typeset a preprint. The MNRAS template is divided into two columns and I am using the figure and figure* environment to place graphs either into one column or ...
1
vote
1answer
198 views

How to add verbatim in a float figure on right page?

I've discovered this post to define the command addfig{} to put figures on the right page. My problem is that it doesn't work if the figure is a verbatim element. Here is a minimal not working ...
1
vote
3answers
344 views

inserting an image after every page

I'd like to automatically insert an image on all even pages of a document, keeping the rest of the text flow unaltered. I know I can do this using something like pdftk after compilation, but is there ...
1
vote
1answer
247 views

Including a matrix of math nodes in a TikZ figure in a minipage in a landscape in an afterpage

I want to include a TikZ figure, containing a matrix of math nodes, displayed in landscape mode on its own page in my thesis, in such a way that the nominally surrounding text, which is in fact on the ...
1
vote
1answer
194 views

How to prevent reordering float appearance?

Latex changes the order of floats in my document. It moves figure 2 before figure 1. Figure 1 occupies a whole page, therefore I set it to be inserted on a float page, in afterpage environment. How to ...
3
votes
1answer
1k views

Adding words figure and page to list of figures

This also applies to the table of contents and list of tables and is related to Add 'Page' above page numbers in Table of Contents, but when adding the words "Figure" and "Page" to the top of ...
3
votes
1answer
433 views

Longtable breaks afterpage

My problem is that I want to have a certain footer on the first, or the last, page. The solution I've tried with is by using fancyhdr together with afterpage. Here is a working example, without ...
7
votes
1answer
638 views

\label is Undefined when used in \afterpage?

I am trying to force a figure and an image to show up on the same page back to back. I read the solution of using the \afterpage which works great. Except now the \label is undefined and I cannot ...
1
vote
1answer
250 views

Framed environment covers caption of figure in afterpage

I'm using packages framed to create my own quote environment with a nice frame. However, when using the package afterpage to shift a figure to the next page and the first thing on the next page is a ...