Questions tagged [afterpage]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
22 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
2answers
163 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
0answers
19 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} \...
0
votes
1answer
63 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 ...
4
votes
1answer
305 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 ...
5
votes
5answers
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
1answer
455 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. ...
1
vote
1answer
19 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
35 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
2answers
102 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 ...
0
votes
0answers
94 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 ...
0
votes
1answer
97 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 ...
1
vote
0answers
48 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
1answer
329 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
45 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
102 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 ...
3
votes
1answer
40 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
180 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 \...
44
votes
1answer
40k views

How to set page geometry for a single page only?

I want to change the geometry for a single page only. I set the geometry for the whole document using: \usepackage[left=1cm,right=2cm,vmargin=2.5cm,footnotesep=0.5cm]{geometry} The geometry package ...
0
votes
1answer
256 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
71 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
116 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
50 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 ...
3
votes
2answers
816 views

Order of footnotes with packages afterpage and footnote

I need to have footnotes in captions of figures and therefore use the afterpage package to keep the footnotes and the figure on the same page (also using package footnote for footnotes in figures). I ...
16
votes
1answer
6k views

Start a longtable in Latex at top of next page

I want to use the longtable environment for a table. However, I do not know how to place it at the top of the next page, as I can do with the table environment. Do you know how to do it?
0
votes
2answers
158 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
168 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
103 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
2k 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
40 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
790 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 (...
1
vote
2answers
455 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
279 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
521 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 } {...
1
vote
1answer
177 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
511 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
383 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 ...
1
vote
0answers
204 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{...
2
votes
1answer
648 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{ ...
1
vote
1answer
37 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 ...
2
votes
4answers
873 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 ...
6
votes
1answer
107 views

How do I manually split a paragraph without \afterpage?

So I wrote a LaTeX package that would give me full-page floats: https://tex.stackexchange.com/a/84312/13450 Unfortunately, it introduces hard page breaks. \documentclass[a5paper]{memoir} \usepackage{...
3
votes
1answer
629 views

\afterpage not called after page break

In this example \documentclass{article} \usepackage[a6paper,landscape,margin=1cm,bottom=2cm]{geometry} \usepackage[english]{babel} \usepackage{blindtext} \usepackage{afterpage,refcount,lastpage} \...
1
vote
1answer
733 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
91 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
89 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
93 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
563 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 ...
0
votes
2answers
903 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 "...
0
votes
0answers
380 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. ...