章节标题中的脚注

章节标题中的脚注

我尝试在章节标题内添加脚注。我找到了一个解决方案,并在最小工作示例中进行了展示。它几乎完美地工作。但是,脚注文本前面有一个零而不是心形。有人能帮我使它保持一致吗?任何帮助都将不胜感激。

谢谢

丹尼尔

\documentclass[12pt]{book}
\renewcommand{\baselinestretch}{1.5}
\usepackage[toc,page]{appendix}
\usepackage{array}
\usepackage{amsmath,amsthm,verbatim,amssymb,amsfonts,amscd, graphicx}

%\usepackage[toc,page]{appendix}
\usepackage{booktabs}
%\usepackage{caption}
%\usepackage{cite}
\usepackage{eurosym}
\usepackage{float}
%\usepackage{graphics}
%\usepackage{hyperref}
\usepackage{lscape}
\usepackage{multirow}
\usepackage{natbib}
\usepackage{natbib}
%\bibliographystyle{rusnat}
%\usepackage[]{natbib}
%\usepackage[authordate]{biblatex-chicago}
%\usepackage[authordate]{biblatex-chicago}
\setcitestyle{sort&compress,authoryear,open={(},close={)}}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{subcaption}
%\usepackage{subfig}
\usepackage{threeparttable}
\usepackage{xcolor}
\usepackage[tableposition=top]{caption}
\usepackage[section]{placeins}
\usepackage[multiple]{footmisc}
\usepackage[left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm]{geometry}
\usepackage{pifont}
\usepackage[acronym]{glossaries}
\makeglossaries
\usepackage{longtable} % for 'longtable' environment
\usepackage{pdflscape} % for 'landscape' environment
\usepackage[hyphens]{url}
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=black,
    filecolor=black,      
    urlcolor=black,
    citecolor=blue,
}
\usepackage{fancyhdr}
\pagestyle{fancy}
%\usepackage{fancychap}

\usepackage{titlesec}
\usepackage{lipsum}
\usepackage{etoolbox}
\usepackage{dsfont}
\usepackage{makecell}






\titleformat{\chapter}[display]
{\normalfont\Large\sffamily}
{%\titlerule[1pt]%
%\vspace{1pt}%
%\titlerule
\vspace{1pc}%
\LARGE\MakeUppercase{\chaptertitlename} \thechapter}
{1pc}
{\titlerule
\vspace{1pc}%
\Huge}
%[\newpage] % creates the new page
\usepackage{tabularx}


% *****************************************************************
% Custom subcaptions
% *****************************************************************
% Note/Source/Text after Tables
\newcommand{\figtext}[1]{
    \vspace{1ex}
    \captionsetup{justification={justified}, font={footnotesize,singlespacing}}
    \caption*{\hspace{6pt}\hangindent=1.5em #1}
    }
\newcommand{\fignote}[1]{\figtext{\emph{Note:~}~#1}}

\newcommand{\figsource}[1]{\figtext{\emph{Source:~}~#1}}

% Add significance note with \starnote
\newcommand{\starnote}{\figtext{* p $<$ 0.1, ** p $<$ 0.05, *** p $<$ 0.01.}}

\newcommand{\tablefont}{\fontsize{8pt}{10pt}\selectfont\centering}


% *****************************************************************
% Cnew column types
% *****************************************************************
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}


\defcitealias{BAMF2019}{BAMF, 2019}
\defcitealias{CDC2020}{CDC, 2020}
\defcitealias{RKI2020a}{RKI, 2020a}
\defcitealias{ba2020}{BA, 2020}
\defcitealias{Lancet2020}{The Lancet Global Health, 2020}
\defcitealias{UNHCR1951}{UNHCR, 1951}
\newcommand{\ie}{\textit{i}.\textit{e}., }
\newcommand{\eg}{\textit{e}.\textit{g}., }

\def\chapterthanks#1{\renewcommand{\thefootnote}{$\heartsuit$}%
\addtocounter{footnote}{-1}% 
\footnote{#1}}


\makeatletter
\patchcmd{\@maketitle}{\newpage}{}{}{} 
\makeatother



\begin{document} 

%\input{sections/Title.tex}

\begin{titlepage}
   \begin{center}
       \vspace*{1cm}

       {\LARGE Awesome stuff}

     
            
       \vspace{2cm}

       {\Large stuffy stuff}

       \vspace{2cm}
       
       {\Large More stuffy stuff
       \vfill
     
       %\includegraphics[width=0.4\textwidth]{university}
            
       Authored by me}
            
   \end{center}
\end{titlepage}

\chapter[Initial stuff]{Initial stuff\chapterthanks{The chapter is sole authored.}}
Interesting stuff.

\end{document}

答案1

我不完全明白是怎么回事,但这个titlesec包似乎干扰了脚注。如果你把原来的宏放在这个 MWE 中,你会看到你遇到的问题当然会再次出现,但如果你注释掉这些titlesec东西,小心心也会出现在页脚中。

我建议您使用\footnotemark和的解决方法\footnotetext(我还添加了一行来恢复设置,以便下一个脚注会得到一个数字):

\documentclass[12pt]{book}

\usepackage{titlesec}

\titleformat{\chapter}[display]
{\Large\sffamily}
{\vspace{1pc}\LARGE\MakeUppercase{\chaptertitlename} \thechapter}
{1pc}
{\titlerule\vspace{1pc}\Huge}

\newcommand{\chapterthanksmark}{%
    \renewcommand{\thefootnote}{$\heartsuit$}%
    \footnotemark%
}

\newcommand{\chapterthanksnote}[1]{%
    \renewcommand{\thefootnote}{$\heartsuit$}%
    \addtocounter{footnote}{-1}% 
    \footnotetext{#1}%
    \renewcommand{\thefootnote}{\arabic{footnote}}% <-- restore footnote numbering
}

\begin{document} 

\chapter[Initial stuff]{Initial stuff\chapterthanksmark}
\chapterthanksnote{The chapter is sole authored.}

Interesting stuff.

\end{document}

在此处输入图片描述

相关内容