具有单词定义的高级脚注布局

具有单词定义的高级脚注布局

几天来,我一直在努力解决作者提出的一个特殊要求。

假设您有一段文本,其中有脚注,并且您想要定义单词的含义。例如,在法语中,“amour”可以是“love”或“like”。因此,作者希望在文本中当文本为“love”时使用“amour1”,当文本为“like”时使用“amour2”,并在脚注后显示定义。

为了更好地理解,我“手工”做了一些示例来向您展示他想要什么。

首先是脚注,然后是按字母顺序排列的单词定义。


在此处输入图片描述


或者更好的是应该将单词的定义放在右边(2 列?)就像这样


在此处输入图片描述


我查看了标准脚注、bigfoot、footmise 和 multifoot,但没有找到满足要求的方法。


最终解决方案

我验证了@Steven B. Segletes 的解决方案,因为它最接近我所要求的,并且极大地帮助我指出了要遵循的路径。我更新/修改了他给出的解决方案,添加了perpage和包括,manyfoot以便有两个独立的脚注流。

现在我需要知道如何将第二个脚注流放在右边,为此我提出了一个新问题:将两个脚注流并排布置

我最终得到的解决方案如下:

\documentclass[a4paper,11pt]{book}
\usepackage{scrextend, perpage}
\usepackage[ruled]{manyfoot}
\MakePerPage{footnote}

\DeclareNewFootnote{A}


\def\resetfootnotemarks{%
  \deffootnote[1em]{0em}{1em}{$^{\alph{footnote}}$}%
  \deffootnotemark{\textsuperscript{\alph{footnote}}}%
}
\resetfootnotemarks

\newcommand\footdef[3]{%
  \deffootnotemark{\textsuperscript{\thefootnotemark}}%
  \setcounter{footnoteA}{#1}%
  \addtocounter{footnoteA}{-1}%  
  \setbox0=\hbox{#2$^{\thefootnotemark}$:\ }%
  \deffootnote[\wd0]{0em}{1em}{#2$^{\thefootnotemark}$:\ }%
  #2\footnoteA{#3}%  
  \resetfootnotemarks%
}

\newcommand\footdefmark[2]{%
  \deffootnotemark{\textsuperscript{\thefootnotemark}}%
  #2\footnotemark[#1]%
  \deffootnotemark{\textsuperscript{\alph{footnote}}}%
}

\textheight5in
\begin{document}
This is a test\footnote{this is a standard footnote} and 
another\footnote{Another footnote} of normal footnotes.
Now we wish to test the use of footnote definitions.
This is a \footdef{1}{test}{noun meaning of test} 
of the Emergency broadcast system in which ``test'' is used as a noun.
But we can also \footdef{2}{test}{verb meaning of test} the verb meaning
of the word.  I can repeat a \footdefmark{1}{test} of something already done.
I can choose a new \footdef{4}{word}{a sequence of letters with meaning}
and differentiate it from a \footdef{3}{word}{a grouping of $n$ bytes
forming the bit width of the processor} for the Z80 processor.
And this is back to\footnote{A Normal Footnote} a normal footnote.
This is a test\footnote{this is a standard footnote} and 
another\footnote{Another footnote} of normal footnotes.
Now we wish to test the use of footnote definitions.
This is a \footdefmark{1}{test}{noun meaning of test} 
of the Emergency broadcast system in which ``test'' is used as a noun.
But we can also \footdefmark{2}{test}{verb meaning of test} the verb meaning
of the word.  I can repeat a \footdefmark{1}{test} of something already done.
I can choose a new \footdefmark{4}{word}{a sequence of letters with meaning}
and differentiate it from a \footdefmark{3}{word}{a grouping of $n$ bytes
forming the bit width of the processor} for the Z80 processor.
And this is back to\footnote{A Normal Footnote} a normal footnote.
\end{document}

结果是:

在此处输入图片描述

答案1

我使用了scrextend在这里第一次读到的包:文本和脚注中的脚注标记格式不同。它模仿了其他文档类别的 KOMA-Script 的功能,因此要阅读文档,可以查找 KOMA-Script,例如:http://texdoc.net/texmf-dist/doc/latex/koma-script/scrguien.pdf

我介绍的语法是

\footdef{number}{word}{definition}

引入一种新的使用定义definition的方式。如果我引用之前提供的定义,我会使用wordnumber

\footdefmark{number}{word}

这是我的 MWE。

\documentclass{article}
\usepackage{scrextend, lipsum}
\newcounter{svfn}
\def\resetfootnotemarks{%
  \setcounter{footnote}{\thesvfn}%
  \deffootnote[1em]{0em}{1em}{$^{\alph{footnote}}$}%
  \deffootnotemark{\textsuperscript{\alph{footnote}}}%
}
\resetfootnotemarks
\newcommand\footdef[3]{%
  \deffootnotemark{\textsuperscript{\thefootnotemark}}%
  \setcounter{svfn}{\thefootnote}%
  \setcounter{footnote}{#1}%
  \addtocounter{footnote}{-1}%
  \setbox0=\hbox{#2$^{\thefootnotemark}$:\ }%
  \deffootnote[\wd0]{0em}{1em}{#2$^{\thefootnotemark}$:\ }%
  #2\footnote{#3}%
  \resetfootnotemarks%
}
\newcommand\footdefmark[2]{%
  \deffootnotemark{\textsuperscript{\thefootnotemark}}%
  #2\footnotemark[#1]%
  \deffootnotemark{\textsuperscript{\alph{footnote}}}%
}
\textheight2.5in
\begin{document}
This is a test\footnote{this is a standard footnote} and 
another\footnote{Another footnote} of normal footnotes.

Now we wish to test the use of footnote definitions.
This is a \footdef{1}{test}{noun meaning of test} 
of the Emergency broadcast system in which ``test'' is used as a noun.
But we can also \footdef{2}{test}{verb meaning of test} the verb meaning
of the word.  I can repeat a \footdefmark{1}{test} of something already done.
I can choose a new \footdef{1}{word}{a sequence of letters with meaning}
and differentiate it from a \footdef{2}{word}{a grouping of $n$ bytes
forming the bit width of the processor} for the Z80 processor.

And this is back to\footnote{A Normal Footnote} a normal footnote.
\par\lipsum[1]
\end{document}

在此处输入图片描述

答案2

您要求添加脚注。我发现两种脚注很令人困惑,建议将定义放在页边距中。这样定义就不会干扰脚注。

\documentclass[pagesize]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{scrlayer-notecolumn, scrlayer-scrpage, calc, perpage,
  xspace}


 \DeclareNewNoteColumn[font=\sffamily\footnotesize, width=3cm, 
 position=\oddsidemargin+1in+\textwidth-3cm+\marginparsep]{randnot}

\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
  \makenote[randnot]{% Randnotiz
    \textsuperscript{\theRnnr}#1\xspace}} %%Randnotentext


\begin{document}
\begin{addmargin}[0cm]{3cm}

  Video provides a powerful way to help you prove your point.
  When\Anm{when\textsuperscript{1}: first meaning of when}\label{rn:first-when} you click
  Online Video, you can paste in the embed code for the video you want
  to add. You can also type a keyword to search on line for the video
  that best fits your document. To make your document look
  professionally produced, Word provides\footnote{This is a standalone
    footnote} header, footer, cover page, and text box designs that
  complement each other.

  For example, you can add a matching\footnote{Footnote next} cover
  page, header, and sidebar. Click Insert and then choose the elements
  you want from the different galleries. Themes and styles also help
  keep your document coordinated. When\Anm{when\textsuperscript{3}: third meaning of
    when}\label{rn:third-when} you click Design and choose a new
  Theme, the pictures, charts, and SmartArt graphics change to match
  your new theme.

  When\textsuperscript{\ref{rn:first-when}} you apply styles, your
  headings change to match the new theme. Save time in Word with new
  buttons that show up where\Anm{where\textsuperscript{2}: second meaning of
    where}\label{rn:second-where} you need them. To change the way a
  picture fits in your document, click it and a button for layout
  options appears next to it. When\Anm{when\textsuperscript{2}: Second meaning of
    when}\label{rn:second-when} you work on a table, click
  where\textsuperscript{\ref{rn:second-where}} you want to add a row
  or a column, and then click the plus sign.  Reading is easier, too,
  in the new Reading view. You can collapse parts ofthe document and
  focus on the text you want.  If you need to stop reading before you
  reach the end, Word remembers
  where\textsuperscript{\ref{rn:second-where}} you left off - even on
  another device. Video provides a powerful way to help you prove your
  point\footnote{Last footnote}.


\end{addmargin}
\end{document} 

这只是一个演示,而不是一个完整的解决方案。

页面设计

相关内容