21

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?

28

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.

  • 4
    It is amazing how every problem has an answer. Thanks a lot! – harisibrahimkv Aug 3 '12 at 10:26
  • 6
    It is amazing how every problem has a not-for-newbies answer in TeX :/ – Jill-Jênn Vie Jan 4 '17 at 8:29
1

This works for me (skips two pages) :

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

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

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 ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.