我有这张图片,我想创建一个单页文档,其中重复显示这张图片八次。
图像应有边框(浅灰色),宽度应正好为 13 厘米,并且图片之间不应有空格。
到目前为止,我的最佳结果是这样的:
代码:
\documentclass[a4paper]{report}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage[landscape, margin=0.25cm]{geometry}
\usepackage{mdframed}
\usepackage{subfig}
\begin{document}
%\definecolor{Gray}{gray}{0.25}
\definecolor{LightGray}{rgb}{0.85,0.85,0.85}
\newcommand{\cfbox}[1]{%
\adjustbox{cfbox=#1}%
}
\begin{figure}%
\centering
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\qquad
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\end{figure}
\begin{figure}%
\centering
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\qquad
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\end{figure}
\begin{figure}%
\centering
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\qquad
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\end{figure}
\begin{figure}%
\centering
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\qquad
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\end{figure}
\end{document}
有人知道如何删除所有这些空格吗?谢谢!
答案1
\documentclass{article}
\usepackage{graphicx,colortbl}
\usepackage[landscape, margin=0.25cm]{geometry}
\begin{document}
\definecolor{LightGray}{rgb}{0.85,0.85,0.85}
\begin{table}\centering
\begin{tabular}{|r|l|}\arrayrulecolor{LightGray} \hline
\includegraphics[width=13cm]{letter_U}&\includegraphics[width=13cm]{letter_U} \\ \hline
\includegraphics[width=13cm]{letter_U}&\includegraphics[width=13cm]{letter_U} \\ \hline
\includegraphics[width=13cm]{letter_U}&\includegraphics[width=13cm]{letter_U} \\ \hline
\includegraphics[width=13cm]{letter_U}&\includegraphics[width=13cm]{letter_U} \\ \hline
\end{tabular}
\end{table}
\end{document}
答案2
我会使用更简单的标记,例如
\documentclass[a4,landscape]{article}
\setlength\textwidth{80cm}
\setlength\textheight{80cm}
\setlength\parindent{0cm}
\setlength\hoffset{-7cm}
\setlength\voffset{-2cm}
\usepackage{graphicx,color}
\definecolor{LightGray}{rgb}{0.85,0.85,0.85}
\begin{document}
{
\offinterlineskip
\newcommand\zzzz{\fcolorbox{LightGray}{white}{\includegraphics[width=13cm]{zzzz}}}
\zzzz\zzzz
\zzzz\zzzz
\zzzz\zzzz
\zzzz\zzzz
}
\end{document}
答案3
我对你的代码做了很大改动,但我想你不介意所有的子浮点数都在一个图形环境中。
\documentclass[a4paper]{report}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage[landscape, margin=0.25cm]{geometry}
\usepackage{mdframed}
\usepackage{subfig}
\begin{document}
%\definecolor{Gray}{gray}{0.25}
\definecolor{LightGray}{rgb}{0.85,0.85,0.85}
\newcommand{\cfbox}[1]{%
\adjustbox{cfbox=#1}%
}
\begin{figure}%
\centering
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}\\[-4ex]%
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}\\[-4ex]%
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}\\[-4ex]%
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\subfloat{\cfbox{LightGray}{\includegraphics[width=13cm]{Letter_U.png}}}%
\end{figure}
\end{document}