我正在与一位需要两个不同脚注流的作者合作。这可以很容易地通过使用 来实现bigfoot
。
编辑 还要注意,使用的边距很窄,大约 10 毫米左右。因此,第二条流应该位于文本“下方”。
我做过类似的事情:
\documentclass[a5paper,11pt]{scrbook}
\usepackage{geometry}
\usepackage{perpage}
\usepackage[ruled]{bigfoot}
\MakePerPage{footnote}
\renewcommand{\thefootnote}{\alph{footnote}}
\DeclareNewFootnote{A}[arabic]
\begin{document}
Lorem\footnote{a footnote stream} ipsum dolor sit amet, consectetur adipiscing elit.
Vestibulum ut lorem\footnote{a footnote stream} ligula. Pellentesque eget nibh quam.
Etiam molestie iaculis dictum. Ut fringilla odio quis quam aliquet egestas. Nam
dignissim ante eu nibh bibendum, a laoreet ipsum\footnoteA{another footnote stream}
aliquam. Donec euismod erat ac malesuada sodales. Fusce viverra feugiat ligula vel
rhoncus. Aliquam erat volutpat. Nullam consequat sollicitudin quam, id dapibus tellus.
Nulla tempus mattis justo, eget aliquam elit vehicula sed.
Curabitur ante felis, rutrum sed sem nec, fringilla rhoncus metus. Mauris blandit, dui
non tempus porttitor, sapien urna fermentum ligula, nec molestie dolor lacus vel
ipsum\footnoteA{another footnote stream}. Maecenas odio enim, vulputate sit amet nulla
nec, laoreet imperdiet sapien. Cum sociis natoque penatibus et magnis dis parturient
montes, nascetur ridiculus mus. Integer sed tincidunt dolor. Nunc laoreet interdum
condimentum. Maecenas neque urna, porttitor ac neque id, gravida cursus odio.
In egestas lobortis nisi eu malesuada. Donec leo nibh, vulputate vel arcu vel,
adipiscing pharetra ipsum\footnoteA{another footnote stream}. Maecenas vitae augue
luctus, ultrices nisi sed, hendrerit ipsum\footnoteA{another footnote stream}.
Suspendisse potenti. Mauris id blandit arcu, et sodales massa. Sed laoreet dapibus
lectus id bibendum. Nunc eget orci id lectus auctor sagittis. Vivamus tincidunt semper
mattis. Curabitur quis lorem\footnote{a footnote stream} tortor.
Sed volutpat urna ligula, eget posuere neque condimentum eu. Integer feugiat erat ac
lorem interdum, ut pharetra quam blandit. Nulla blandit sit amet tellus at cursus. Nam
eget eleifend felis. Aliquam pulvinar mi sit amet magna gravida congue. Mauris
pellentesque dui et turpis laoreet dictum. Donec commodo ultricies risus, eget
fringilla sapien hendrerit eu.
\end{document}
但是作者问我,是否有可能一条流位于另一条流旁边,而不是位于另一条流下方。
当然,如果给定页面中仅存在第二个流,则将其单独放在右侧。
有什么方法可以实现这一点?我尝试使用scrextend
可帮助我设置脚注左右边距的包,但这似乎无法解决我的问题。
答案1
(按要求。)下面是一个示例,说明如何memoir
设置具有两个不同脚注流的双列脚注。但是,将它们并排堆叠需要认真的技术人员的工作……
\documentclass{memoir}
\usepackage[T1]{fontenc}
\usepackage{lipsum,ragged2e}% ragged2e provides \RaggedRight
% Two-column footnotes
\twocolumnfootnotes% look at approx. lines 9327-9429 in memoir.cls
% Set up new footnote series
\newfootnoteseries{A}
\twocolumnfootstyle{A}
\renewcommand{\thefootnoteA}{\alph{footnoteA}}
% Styling of (all) footnotes
\renewcommand{\foottextfont}{\footnotesize\RaggedRight}
\begin{document}
\footnote{\lipsum*[1]}%
\footnoteA{This is the `A' Level. \lipsum*[3]}%
\lipsum[1-2]
\footnote{\lipsum[2]}%
\footnoteA{This is the `A' Level.}%
\lipsum[3-4]
\end{document}
答案2
我认为我有一个解决方案,但代码是被盗或多或少是完整的,请不要指望我解释它:
\documentclass{article}
\usepackage{atbegshi}
\usepackage{zref-abspage}
\usepackage{picture}
\usepackage{perpage, xspace}
\makeatletter
\providecommand*{\c@zabspage}{\c@abspage}
% * User macros for configuring
%
% \tbmparItemSep is inserted between marginal notes
% \tbmparMiddleSep is inserted between top and bottom marginal notes.
\newcommand*{\tbmparItemSep}{%
\vspace{1ex minus .5ex}%
% \hrule
\vspace{1ex minus .5ex}%
}
\newcommand*{\tbmparMiddleSep}{%
\vspace*{0pt plus 1fil}%
}
% * Debug messages
%
\newcommand*{\tbmparDebug}[1]{%
\typeout{[tbmpar] #1}%
}
% * Label management to remember absolute page number
%
% \tbmpar@PageByLabel stores and loads absolute page number from
% label and defines \tbmpar@page with absolute page number or
% zero if the label is not yet available.
\newcount\c@tbmpar@item
\c@tbmpar@item\z@
\newcommand*{\tbmpar@PageByLabel}{%
\global\advance\c@tbmpar@item\@ne
\zref@labelbyprops{tbmpar\the\c@tbmpar@item}{abspage}%
\edef\tbmpar@page{%
\zref@extractdefault{tbmpar\the\c@tbmpar@item}{abspage}{0}%
}%
\zref@refused{tbmpar\the\c@tbmpar@item}%
\tbmparDebug{Item \the\c@tbmpar@item\space on page \tbmpar@page}%
}
% * Box register management
\newcount\c@tbmpar@box
\c@tbmpar@box\z@
\let\tbmpar@boxfreelist\@empty
% Get a new free box register either from the free list or,
% if the free list is empty, allocate a new box register.
\newcommand*{\tbmpar@NextBox}[1]{%
\@next#1\tbmpar@boxfreelist{%
\tbmparDebug{Reused box: #1}%
}{%
\global\advance\c@tbmpar@box\@ne
\expandafter\newbox\csname tbmpar@box\the\c@tbmpar@box\endcsname
\edef#1{\csname tbmpar@box\the\c@tbmpar@box\endcsname}%
\tbmparDebug{New box: #1}%
}%
}
% Put free box in free list.
\newcommand*{\tbmpar@FreeBox}[1]{%
\begingroup
\let\@elt\relax
\xdef\tbmpar@boxfreelist{%
\tbmpar@boxfreelist
\@elt#1%
}%
\tbmparDebug{Free box: #1}%
\endgroup
}
\newsavebox{\tbmpar@box}
% Each marginpar is put in a box that is initialized as
% parbox/minipage.
\newcommand*{\tbmparBoxSetup}{}
\newcommand{\tbmpar@VBox}[1]{%
\vbox{%
\color@begingroup
\hsize\marginparwidth
\edef\tbmpar@restore@ifminipage{%
\if@minipage
\noexpand\@minipagetrue
\else
\noexpand\@minipagefalse
\fi
}%
\@parboxrestore
\@marginparreset
\tbmparBoxSetup
#1%
\tbmpar@restore@ifminipage
\color@endgroup
}%
}
% Macro \tbmpar@marginpar looks for the page, where the margin note
% belongs to, stores the note in a box and appends the box to the
% note collector register of the page.
% Each page is assigned a box collector registers that collect
% the top notes and a register that collect the bottom notes.
% The name of the box register is \tbmpar@<top|bot>box<page>.
\newcommand{\tbmpar@marginpar}[4]{%
\ifhmode
\@bsphack
\fi
\tbmpar@PageByLabel
\ifnum\tbmpar@page>\z@
\setbox\tbmpar@box\tbmpar@VBox{#4}%
\@ifundefined{tbmpar@#1box\tbmpar@page}{%
\tbmpar@NextBox\tbmpar@currbox
\global\expandafter\let
\csname tbmpar@#1box\tbmpar@page\endcsname
\tbmpar@currbox
\global\setbox\tbmpar@currbox=\vbox{%
\unvbox\tbmpar@box
}%
}{%
\tbmparDebug{Use box: \tbmpar@currbox}%
\expandafter\let\expandafter\tbmpar@currbox
\csname tbmpar@#1box\tbmpar@page\endcsname
\global\setbox\tbmpar@currbox\tbmpar@VBox{%
\unvbox#2%
\par
\begingroup
\tbmparItemSep
\endgroup
\unvbox#3%
}%
}%
\fi
\ifhmode
\@esphack
\fi
}
\newcommand*{\topmarginpar}{%
\tbmpar@marginpar{top}\tbmpar@currbox\tbmpar@box
}
\newcommand*{\botmarginpar}{%
\tbmpar@marginpar{bot}\tbmpar@box\tbmpar@currbox
}
\newcounter{Rnnr}
\MakePerPage{Rnnr}% Counterreset every new page
% with package perpage, there also is zref-perpage
\renewcommand{\theRnnr}{\alph{Rnnr}}% print letters as anchors
\newcommand{\Anm}[1]{%
\refstepcounter{Rnnr}%
\textsuperscript{\textit{\theRnnr}}% Anker im Text
\botmarginpar{% Randnotiz
\textsuperscript{\theRnnr}#1\xspace}} %%Randnotentext
% At shipout time we look for the box collector registers of this
% page and set these boxes in the marginpar box with respecting
% \topskip and \maxdepth.
\AtBeginShipout{%
\AtBeginShipoutUpperLeft{%
\put(%
\dimexpr 1in+\oddsidemargin+\textwidth+\marginparsep\relax,%
-\dimexpr 1in+\topmargin+\headheight+\headsep+\textheight\relax
){%
\begingroup
\global\let\tbmpar@inuse=N%
\setbox\tbmpar@box=\tbmpar@VBox{%
\penalty-\@M
\edef\tbmpar@tmp{tbmpar@topbox\the\value{zabspage}}%
\@ifundefined{\tbmpar@tmp}{%
}{%
\expandafter\let\expandafter\tbmpar@currbox
\csname\tbmpar@tmp\endcsname
\unvbox\tbmpar@currbox
\tbmpar@FreeBox\tbmpar@currbox
\global\let\tbmpar@inuse=Y%
}%
\endgraf
\tbmparMiddleSep
\edef\tbmpar@tmp{tbmpar@botbox\the\value{zabspage}}%
\@ifundefined{\tbmpar@tmp}{%
}{%
\expandafter\let\expandafter\tbmpar@currbox
\csname\tbmpar@tmp\endcsname
\unvbox\tbmpar@currbox
\tbmpar@FreeBox\tbmpar@currbox
\global\let\tbmpar@inuse=Y%
}%
}%
\ifx\tbmpar@inuse Y%
\splittopskip=\topskip
\setbox0=\vsplit\tbmpar@box to\z@
\boxmaxdepth=\maxdepth
\setbox\tbmpar@box=\vbox to\textheight{%
\unvbox\tbmpar@box
}%
\box\tbmpar@box
\fi
\endgroup
}%
}%
}
\makeatother
% Testing
\usepackage[
a5paper,
left=10mm,
right=10mm,
marginparwidth=40mm,
includemp,
]{geometry}
\usepackage{microtype}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\clubpenalty=10000
\flushbottom
\settodepth\maxdepth{g}
\setlength{\fboxsep}{1ex}
\usepackage{lipsum}
\usepackage{color}
\newcommand*{\shortlipsum}[1]{%
\begingroup
\long\def\y##1. ##2\@nil{##1.}%
\edef\x{\csname lipsum@\romannumeral#1\endcsname}%
\expandafter\y\x. \@nil
\endgroup
}
\begin{document}
Lorem\footnote{a footnote stream} ipsum dolor sit amet, consectetur
adipiscing elit. Vestibulum ut lorem\footnote{a footnote stream}
ligula. Pellentesque eget nibh quam. Etiam molestie iaculis
dictum. Ut fringilla odio quis quam aliquet egestas. Nam dignissim
ante eu nibh bibendum, a laoreet ipsum\Anm{another footnote
stream} aliquam. Donec euismod erat ac malesuada sodales. Fusce
viverra feugiat ligula vel rhoncus. Aliquam erat volutpat. Nullam
consequat sollicitudin quam, id dapibus tellus. Nulla tempus mattis
justo, eget aliquam elit vehicula sed.
Curabitur ante felis, rutrum sed sem nec, fringilla rhoncus
metus. Mauris blandit, dui non tempus porttitor, sapien urna fermentum
ligula, nec molestie dolor lacus vel ipsum\Anm{another footnote
stream}. Maecenas odio enim, vulputate sit amet nulla nec, laoreet
imperdiet sapien. Cum sociis natoque penatibus et magnis dis
parturient montes, nascetur ridiculus mus. Integer sed tincidunt
dolor. Nunc laoreet interdum condimentum. Maecenas neque urna,
porttitor ac neque id, gravida cursus odio.
In egestas lobortis nisi eu malesuada. Donec leo nibh, vulputate vel
arcu vel, adipiscing pharetra ipsum\Anm{another footnote
stream}. Maecenas vitae augue luctus, ultrices nisi sed, hendrerit
ipsum\Anm{another footnote stream}. Suspendisse
potenti. Mauris id blandit arcu, et sodales massa. Sed laoreet dapibus
lectus id bibendum. Nunc eget orci id lectus auctor sagittis. Vivamus
tincidunt semper mattis. Curabitur quis lorem\footnote{a footnote
stream} tortor.
Sed volutpat urna ligula, eget posuere neque condimentum eu. Integer
feugiat erat ac lorem interdum, ut pharetra quam blandit. Nulla
blandit sit amet tellus at cursus. Nam eget eleifend felis. Aliquam
pulvinar mi sit amet magna gravida congue. Mauris pellentesque dui et
turpis laoreet dictum. Donec commodo ultricies risus, eget fringilla
sapien hendrerit eu.
\end{document}