1

I try to make a footnote within chapter headings. I found a solution, which I display in the minimal working example. It works almost perfectly. However, there is a zero instead of a heart before the footnotetext. Can anyone help me to make this consistent? Any help would be appreciated.

Thanks

Daniel

\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}
3
  • I strongly suspect that some 95% of your code is irrelevant to the issue, Please try to make a minimal working example.
    – campa
    Commented Apr 9, 2021 at 15:27
  • I was thinking about that as well. However, since the issue might also be due to some interference with other configurations or packages, I concluded it would be better to print the whole preamble. If you conclude it is still irrelevant, I can adjust it accordingly.
    – Daniel2805
    Commented Apr 9, 2021 at 15:30
  • Indeed! It is the titlesec package that seems to interfere. If you reduce your MWE to just include the \documentclass, your definition of \chapter with titlesec and your custom macro \chapterthanks, you can see this: When commenting out the titlesec stuff, the small heart also appears in the footer. Commented Apr 9, 2021 at 15:37

1 Answer 1

1

I don't fully understand how, but the titlesec package seems to interfere with the footnotes. If you place your original macro in this MWE, you will see that the problem you had of course will re-appear, but if you comment out the titlesec stuff, the small heart will also appear in the footer.

I suggest, that you use a workaround with \footnotemark and \footnotetext (I also added one line to revert the settings so that the next footnote will get a number):

\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}

enter image description here

1
  • Thanks for the help!
    – Daniel2805
    Commented Apr 10, 2021 at 13:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .