![具有不同字体的平行脚注集](https://linux22.com/image/471527/%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E5%AD%97%E4%BD%93%E7%9A%84%E5%B9%B3%E8%A1%8C%E8%84%9A%E6%B3%A8%E9%9B%86.png)
我正在对现有文档撰写评论。
我已经将原始文档设置为一种字体,将注释设置为另一种字体。原始文档已经有脚注,需要将其与原始编号一起包含在内,例如\footnote[23]{Footnote text}
。我还有其他脚注需要包含。我希望使脚注与其各自的字体相匹配。
manyfoot
我还没有尝试使用bigfoot
它们。它们的文档对于普通人来说太过复杂了。
请考虑这一点,我尝试更新脚注命令(没有特殊包)来更改字体:
%MWE1
\documentclass[10pt,a4paper,twoside]{article}
\usepackage[latin1]{inputenc}
\usepackage[UKenglish]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{array} %Needed to allow formatting of table columns
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{verbatim} %Allows for comment environments
\usepackage{xcolor}
\usepackage{mdframed} %For background boxes, breaks across pages
\usepackage{longtable} %To split table across pages
%\usepackage{manyfoot}
%\usepackage{bigfoot}
\usepackage[colorlinks=true, citecolor=black, urlcolor=blue]{hyperref}
\newenvironment{orig} % %Text in original doc
{\sffamily
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
} %
\newenvironment{comm} % %Commentary on doc
{\rmfamily
\setlength{\parindent}{15pt}
\setlength{\parskip}{0pt plus 1pt minus 1pt}
} %
\newcommand{\origi}[1]{\textsf{#1}} %Brief original text
\newcommand{\comme}[1]{\textrm{#1}} %Brief comment
\newcommand{\footnoteorig}[1]{ %Attempted footnote adjustment
\renewcommand{\thefootnote}{\origi{\arabic{footnote}}} %Make the footnote number \sf
\footnote{\textsf{#1}} %And the footnote text
\renewcommand{\thefootnote}{\comme{footnote}} %This resets the footnote number to \rm
}
%\renewcommand{\thefootnote}{\roman{footnote}} %Make footnotes separate from original ones
%\newcommand{\footnoteorig}[2]{\renewcommand{\thefootnote}{\roman{\footnote}} \footnotemark[#1] \footnotetext[#1]{#2} \renewcommand{\thefootnote}{\arabic{\footnote}}}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[LO,LE]{MWE}
\fancyhead[RO,RE]{Footnotes}
\fancyfoot[RO,LE]{DRAFT}
\fancyfoot[RE,LO]{}
\fancyfoot[CE,CO]{\thepage}
%\DeclareNewFootnote[plain]{A}[roman]
%\DeclareNewFootnote[plain]{B}[alph]
%\DeclareNewFootnote[plain]{C}[Roman]
\begin{document} %This is without using any footnote package.
Intro text here\footnote{FN0}
More text\footnote{FN1}
\begin{orig}
Orig text with its own footnote numbers to retain\footnote[1]{Original footnote with fixed number, should be in same font as its environment, i.e. \textsf{sans-serif}}
\comme{A brief comment here with a footnote\footnote{FN3}}
\begin{mdframed}[linewidth=0.5pt]
More original text in a frame\footnotemark
\end{mdframed}
\footnotetext{FN4}
\begin{comm}
Some more commentary\footnote{FN5}
\end{comm}
And more\footnoteorig{FN6 Original footnotes throughout doc, but the next one shows what happens with a given footnote number} \footnoteorig[7]{FN7}
Yet more\footnote{This footnote is not original and should stay in \textrm{commentary style}}
\end{orig}
Final text\footnote{Final footnote, which may be more than the alphabetic or roman maxima}
\end{document}
我的第二次尝试使用manyfoot
如下bigfoot
形式:
%MWE2
\documentclass[10pt,a4paper,twoside]{article}
\usepackage[latin1]{inputenc}
\usepackage[UKenglish]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{array} %Needed to allow formatting of table columns
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{verbatim} %Allows for comment environments
\usepackage{xcolor}
\usepackage{mdframed} %For background boxes, breaks across pages
\usepackage{longtable} %To split table across pages
\usepackage{manyfoot}
%\usepackage{bigfoot}
\usepackage[colorlinks=true, citecolor=black, urlcolor=blue]{hyperref}
\newenvironment{orig} % %Text in original doc
{\sffamily
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
} %
\newenvironment{comm} % %Commentary on doc
{\rmfamily
\setlength{\parindent}{15pt}
\setlength{\parskip}{0pt plus 1pt minus 1pt}
} %
\newcommand{\origi}[1]{\textsf{#1}} %Brief original text
\newcommand{\comme}[1]{\textrm{#1}} %Brief comment
%\newcommand{\footnoteorig}[1]{ %Attempted footnote adjustment
% \renewcommand{\thefootnote}{\origi{\arabic{footnote}}} %Make the footnote number \sf
% \footnote{\textsf{#1}} %And the footnote text
% \renewcommand{\thefootnote}{\comme{footnote}} %This resets the footnote number to \rm
% }
\DeclareNewFootnote[plain]{orig}[arabic]
\DeclareNewFootnote[plain]{comm}[alph]
\DeclareNewFootnote[plain]{comm2}[roman]
\renewcommand*{\thefootnoteorig}{\origi{footnoteorig}}
\renewcommand*{\thefootnotecomm}{\comme{footnotecomm}}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[LO,LE]{MWE}
\fancyhead[RO,RE]{Footnotes 2}
\fancyfoot[RO,LE]{DRAFT}
\fancyfoot[RE,LO]{}
\fancyfoot[CE,CO]{\thepage}
%\renewcommand{\thefootnote}{\roman{footnote}} %Make footnotes separate from original ones
%\newcommand{\footnoteorig}[2]{\renewcommand{\thefootnote}{\roman{\footnote}} \footnotemark[#1] \footnotetext[#1]{#2} \renewcommand{\thefootnote}{\arabic{\footnote}}}
\begin{document} %This attempts to use bigfoot / manyfoot package.
Intro text here\footnote{FN0}
More text\footnote{FN1}
\begin{orig}
Orig text with its own footnote numbers to retain\footnote[1]{Original footnote with fixed number, should be in same font as its environment, i.e. \textsf{sans-serif}}
\comme{A brief comment here with a footnote\footnote{FN3}}
\begin{mdframed}[linewidth=0.5pt]
More original text in a frame\footnotemark
\end{mdframed}
\footnotetext{FN4}
\begin{comm}
Some more commentary\footnote{FN5}
\end{comm}
And more\footnoteorig{FN6 Original footnotes throughout doc, but the next one shows what happens with a given footnote number} \footnoteorig[7]{FN7}
Yet more\footnote{This footnote is not original and should stay in \textrm{commentary style}}
\end{orig}
Final text\footnote{Final footnote, which may be more than the alphabetic or roman maxima}
\end{document}
编辑器:TeXstudio 用pdflatex
;用编译xelatex
有同样的效果。我已经包含了我正在使用的软件包。
有回复这里,虽然它需要使用 memoir 类,并且代码中有一个错误。但是,它以相同的字体生成脚注。
非常感谢。