Texmaker and TeXstudiopage numbering when using includegraphicsfullpage

Information and discussion about Texmaker, an integrated LaTeX environment for several platforms, and the related TeXstudio
Post Reply
DirkT
Posts: 12
Joined: Tue Jul 08, 2014 11:00 am

page numbering when using includegraphicsfullpage

Post by DirkT »

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?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

page numbering when using includegraphicsfullpage

Post by Johannes_B »

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.
DirkT
Posts: 12
Joined: Tue Jul 08, 2014 11:00 am

page numbering when using includegraphicsfullpage

Post by DirkT »

I put in the directory of the .tex file a file fullpagegraphic.sty which looks as follows:

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}
The .tex file contains in the declaration part the line

Code: Select all

\usepackage{fullpagegraphic}
The numbering is defined by

Code: Select all

\pagenumbering{arabic}
The pictures are inserted with

Code: Select all

\begin{figure}
 \includegraphicsfullpage{picture.jpg}
\end{figure}
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

page numbering when using includegraphicsfullpage

Post by Johannes_B »

You are using a 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}
May i ask the reason for using this code? It does really crazy stuff.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
DirkT
Posts: 12
Joined: Tue Jul 08, 2014 11:00 am

page numbering when using includegraphicsfullpage

Post by DirkT »

The figure environment is not the reason. I followed
http://stackoverflow.com/questions/1673 ... whole-page
and inserted in the declaration part the line

Code: Select all

\usepackage{floatpag}
and changed in the fullpagegraphic.sty file
the line

Code: Select all

\thispagestyle{empty}
to

Code: Select all

\floatpagestyle{empty}
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?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

page numbering when using includegraphicsfullpage

Post by Johannes_B »

Please post minimal working examples to avoid guesswork from my side.

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.
Post Reply