我使用 centerentry 命令
但正如您在示例中看到的,这两个符号列表没有很好地分组。您有什么想法吗?
垂直获取标题前后的一些景观?
水平移动?该命令
assmargin
不起作用。还有其他方法吗?
\documentclass{article}
\usepackage{graphicx, tabularx}
\usepackage[nopar]{lipsum}
\usepackage[export]{adjustbox}
\newenvironment{centerentry}[2][]
{\renewcommand{\tabularxcolumn}[1]{m{##1}}
\noindent
\tabularx{\linewidth}{ @{} m{\imagecolwidth} X @{} }
\includegraphics[width=\linewidth,#1]{#2} &
}{%
\endtabularx%
}
\newlength{\imagecolwidth}
\setlength{\imagecolwidth}{2em}
\sloppy% Just for this example
\begin{document}
\section {Write some text}
Some important symbols (I)\\
%\begin{addmargin}[0.2cm]{0.3cm} %%% DOES NOT WORK
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
%\end{addmargin} %%% DOES NOT WORK
Some important symbols (II)\\
%\begin{addmargin}[0.2cm]{0.3cm} %%% DOES NOT WORK
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
%\end{addmargin} %%% DOES NOT WORK
\end{document}
答案1
您可以使用合理的分段命令获得更好的垂直间距。要移动边缘处的图像,您可以使用表格中的负空间:
\documentclass{article}
\usepackage{graphicx, tabularx}
\usepackage[nopar]{lipsum}
\usepackage[export]{adjustbox}
\newenvironment{centerentry}[2][]
{\renewcommand{\tabularxcolumn}[1]{m{##1}}%
\noindent
\tabularx{\linewidth}{ @{\hspace{\dimexpr-2em-2\tabcolsep\relax}} m{\imagecolwidth} X @{} }
\includegraphics[width=\linewidth,#1]{#2} &
}{%
\endtabularx%
}
\newlength{\imagecolwidth}
\setlength{\imagecolwidth}{2em}
\sloppy% Just for this example
\begin{document}
\section {Write some text}
\subsection*{Some important symbols (I)}
%\begin{addmargin}[0.2cm]{0.3cm} %%% DOES NOT WORK
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
%\end{addmargin} %%% DOES NOT WORK
\subsection*{Some important symbols (II)}
%\begin{addmargin}[0.2cm]{0.3cm} %%% DOES NOT WORK
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
\begin{centerentry}{example-image-a} Write some text to get more lines. Write some text to get more lines. \end{centerentry}
%\end{addmargin} %%% DOES NOT WORK
\end{document}