在页眉和页脚上添加脚注

在页眉和页脚上添加脚注

我需要打印一首带有大量注释的诗。我大概会打印三四行文字,其余页面会被注释填满。

有人问我是否可以将诗歌放在页面的中心,而评论则像脚注一样放在页眉和页脚上。

关于如何设置我的文档有什么想法吗?

谢谢你,A

平均能量损失

\documentclass[a4paper,12pt]{article}
\usepackage{lipsum}

\begin{document}

Nel mezzo del cammin di nostra vita

  mi ritrovai per una selva oscura

  che' la diritta via era smarrita.\footnote{\lipsum[1-6]}

Ahi quanto a dir qual era e` cosa dura

  esta selva selvaggia e aspra e forte

  che nel pensier rinova la paura!\footnote{\lipsum[1-6]}

Tant'e` amara che poco e` piu` morte;

  ma per trattar del ben ch'i' vi trovai,

  diro` de l'altre cose ch'i' v'ho scorte.\footnote{\lipsum[1-6]}

\end{document}

答案1

这是一个修改输出例程的解决方案

\documentclass{article}

%%%%% just for the example
\newcounter{mtctr}
\newcommand{\mtlipsum}[1][100]{%
\setcounter{mtctr}{0}%
\loop
\stepcounter{mtctr}%
\noindent this is line n \textbf{\themtctr}\par
\ifnum\value{mtctr}<#1 
\repeat}
%%%%%
\makeatletter
\gdef \@makecol {%  for normal pages
   \ifvoid\footins
     \setbox\@outputbox \box\@cclv
   \else
     \setbox\@outputbox \vbox {%
       \boxmaxdepth \@maxdepth
       \ifdim\ht\@cclv<1ex
       \color@begingroup
         \normalcolor
         \unvbox \footins
       \color@endgroup
       \unvbox \@cclv
       \else
       \color@begingroup
         \normalcolor
         \vsplit\footins to .5\dimexpr\textheight-3\baselineskip\relax
         \vspace{\footnotesep}
         \footnoterule
       \color@endgroup
       \unvbox \@cclv
       \vspace{\skip\footins}
       \color@begingroup
         \normalcolor
         \footnoterule
         \unvbox \footins
       \color@endgroup
       \fi}%
   \fi
   \let\@elt\relax
   \xdef\@freelist{\@freelist\@midlist}%
   \global \let \@midlist \@empty
   \@combinefloats
   \ifvbox\@kludgeins
     \@makespecialcolbox
   \else
     \setbox\@outputbox \vbox to\@colht {%
       \@texttop
       \dimen@ \dp\@outputbox
       \unvbox \@outputbox
       \vskip -\dimen@
       \@textbottom
       }%
   \fi
   \global \maxdepth \@maxdepth
}
\def \@doclearpage {% special pages (here clearpage of end{document})
     \ifvoid\footins
       \ifvbox\@kludgeins
         {\setbox \@tempboxa \box \@kludgeins}%
       \fi
       \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
       \setbox\@tempboxa\box\@cclv
       \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
       \global \let \@toplist \@empty
       \global \let \@botlist \@empty
       \global \@colroom \@colht
       \ifx \@currlist\@empty
       \else
          \@latexerr{Float(s) lost}\@ehb
          \global \let \@currlist \@empty
       \fi
       \@makefcolumn\@deferlist
       \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
       \if@twocolumn
         \if@firstcolumn
           \xdef\@dbldeferlist{\@dbltoplist\@dbldeferlist}%
           \global \let \@dbltoplist \@empty
           \global \@colht \textheight
           \begingroup
              \@dblfloatplacement
              \@makefcolumn\@dbldeferlist
              \@whilesw\if@fcolmade \fi{\@outputpage
                                        \@makefcolumn\@dbldeferlist}%
           \endgroup
         \else
           \vbox{}\clearpage
         \fi
       \fi
     \else
       \setbox\@cclv\vbox{\box\@cclv\vfil}%
       \mt@makecol\@opcol
       \clearpage
     \fi
}
\gdef \mt@makecol {%
   \ifvoid\footins
     \setbox\@outputbox \box\@cclv
   \else
     \setbox\@outputbox \vbox {%
       \boxmaxdepth \@maxdepth
       \color@begingroup
         \normalcolor
         \unvbox \footins
       \color@endgroup
       \unvbox \@cclv
       }%
   \fi
   \let\@elt\relax
   \xdef\@freelist{\@freelist\@midlist}%
   \global \let \@midlist \@empty
   \@combinefloats
   \ifvbox\@kludgeins
     \@makespecialcolbox
   \else
     \setbox\@outputbox \vbox to\@colht {%
       \@texttop
       \dimen@ \dp\@outputbox
       \unvbox \@outputbox
       \vskip -\dimen@
       \@textbottom
       }%
   \fi
   \global \maxdepth \@maxdepth
}
\makeatother

\begin{document}
An example for a LaTeX
An example for a LaTeX\footnote{\mtlipsum[90]}
An example for a LaTeXAn example for a LaTeX
An example for a LaTeX
An example for a LaTeX\footnote{\mtlipsum[80]}
An example for a LaTeXAn example for a LaTeX
An example for a LaTeX
An example for a LaTeX\footnote{\mtlipsum}
An example for a LaTeXAn example for a LaTeX
\end{document}

答案2

我突然想到,你可能并不真正想要脚注,你只是想在诗歌周围加上评论,这些评论可能与页面没有紧密联系。最简单的方法是将诗歌放入静态框架中,然后用评论填充流动框架。

\documentclass[a4paper,12pt]{article}
\usepackage{flowfram}
\usepackage{lipsum}

\newcounter{id}

\newflowframe[1-3]{\textwidth}{.4\textheight}{0pt}{.6\textheight}
\newflowframe[1-3]{\textwidth}{.4\textheight}{0pt}{0pt}

\newcommand{\next}[1]% #1 = text for one page
{\stepcounter{id}%
\newstaticframe*[\theid]{.6\textwidth}{.1\textheight}{.2\textwidth}{.45\textheight}%
\setstaticcontents{\theid}{\parindent=\bibindent #1}}

\next{%
  Nel mezzo del cammin di nostra vita

  mi ritrovai per una selva oscura

  che' la diritta via era smarrita.
}
\next{%
  Ahi quanto a dir qual era e` cosa dura

  esta selva selvaggia e aspra e forte

  che nel pensier rinova la paura!
}
\next{%
  Tant'e` amara che poco e` piu` morte;

  ma per trattar del ben ch'i' vi trovai,

  diro` de l'altre cose ch'i' v'ho scorte.
}

\begin{document}
\lipsum[1-14]
\end{document}

请注意,诗歌(和流动框架)在第 3 页结束后,可以在普通页面上继续评论。


如果您打算将评论与诗歌紧密联系起来,最简单的方法是将诗歌放入动态框架中,并将诗歌部分与评论混合在一起。但是,如果评论超出了页面末尾,则需要手动在三个页面列表中添加间隙。

\documentclass[a4paper,12pt]{article}
\usepackage{flowfram}
\usepackage{lipsum}

\newdynamicframe*[1-3]{.6\textwidth}{.1\textheight}{.2\textwidth}{.45\textheight}[poem]
\newflowframe[1-3]{\textwidth}{.4\textheight}{0pt}{.6\textheight}
\newflowframe[1-3]{\textwidth}{.4\textheight}{0pt}{0pt}

\newcommand{\next}[1]% #1 = text for one page
{\clearpage\setdynamiccontents*{poem}{\parindent=\bibindent\vfil #1}}

\begin{document}
\next{%
  Nel mezzo del cammin di nostra vita

  mi ritrovai per una selva oscura

  che' la diritta via era smarrita.
}
\lipsum[1]

\next{%
  Ahi quanto a dir qual era e` cosa dura

  esta selva selvaggia e aspra e forte

  che nel pensier rinova la paura!
}
\lipsum[1-3]

\next{%
  Tant'e` amara che poco e` piu` morte;

  ma per trattar del ben ch'i' vi trovai,

  diro` de l'altre cose ch'i' v'ho scorte.
}
\lipsum[1-5]

\end{document}

相关内容