
答え1
wrapfigure
環境(から)を使用することができますwrapfig
パッケージ)。この環境は、メインテキストを囲むボックスを作成します。このボックスの幅と位置 ( l
eft またはr
ight、および両面ドキュメントの場合はi
nside またはo
utside) を指定できます。さらに、このパッケージには、はみ出し幅の指定がネイティブに含まれています。
\begin{wrapfigure}{<position: l, r, i, or o>}[<overhang width>]{<total width of the wrapfigure>}
<content of the wraping figure>
\end{wrapfigure}
\documentclass{article}
\usepackage{lipsum}
\usepackage{wrapfig}
\usepackage{xcolor}
\begin{document}
\lipsum[1]
\begin{wrapfigure}{r}[.1\textwidth]{.4\textwidth}%
\textbf{\sffamily\Large\textcolor{blue!50!black}{``Good things might come to those who wait\dots''}}%
\end{wrapfigure}
\lipsum[2-3]
\end{document}
元の回答
このソリューションでは、 のネイティブ オーバーハング オプションの代わりに、
parbox
の内部でを使用します。したがって、上記の編集で提案されたものよりも大きくなります。wrapfigure
wrapfig
このソリューションは環境wrapfigure
(wrapfig
パッケージ)。このパッケージは、テキストが折り返されるフローティング ボックスを定義します。このボックスの幅と位置 (左または右) を指定できます。
\begin{wrapfigure}{<position: R or L>}{<width of the wrapfigure>}
<content of the wraping figure>
\end{wrapfigure}
このボックスに引用文を記入します。テキストを余白に表示するために、このテキストを別のボックス、a の中に入れますparbox
。幅が広い環境によって定義されたものよりもwrapfigure
:
\parbox{<width of the box>}{<content of the box>}
\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{xcolor}
\begin{document}
\lipsum[1]
\begin{wrapfigure}{R}{.2\textwidth}%
\parbox{.4\textwidth}{%
\textbf{\sffamily\Large\textcolor{blue!50!black}{``Good things might come to those who wait\dots''}}%
}%
\end{wrapfigure}
\lipsum[2-3]
\end{document}
明示的なボックスを持つ MWE:
\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{showframe}
\begin{document}
\lipsum[1]
\begin{wrapfigure}{R}{.2\textwidth}%
\fbox{\parbox{.3\textwidth}{\textbf{\Large Good things might come to those who wait\dots}}}%
\end{wrapfigure}
\lipsum[2-3]
\end{document}