4

I have been trying with no success to find out what is causing this problem, im using

\documentclass{report} 
\usepackage{appendix}
\renewcommand{\appendixname}{APÉNDICE} 
\renewcommand{\appendixtocname}{APÉNDICE} \renewcommand{\appendixpagename}{APÉNDICE} 
\addappheadtotoc 
\appendixpage 
\appendix  
\input{Tesis/Estructura/07_Apendice}

I already finished writing the entire document and now Im just placing some appendix content (a bunch of pictures) however it keeps placing a blank page between every floating figure I place and it does this at random, sometimes it adds it and sometimes it doesnt, this makes it difficult to understand why its happening, but when it happens the blank page does not go away, even after clearing the cache. This does not happen in the entire document only in the appendice.

\section{ Section 1 }
\begin{figure}[H]
    \begin{center}
        \includegraphics[width = 1\textwidth]{Tesis/Image/1.jpg}
        \captionof{figure}{ Picture 1 } 
    \label{p1}
    \end{center} 
\end{figure}

\section{ section 2 }

\begin{figure}[H]
    \begin{center}
        \includegraphics[width = 1\textwidth]{Images/2.JPG}
        \captionof{figure}{ Picture 2} 
    \label{p2}
    \end{center} 
\end{figure}

\section{ section 3 }

\begin{figure}[H]
    \begin{center}
        \includegraphics[width = .9\textwidth]{Images/2.jpg}
        \captionof{figure}{ figure 2.} 
    \label{Sensor}
    \end{center} 
\end{figure}

This can generate something like this (sorry for the size it's the only way i found to try to show how the document compiles), as i said this only happens when i chain several pictures and sections, it's only happening in the appendix

enter image description here

I already tried using \newpage, \clearpage, \let\cleardoublepage\clearpageand changing document class to, \documentclass[11pt,oneside]{report} changing the size of the pictures with no changes

There are no \newpage commands in the appendix or around any commands related to it

3
  • 2
    What happens if you replace every \begin{center} instruction with \centering, delete all \end{center} instructions, and replace all width = 1\textwidth options with height = 0.85\textheight options? Separately, since you're using figure environments, you needn't use \captionof{figure}{...} statements; \caption{...} should do just as well. – Mico Jan 5 '16 at 5:46
  • just did all that and... it solved some of the blank pages (6 of 10) the problem, and Im not sure why, since i have been using that chain of commands the entire document, however now I need to make all the sections "not centered" since the centering commands are actually justifying the subsections text somehow – GoatZero Jan 5 '16 at 7:02
  • See the answer I just posted. Observe that the \centering instructions should be placed inside the figure environments. – Mico Jan 5 '16 at 7:02
3

Without having access to your graphics files (e.g., 1.jpg, 2.jpg, etc), it's not possible to offer a definitive diagnosis. Going mainly by the screenshots you've posted, I'd say that there's a high likelihood that the pictures are too big to fit on a page that also contains a sectioning header.

One way to overcome this difficulty is to force LaTeX to size the images so that their overall dimensions are the lesser of \textwidth and 0.88\textheight. ("Why not 1\textheight?", you may ask. Recall that each page is also supposed to contain a sectioning header and a caption, so some space needs to be reserved for those elements.) This may be achieved by adding the option keepaspectratio for each \includegraphics instruction, as is done in the code below.

To conserve space, do get rid of all \begin{center} and \end{center} statements and issue \centering directives instead.

\documentclass{report} 

\usepackage{appendix,float}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

\usepackage[demo]{graphicx} % remove 'demo' option in real document

\renewcommand{\appendixname}{APÉNDICE} 
\renewcommand{\appendixtocname}{APÉNDICE} \renewcommand{\appendixpagename}{APÉNDICE} 
\addappheadtotoc 

\begin{document}
\tableofcontents

\appendixpage 

\appendix  

\section{ section 1 }
\begin{figure}[H]
\centering
    \includegraphics[width=\textwidth, 
                     height = 0.88\textheight, 
                     keepaspectratio]
                    {Tesis/Image/1.jpg}
    \caption{Picture 1} 
    \label{p1}
\end{figure}


\section{ section 2 }
\begin{figure}[H]
\centering
    \includegraphics[width=\textwidth, 
                     height = 0.88\textheight, 
                     keepaspectratio]
                    {Images/2.jpg}
    \caption{Picture 2} 
    \label{p2}    
\end{figure}


\section{ section 3 }
\begin{figure}[H]
\centering
    \includegraphics[width=\textwidth, 
                     height = 0.88\textheight, 
                     keepaspectratio]
                    {Images/3.jpg}
    \caption{ Pigure 3} 
    \label{Sensor}
\end{figure}

\end{document}
2
  • 1
    Im gonna try that solution but i believe you are right on the spot, since the only kind of warning i get is Overfull \hbox (1.29184pt too wide) detected at line 435 while i implement this i wanted to ask, whats the standard image resolution accepted to not have this kind of problems with latex? im thinking on trying to reduce the size in pixels of the images causing the problems (the ones next to each blank page) to see if that can solve it – GoatZero Jan 5 '16 at 8:08
  • @GoatZero - I'd say the optimal image resolution depends importantly on the magnification being applied, or potentially being applied, to the images. If your images are natively full-page, they're probably already sufficiently high-res since they're going to be displayed at less than half their native width. – Mico Jan 5 '16 at 8:17

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.