이미지를 중앙에 배치하는 방법을 알 수 없습니다. 목표는 이미지를 중앙에 배치하고 자르기 선 위로 늘어날 수 있을 만큼 크게 만드는 것입니다.
선택 사항: 이미지가 얼마나 가까운지(즉, 한 이미지의 아래쪽 테두리와 다른 이미지의 위쪽 테두리 사이의 간격이 얼마나 큰지) 제어할 수 있습니까?
\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}