布局文本并枚举图形

布局文本并枚举图形

我想将 放在figure旁边enumerate,并将其插入到前一段中,以便与enumerate环境底部对齐。我设法手动使用cutwin和完成了这项minipage工作。然而,这最终并不像我想要的那样精确——底部有一点模糊的空间——我想知道是否有办法在不明确切割线条和调整hspace/的情况下实现这一点vspace

我曾尝试过wrapfigure,但无法让它停留在同一页面上enumerate,即使我把放在enumerateminipage

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{cutwin}
\usepackage{amstext}
\usepackage{graphicx}
\usepackage{capt-of}
\usepackage{indentfirst}

\title{layout-test}
\author{Author}
\date{April 2018}

\begin{document}

\maketitle

\section{Introduction}

\vspace{8pt}

\renewcommand*{\windowpagestuff}{%
%HACKS
\vspace{18em}\hfill
\begin{minipage}[t]{0.9\textwidth}
    \centering
    \includegraphics[width=\textwidth]{blank.jpg}
    \captionof{figure}[Something spooky]{A marvelous sample figure.}
    \label{fig:sample_figure}
\end{minipage}
}
% HACKS
\opencutright
\begin{cutout}{8}{0.5\linewidth}{0pt}{8}
    \lipsum[1]
\end{cutout}

% HACKS
\vspace{-1em}
\hspace{-1.75em}
\begin{minipage}{0.5\textwidth}
\begin{enumerate}
    \item One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin.
    \item He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections.
    \item The bedding was hardly able to cover it and seemed ready to slide off any moment.
\end{enumerate}
\end{minipage}

\end{document}

呈现的页面

答案1

我认为最简单的方法是使用普通的 TeX 宏包insbox– 更具体地说是它的\InsertBoxR{no of unshortend lines}{box inserted}宏,结合enumitem包,使用它的(未记录的)键rightmargin=

以下是一段简短的代码:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{indentfirst}
\usepackage{fbb}
\usepackage{lipsum}
\usepackage{amstext}
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage{caption}
\captionsetup{format = hang, justification = raggedright, textfont = it, labelsep = newline}
\usepackage{enumitem}
\input{insbox}
\makeatletter
\@InsertBoxMargin =3mm
\makeatother
\title{layout-test}
\author{Author}
\date{April 2018}

\begin{document}

\maketitle

\section{Introduction}{8}

\InsertBoxR{5}{\parbox{0.45\textwidth}{\vspace*{-0.8ex}\adjincludegraphics[width=0.45\textwidth]{paravent}\captionof{figure}{Paravent – Toyen (1966)}}}
 \lipsum[1]
\begin{enumerate}[wide=0em, itemsep=2pt, leftmargin=*, rightmargin=\dimexpr0.45\textwidth +3mm]
    \item One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin.
    \item He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections.
    \item The bedding was hardly able to cover it and seemed ready to slide off any moment.
\end{enumerate}

\end{document} 

在此处输入图片描述

相关内容