25

I'm trying to compile the following:

\documentclass[twoside,11pt,titlepage]{article}
\usepackage[paperwidth=5in,paperheight=7in]{geometry}
\usepackage{graphicx}
\usepackage[absolute]{textpos}
\begin{document}
\thispagestyle{empty}
 \begin{textblock*}{125mm}(0mm,0mm)
  \noindent
  \includegraphics[width=\textwidth]{front.jpg}
\end{textblock*}
\newpage
Hello!
\end{document}

I get the jpg image on the first page. But the second page with "Hello" comes over the first page itself. I tried \clearpage and \cleardoublepage instead of \newpage as per the following question:

Why is \newpage ignored sometimes ?

But to no avail. Any suggestions so as to how to get a new page started after the first page?

3 Answers 3

37

It happens because TeX thinks the page is empty, so \newpage is ignored. Use \null\newpage instead. See section 2.2 of the textpos package documentation for details.

1
  • 13
    It is amazing how every problem has a not-for-newbies answer in TeX :/ Jan 4, 2017 at 8:29
1

This works for me (skips two pages) :

\phantom{p. 1}
\clearpage
\thispagestyle{empty}
\phantom{p. 2}
\clearpage
1

The textblock is avoiding the newpage working. This code works fine :

\documentclass[twoside,11pt,titlepage]{article}
\usepackage[paperwidth=5in,paperheight=7in]{geometry}
\usepackage{graphicx}
\usepackage[absolute]{textpos}
\begin{document}
      \thispagestyle{empty}
      \includegraphics[width=\textwidth]{front.jpg}
      \newpage
      Hello!
\end{document}

Why do you need it ?

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .