I'm creating a template for a photo book using minipage to insert a picture in each page.
The problem I have is that I cannot get consistent margin using the geometry package. My gut is that the minipage is adding some space and I get some warning that I think are related to the this issue:
Overfull \hbox (15.0pt too wide) in paragraph
I already checked other classes like photobook and pagelayout but I cannot do what I want that basically is what I designed withi the code below: an A4 book, 2 sided, 1 page = 1 photo (the can be horizontal or vertical), and an optional caption.
Thanks for any help and suggestions.
\documentclass[a4paper,twoside]{book}
\usepackage{geometry}
\geometry{
layout=a4paper,
ignoreall,
top=5em,
bottom=5em,
left=5em,
right=5em
}
\usepackage[utf8]{inputenc}
\usepackage[english, italian]{babel}
\usepackage{calc} % Package to calculate dimensions
\usepackage{layout}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage[sfdefault,book]{FiraSans} %% option 'sfdefault' activates Fira Sans as the default text font
\usepackage[T1]{fontenc}
\renewcommand*\oldstylenums[1]{{\firaoldstyle #1}}
\graphicspath{ {images/} }
% Hide page numbers
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot{}
% Inserts a blank page
\newcommand{\blankpage}{\newpage\hbox{}\thispagestyle{empty}\newpage}
\usepackage{titlesec} % Package to customize the style of chapter titles
% Set the style of chapter titles
\titleformat{\chapter}[display]
{\normalfont\Huge\bfseries\raggedleft}
{}
{0pt}
{\vfill\MakeUppercase} % Chapter are uppercase
[\vfill\thispagestyle{empty}] % Remove page number
% Begin of documennt
\begin{document}
% To print current layout
\frontmatter %First pages without page numbers
\title{My photobook}
\author{Author}
\date{September 2023}
\maketitle
\mainmatter %Main content with first chapter
% Page for dedicating the book to someone
\thispagestyle{empty} % Hide
\begin{flushright}
\vspace*{\stretch{1}} % Blank space that takes up all the rest of the page
\emph{Dedicated to anyone}\\
\emph{you want to dedicate this page.}
\vspace*{\stretch{2}} % Blank space to push text to the upper right.
\end{flushright}
% First chapter
\chapter*{Chapter Title}
\newpage
\begin{minipage}[t][\textheight][t]{\textwidth}
\includegraphics[width=\textwidth]{6032x4032.png}
1 My beautiful caption that can probably span more lines, as it can be very very long because I don't know what I'm going to write here as it depends from my creativity and information I want to write here.
\end{minipage}
\clearpage
\begin{minipage}[t][\textheight][t]{\textwidth}
\includegraphics[width=\textwidth]{4032x6032.png}
%1 My beautiful caption that can probably span more lines, as it can be very very long because I don't know what I'm going to write here as it depends from my creativity and information I want to write here.
\end{minipage}
\clearpage
\begin{minipage}[t][\textheight][t]{\textwidth}
\includegraphics[width=\textwidth]{6032x4032.png}
2 My beautiful caption that can probably span more lines, as it can be very very long because I don't know what I'm going to write here as it depends from my creativity and information I want to write here.
\end{minipage}
\clearpage
\begin{minipage}[t][\textheight][t]{\textwidth}
\includegraphics[width=\textwidth]{6032x4032.png}
2 My beautiful caption that can probably span more lines, as it can be very very long because I don't know what I'm going to write here as it depends from my creativity and information I want to write here.
\end{minipage}
\clearpage
\begin{minipage}[t][\textheight][t]{\textwidth}
\includegraphics[width=\textwidth]{4032x6032.png}
2 My beautiful caption that can probably span more lines, as it can be very very long because I don't know what I'm going to write here as it depends from my creativity and information I want to write here.
\end{minipage}
\clearpage
\begin{minipage}[t][\textheight][t]{\textwidth}
\includegraphics[width=\textwidth]{6032x4032.png}
2 My beautiful caption that can probably span more lines, as it can be very very long because I don't know what I'm going to write here as it depends from my creativity and information I want to write here.
\end{minipage}
\clearpage
\chapter*{Another Chapter}
\newpage
\begin{minipage}[t][\textheight][t]{\textwidth}
\includegraphics[width=\textwidth]{4032x6032.png}
2 My beautiful caption that can probably span more lines, as it can be very very long because I don't know what I'm going to write here as it depends from my creativity and information I want to write here.
\end{minipage}
\clearpage
\begin{minipage}[t][\textheight][t]{\textwidth}
\includegraphics[width=\textwidth]{6032x4032.png}
3 My beautiful caption that can probably span more lines, as it can be very very long because I don't know what I'm going to write here as it depends from my creativity and information I want to write here.
\end{minipage}
\clearpage
\chapter*{Layout}
\newpage
\layout
\end{document}
minipage
norfigure
.