画像を中央に配置する方法がわかりません。目的は、画像を中央に配置し、切り取り線を超える大きさにすることです。
オプション: 画像同士の距離 (つまり、1 つの画像の下端と別の画像の上端の間の隙間の大きさ) を制御することは可能ですか。
\documentclass[12pt]{extbook}
% ############################## geometry
\usepackage%[showframe]
{geometry}
\geometry
{ hmarginratio = 1:1
, vmarginratio = 1:1
, bindingoffset = 0cm
, onecolumn
, a4paper
, layoutwidth = 50 mm
, layoutheight = 180 mm
, layouthoffset=\dimexpr(\paperwidth-\csname Gm@layoutwidth\endcsname)/2\relax
, layoutvoffset=\dimexpr(\paperheight-\csname Gm@layoutheight\endcsname)/2\relax
, showcrop
}
\usepackage{fancyhdr}
\usepackage{mwe}
\usepackage{graphicx}
% ############################### Document
\begin{document}
\pagenumbering{gobble}
\begin{figure}
\centering
\begin{minipage}[c]{\textwidth}
\centering
\noindent\includegraphics[width=5cm]{example-image}
\end{minipage}
\begin{minipage}[c]{\textwidth}
\centering
\noindent\includegraphics[width=5cm]{example-image}
\end{minipage}
\begin{minipage}[c]{\textwidth}
\centering
\noindent\includegraphics[width=5cm]{example-image}
\end{minipage}
\begin{minipage}[c]{\textwidth}
\centering
\noindent\includegraphics[width=5cm]{example-image}
\end{minipage}
\begin{minipage}[c]{\textwidth}
\centering
\noindent\includegraphics[width=5cm]{example-image}
\end{minipage}
\end{figure}
\end{document}
答え1
問題の説明はあまり明確ではありませんが、おそらくこれがあなたが望んでいることです。
\documentclass[12pt]{extbook}
% ############################## geometry
\usepackage{geometry}
\geometry{
hmarginratio = 1:1,
vmarginratio = 1:1,
bindingoffset = 0cm,
onecolumn,
a4paper,
layoutwidth = 50 mm,
layoutheight = 180 mm,
layouthoffset=\dimexpr(\paperwidth-\csname Gm@layoutwidth\endcsname)/2\relax,
layoutvoffset=\dimexpr(\paperheight-\csname Gm@layoutheight\endcsname)/2\relax,
showcrop
}
\usepackage{graphicx}
% ############################### Document
\begin{document}
\thispagestyle{empty}
{\parindent=0pt
\newcommand{\shiftleft}{\hspace*{-0.5\dimexpr\csname Gm@layoutwidth\endcsname-\textwidth\relax}}
\shiftleft\includegraphics[width=5cm]{example-image}\shiftleft\vfill
\shiftleft\includegraphics[width=5cm]{example-image}\shiftleft\vfill
\shiftleft\includegraphics[width=5cm]{example-image}\shiftleft
}
\end{document}