Texmaker and TeXstudio ⇒ page numbering when using includegraphicsfullpage
page numbering when using includegraphicsfullpage
I have a document with page numbering. When I insert graphics with includegraphicsfullpage, the page before such a graphic does not get a page number. The pages with a graphic get the right page number.
What can I do to get the page numbers on the pages before a graphic?
What can I do to get the page numbers on the pages before a graphic?
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
page numbering when using includegraphicsfullpage
Can you provide a minimal working example? What is
includegraphicsfullpage
, where is it defined?The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
page numbering when using includegraphicsfullpage
I put in the directory of the .tex file a file fullpagegraphic.sty which looks as follows:
The .tex file contains in the declaration part the line
The numbering is defined by
The pictures are inserted with
Code: Select all
\newcommand{\includegraphicsfullpage}[1]{%
\newpage
\bgroup
\thispagestyle{empty}%
\hoffset=-1in
\voffset=-1in
\topmargin=0pt
\headheight=0pt
\headsep=0pt
\hsize=\paperwidth
\@colht\paperheight
\evensidemargin=0pt
\oddsidemargin=0pt
\parskip=0pt
\parindent=0pt
\hspace{6mm}\includegraphics[width=0.65\paperwidth,height=0.65\paperheight]{#1}
\newpage
\egroup}
Code: Select all
\usepackage{fullpagegraphic}
Code: Select all
\pagenumbering{arabic}
Code: Select all
\begin{figure}
\includegraphicsfullpage{picture.jpg}
\end{figure}
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
page numbering when using includegraphicsfullpage
You are using a
May i ask the reason for using this code? It does really crazy stuff.
figure
environment, where you clearly don't want one. Code: Select all
\documentclass{article}
\usepackage{graphicx}
\usepackage{blindtext}
\makeatletter
\newcommand{\includegraphicsfullpage}[1]{%
\newpage
\bgroup
\thispagestyle{empty}%
\hoffset=-1in
\voffset=-1in
\topmargin=0pt
\headheight=0pt
\headsep=0pt
\hsize=\paperwidth
\@colht\paperheight
\evensidemargin=0pt
\oddsidemargin=0pt
\parskip=0pt
\parindent=0pt
\hspace{6mm}\includegraphics[width=0.65\paperwidth,height=0.65\paperheight]{#1}
\newpage
\egroup}
\makeatother
\begin{document}
\blindtext
\includegraphicsfullpage{example-image-a}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
page numbering when using includegraphicsfullpage
The figure environment is not the reason. I followed
http://stackoverflow.com/questions/1673 ... whole-page
and inserted in the declaration part the line
and changed in the fullpagegraphic.sty file
the line
to
Now, the page before the picture gets a page number - but the page with
the picture does not get a page number. How can I get a page numbering on the picture page?
http://stackoverflow.com/questions/1673 ... whole-page
and inserted in the declaration part the line
Code: Select all
\usepackage{floatpag}
the line
Code: Select all
\thispagestyle{empty}
Code: Select all
\floatpagestyle{empty}
the picture does not get a page number. How can I get a page numbering on the picture page?
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
page numbering when using includegraphicsfullpage
Please post minimal working examples to avoid guesswork from my side.
I don't even know what you are trying to achieve.
I don't even know what you are trying to achieve.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Re: page numbering when using includegraphicsfullpage
I have the same issue.
MWE:
The page with "hello, world" is getting the page numbe "i", as expected, but the pages with page1.png and page2.png are all getting arabic numbers.
MWE:
Code: Select all
\documentclass[a4paper]{book}
\usepackage{graphicx}
\pagenumbering{roman}
\begin{document}
\pagenumbering{roman}
hello, world
\newpage
\includegraphics[height=0.5\paperheight,keepaspectratio]{page1.png} \newline
\includegraphics[height=0.5\paperheight,keepaspectratio]{page2.png} \newline
\end{document}
Re: page numbering when using includegraphicsfullpage
For those who find this thread after me.
is not enough for switching enumeration. LaTeX adds the page automatically, but there is some confusion with counter.
Replacing with works as expected.
Code: Select all
\newline
Replacing
Code: Select all
\newline
Code: Select all
\newpage