在我的论文中,我需要在附录中包含 79 个项目的描述。每个描述大约占半页,并包含一张图片。我希望每页始终有两张这样的图片,并让文本(将是一个枚举)环绕在图片周围。
我曾想象我可以创建迷你页面并在每页中放置两个。首先,我意识到我无法在迷你页面或其他类似环境中使用浮动,所以也许我不能使用迷你页面或类似环境?其次,如果没有迷你页面,wrapfig 会将图片放置在一些奇怪的地方。我如何让我的布局看起来像模型?
这里的 MWE 只是为了获得文本,它编译成的东西与我想要的完全不同:
\documentclass[a4paper]{article}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{mwe}
\begin{document}
\section{The name (preferably as a section)}
\begin{wrapfigure}{r}{0.5\textwidth}
\includegraphics[width=0.48\textwidth]{example-image}
\end{wrapfigure}
\begin{description}
\item[Color] red
\item[Year] 2005
\item[Something else] This is a feature which needs a longer explanation. It will wrap around.
\item[Foo] bar
\item[And another long item] Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\end{description}
\section{The name of the second one}
\begin{wrapfigure}{r}{0.5\textwidth}
\includegraphics[width=0.48\textwidth]{example-image}
\end{wrapfigure}
\begin{description}
\item[Color] green
\item[Year] 2010
\item[Something else] This is a feature which needs a longer explanation. It will wrap around.
\item[Foo] bar
\item[And another long item] Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\end{description}
\end{document}
答案1
以下是一个解决方案。我用包中的特殊格式替换了环境(不起作用)wrapfigure
的项目,以模仿描述环境的布局:description
wrapfigure
\paragraph
titlesec
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{fourier, erewhon}
\usepackage[showframe]{geometry}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{mwe}
\usepackage{appendix}
\usepackage[aftersep]{titlesec}
\titleformat{\paragraph}[runin]{\bfseries\normalsize}{}{0em}{}[]
\titlespacing{\paragraph}{-\leftskip}{\topsep}{\itemsep}
\begin{document}
\appendix
\leftskip =2.5em
\setlength\intextsep{1.3ex}
\renewcommand\thesection{A.\arabic{section}}
\section{The name (preferably as a section)}
\begin{wrapfigure}[12]{r}{0pt}
\hspace*{-2em}\includegraphics[width=0.48\textwidth]{example-image}\hspace*{2.5em}
\end{wrapfigure}
\paragraph{Color} red
\paragraph{Year} 2005
\paragraph{Something else} This is a feature which needs a longer explanation. It will wrap around.
\paragraph{Foo} bar
\paragraph{And another long item} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\section{The name of the second one}\leftskip =2.5em
\begin{wrapfigure}[12]{r}{0pt}
\hspace*{-2em}\includegraphics[width=0.48\textwidth]{example-image}\hspace*{2.5em}
\end{wrapfigure}
\paragraph{Color} green
\paragraph{Year} 2010
\paragraph{Something else} This is a feature which needs a longer explanation. It will wrap around.
\paragraph{Foo} bar
\paragraph{And another long item} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\end{document}