更新:

更新:

我有一段复杂的代码对 \thanks 脚注使用与 footmisc 创建的格式相同的格式这确保\thanks不会在标题中放置星号,而只在脚注本身中放置星号,并且\thanks脚注具有与文本中其他脚注相同的格式。

其他脚注的格式是用 KOMA 脚本创建的(我想我从文本中的脚注标记应为上标衬线图形,但脚注中的脚注标记应为全尺寸旧式图形)。

结合起来,它给了我这个:

\documentclass{article}

\usepackage{lipsum}

\usepackage{fontspec}
    \setmainfont{CMU Serif}[%
        Numbers = {OldStyle, Proportional}]
    \newfontfamily\footmarktextfont{CMU Serif}[% for footnote markers in the text
        Numbers = {Lining, Proportional}]

\usepackage{scrextend} % KOMA script for footnote marks hung left of the margin
    \newcommand*\footnotetextfrommargin{0em} % set distance for footnote text from the margin
    \deffootnote{\footnotetextfrommargin}% use distance from above
        {\parindent}% paragraph indent in footnotes
        {\thefootnotemark.\space} % footnote marks followed by a period and space in footnote
    \deffootnotemark{\footmarktextfont\textsuperscript{\thefootnotemark}} % use footmarktextfont for footnote markers in the text

\usepackage{xpatch}
\makeatletter
% 1. remove all redefinitions about footnotes done by \maketitle
%    and add \titletrue
\renewcommand\maketitle{\par
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \titletrue
    \if@twocolumn
      \ifnum \col@number=\@ne
        \@maketitle
      \else
        \twocolumn[\@maketitle]%
      \fi
    \else
      \newpage
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \fi
    \thispagestyle{plain}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
% 2. define a conditional
\newif\iftitle
% 3. redefine \@makefnmark to print nothing when \titletrue
\xpretocmd{\@makefnmark}{\iftitle\else}{}{}
\xapptocmd{\@makefnmark}{\fi}{}{}
% 4. ensure \@makefntext has \titlefalse
%    that's justified by the fact that \@makefnmark
%    in \@makefntext is set in a box
\xpretocmd{\@makefntext}{\titlefalse}{}{}
\makeatother

\title{My paper on footnotes\thanks{\lipsum[4]}}

\begin{document}

\maketitle

A\footnote{\lipsum[11]}

\end{document}

在此处输入图片描述

脚注看起来就像我想要的那样,编号脚注的脚注标记看起来也像我想要的那样。问题在于\thanks脚注的脚注标记。

(1)星号后面不应该有句号。

(2) 星号应与符号 完全一样*,位于线上较高位置。但在本例中,星号位置较低。这是因为命令使用的符号\thanks位于数学环境中\ensuremath(参见例如这个答案,但它没有说明此代码片段位于何处),或者,正如我在latex.ltx(第 2255 行)中发现的那样,该符号定义为\textasteriskcentered。 任何一个都会产生一个降低的星号(尝试\ensuremath{*}*\textasteriskcentered看看)。

所以我的问题是,如何才能删除星号后的句号,同时又能在脚注中添加正常的非降低星号\thanks,而不改变其他脚注的显示方式?

答案1

嗯,您只需要在命令中修补/定义脚注\maketitle

例如,您可以使用已经使用过的定义\deffootnote并删除令人不安的内容,.例如:

\renewcommand\maketitle{\par
  \begingroup
    \deffootnote{\footnotetextfrommargin}% use distance from above
      {\parindent}% paragraph indent in footnotes
      {\thefootnotemark\space} % <==================================== deleted .

将此改变的定义插入到\begingroup确保它仅在命令内部有效\maketitle

参见以下完整代码

\documentclass{article}

\usepackage{lipsum}

\usepackage{fontspec}
    \setmainfont{CMU Serif}[%
        Numbers = {OldStyle, Proportional}]
    \newfontfamily\footmarktextfont{CMU Serif}[% for footnote markers in the text
        Numbers = {Lining, Proportional}]

\usepackage{scrextend} % KOMA script for footnote marks hung left of the margin
    \newcommand*\footnotetextfrommargin{0em} % set distance for footnote text from the margin
    \deffootnote{\footnotetextfrommargin}% use distance from above
        {\parindent}% paragraph indent in footnotes
        {\thefootnotemark.\space} % footnote marks followed by a period and space in footnote
    \deffootnotemark{\footmarktextfont\textsuperscript{\thefootnotemark}} % use footmarktextfont for footnote markers in the text

\usepackage{xpatch}
\makeatletter
% 1. remove all redefinitions about footnotes done by \maketitle
%    and add \titletrue
\renewcommand\maketitle{\par
  \begingroup
    \deffootnote{\footnotetextfrommargin}% use distance from above
      {\parindent}% paragraph indent in footnotes
      {\thefootnotemark\space} % <==================================== deleted .
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \titletrue
    \if@twocolumn
      \ifnum \col@number=\@ne
        \@maketitle
      \else
        \twocolumn[\@maketitle]%
      \fi
    \else
      \newpage
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \fi
    \thispagestyle{plain}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
% 2. define a conditional
\newif\iftitle
% 3. redefine \@makefnmark to print nothing when \titletrue
\xpretocmd{\@makefnmark}{\iftitle\else}{}{}
\xapptocmd{\@makefnmark}{\fi}{}{}
% 4. ensure \@makefntext has \titlefalse
%    that's justified by the fact that \@makefnmark
%    in \@makefntext is set in a box
\xpretocmd{\@makefntext}{\titlefalse}{}{}
\makeatother

\title{My paper on footnotes\thanks{\lipsum[4]}}


\begin{document}

\maketitle

A\footnote{\lipsum[11]}

\end{document}

及其结果:

生成的 pdf

更新:

为了使星号位于线的顶部(而不是像使用 那样位于底部),请像这样\textasterikscentered更改 的定义:\@fnsymbol

\renewcommand\@fnsymbol[1]{% <==========================================
  \ifcase #1
    \or  *%
    \or  \textdagger %
    \or  \textddagger %
    \or  \textsection %
    \or  \textparagraph %
    \or  \textbardbl %
    \or  {**}%
    \or  {\textdagger \textdagger}%
    \or  {\textdaggerdbl \textdaggerdbl}%
    \else \@ctrerr 
  \fi %
} % <===================================================================

现在测试以下新mwe

\documentclass{article}

\usepackage{lipsum}

\usepackage{fontspec}
    \setmainfont{CMU Serif}[%
        Numbers = {OldStyle, Proportional}]
    \newfontfamily\footmarktextfont{CMU Serif}[% for footnote markers in the text
        Numbers = {Lining, Proportional}]

\usepackage{scrextend} % KOMA script for footnote marks hung left of the margin
    \newcommand*\footnotetextfrommargin{0em} % set distance for footnote text from the margin
    \deffootnote{\footnotetextfrommargin}% use distance from above
        {\parindent}% paragraph indent in footnotes
        {\thefootnotemark.\space} % footnote marks followed by a period and space in footnote
    \deffootnotemark{\footmarktextfont\textsuperscript{\thefootnotemark}} % use footmarktextfont for footnote markers in the text

\usepackage{xpatch}

\makeatletter
\renewcommand\@fnsymbol[1]{% <==========================================
  \ifcase #1
    \or  *%
    \or  \textdagger %
    \or  \textddagger %
    \or  \textsection %
    \or  \textparagraph %
    \or  \textbardbl %
    \or  {**}%
    \or  {\textdagger \textdagger}%
    \or  {\textdaggerdbl \textdaggerdbl}%
    \else \@ctrerr 
  \fi %
} % <===================================================================
% 1. remove all redefinitions about footnotes done by \maketitle
%    and add \titletrue
\renewcommand\maketitle{\par
  \begingroup
    \deffootnote{\footnotetextfrommargin}% use distance from above
      {\parindent}% paragraph indent in footnotes
      {\thefootnotemark\space} % <====================================== deleted .
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \titletrue
    \if@twocolumn
      \ifnum \col@number=\@ne
        \@maketitle
      \else
        \twocolumn[\@maketitle]%
      \fi
    \else
      \newpage
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \fi
    \thispagestyle{plain}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
% 2. define a conditional
\newif\iftitle
% 3. redefine \@makefnmark to print nothing when \titletrue
\xpretocmd{\@makefnmark}{\iftitle\else}{}{}
\xapptocmd{\@makefnmark}{\fi}{}{}
% 4. ensure \@makefntext has \titlefalse
%    that's justified by the fact that \@makefnmark
%    in \@makefntext is set in a box
\xpretocmd{\@makefntext}{\titlefalse}{}{}
\makeatother

\title{My paper on footnotes\thanks{\lipsum[4]}}
\author{John Doe}

\begin{document}

\maketitle

A\footnote{\lipsum[11]}

\end{document}

产生以下脚注:

产生的脚注

相关内容