正文边注

正文边注

我感兴趣的是在文档的边缘添加类似便签的边注。

如果它们只是\marginpar用边距宽度和间隔来制作和玩弄的话,根本没有问题。

但我的问题是:如何使边注更宽并使其侵入文档主体?它将如何包装正文?让我用一个例子来澄清一下:

|   asdfasdfasdfasdfasfs        |
|   sadfasdfasdfasdfasas        |
|   asdfajhdfasfd               |
|   jhfasdjfasdfj +----------+  |
|   asdfasdfasdfa | asdasdfa |  |
|   jkasdfjasdfas | sdfadfas |  |
|   jhfasdjfasdfj +----------+  |
|   asdfajhdfasfd               |
|   asdfasdfasdfasdfasfs        |
|   sadfasdfasdfasdfasas        |

我对一些解决方案感兴趣,同时也考虑到我不知道的有关该wrapfig软件包的一些方面。

那么...双面文件(书籍类)怎么样?

答案1

一种方法是使用wrapfigure环境:

\documentclass[twoside]{article}
\usepackage{lipsum}
\usepackage{wrapfig}
\setlength{\wrapoverhang}{\marginparwidth}
\addtolength{\wrapoverhang}{\marginparsep}
\usepackage[left=1in,right=2.5in,top=1in,bottom=1in]{geometry}
\begin{document}
\lipsum[1]
\begin{wrapfigure}[11]{O}{6.3cm}
\vspace{-10pt} %% If needed
This is a margin note getting wrapped with the text and going into margin as well.
In \verb!\begin{wrapfigure}[8]{O}[2cm]{6cm}!, \texttt{[8]} denotes the number of line space in the margin note, \texttt{{O}} is the alignment, \texttt{[2cm]} is amount by which the note goes in to the margin (called over hang) and \texttt{{6cm}} is the width.
\vspace{10pt} %% If needed
\end{wrapfigure}
\lipsum[2-3]
\clearpage
\lipsum[3]
\begin{wrapfigure}[11]{O}{6.3cm}
% \vspace{-10pt} %% If needed
This is a margin note getting wrapped with the text and going into margin as well.
In \verb!\begin{wrapfigure}[8]{O}[2cm]{6cm}!, \texttt{[8]} denotes the number of line space in the margin note, \texttt{{O}} is the alignment, \texttt{[2cm]} is amount by which the note goes in to the margin (called over hang) and \texttt{{6cm}} is the width.
% \vspace{10pt} %% If needed
\end{wrapfigure}
\lipsum[4-5]

\end{document}

enter image description here

相关内容