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
0 answers
31 views

LaTeX: Insert tokens or vbox at the top of the next new column or page?

I'd like to be able to add material to the top of a new column or page. I want to insert this material into the body causing the next column to reflow. (The problem I'm trying to solve is continuing ...
user avatar
0 votes
0 answers
26 views

Start longtable on new page without \afterpage

I have a longtable that only shows the header and the first row on the first page, and then proceeds to show the rest over the next two pages. I want to make the longtable start on the next page. I ...
user avatar
0 votes
2 answers
47 views

Why extra space when \afterpage{} appears within a paragraph?

For my dissertation, each figure must appear on its own page immediately following the page on which it is first referenced. The only way I have found to make this happen consistently is to do all of ...
user avatar
0 votes
0 answers
19 views

Changing text color \afterpage with page break in scoped blocks

I want to set the text and background color for a single page, to call it out from the rest of the document. This can be accomplished using \pagecolor and \color, then \afterpage is used to return to ...
user avatar
0 votes
1 answer
55 views

Running header missing from my pdf file

Here is a Latex code of a journal's template. While the accompanying pdf in the journal's site shows a running header in both the odd and the even pages, when I execute the same file, I do not get a ...
user avatar
  • 33
0 votes
0 answers
20 views

every image on separate blank pages without page number

I have my final year report. I want to put every images on separate blank pages (no text, only image) without page numbers, keeping the rest of the text flow unaltered. Is there some way of doing it ...
user avatar
0 votes
0 answers
36 views

afterpage package and verse environment cause troubleshooting

I use both afterpage package and verse environment in my document. So, when a verse environment comes just after an \afterpage command rendering, an unwanted linebreak occurs after the first verse. As ...
user avatar
  • 2,081
0 votes
1 answer
69 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 ...
user avatar
  • 354
0 votes
2 answers
351 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)...
user avatar
1 vote
0 answers
27 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{...
user avatar
  • 260
2 votes
1 answer
103 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 ...
user avatar
0 votes
0 answers
69 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 ...
user avatar
  • 543
1 vote
1 answer
91 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 ...
user avatar
  • 155
0 votes
1 answer
132 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 ...
user avatar
  • 111
0 votes
1 answer
124 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 ...
user avatar
  • 189
1 vote
2 answers
242 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 ...
user avatar
0 votes
1 answer
47 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 ...
user avatar
0 votes
1 answer
68 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} \...
user avatar
  • 1,339
0 votes
0 answers
75 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} \...
user avatar
  • 317
1 vote
1 answer
31 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 ...
user avatar
1 vote
0 answers
280 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 ...
user avatar
0 votes
0 answers
362 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 ...
user avatar
8 votes
1 answer
1k 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 ...
user avatar
  • 1,687
2 votes
0 answers
550 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 ...
user avatar
1 vote
2 answers
758 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:/...
user avatar
  • 11
7 votes
1 answer
2k 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{...
user avatar
  • 1,566
0 votes
1 answer
167 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] ...
user avatar
2 votes
1 answer
255 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 ...
user avatar
  • 2,427
1 vote
2 answers
365 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 ...
user avatar
  • 1,687
3 votes
1 answer
193 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 ...
user avatar
  • 401
2 votes
2 answers
477 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 \...
user avatar
  • 2,081
1 vote
1 answer
1k 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 ...
user avatar
  • 277
1 vote
2 answers
119 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 ...
user avatar
2 votes
0 answers
191 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 ...
user avatar
  • 299
1 vote
1 answer
73 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 ...
user avatar
  • 113
0 votes
1 answer
139 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 ...
user avatar
  • 2,284
0 votes
2 answers
311 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 ...
user avatar
0 votes
1 answer
230 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 ...
user avatar
  • 329
1 vote
1 answer
861 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. ...
user avatar
  • 195
0 votes
1 answer
541 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 ...
user avatar
  • 3,743
3 votes
1 answer
4k 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 ...
user avatar
  • 231
0 votes
1 answer
46 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 ...
user avatar
  • 229
2 votes
1 answer
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 (...
user avatar
  • 87
2 votes
1 answer
536 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 ...
user avatar
3 votes
2 answers
1k 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 } {...
user avatar
2 votes
1 answer
522 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} \...
user avatar
2 votes
1 answer
890 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 ...
user avatar
  • 23
3 votes
1 answer
661 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 ...
user avatar
  • 33
2 votes
0 answers
273 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{...
user avatar
  • 305
1 vote
1 answer
50 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 ...
user avatar
  • 2,912