消失的脚注

消失的脚注

目标:我希望在相同的页。我还希望能够添加作者脚注。

我目前所做的:我想出了以下破解方法。除了脚注之外,它都有效。(这是我的第一个破解方法,因此,它可能相当业余,也许我一开始就不应该这么做。)

只要我能实现既定的hyperref工作目标,我愿意尝试任何其他方法。(如果我能控制使用的字体就更好了。)

\documentclass[12pt]{report}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage[ocgcolorlinks, hypertexnames]{hyperref}


\makeatletter
\renewcommand{\tableofcontents}[1]{%
\begin{center}%
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \let \footnote \thanks
    {\huge\bfseries \@title \par}%
    \vskip 2em%
    {\large
     \lineskip .75em%
      \begin{tabular}[t]{c}%
        {\bfseries \@author}
      \end{tabular}\par}%
      \vskip 1em%
    {\large \@date \par}%     
  \section*{\center{#1}}
  \end{center}\par
    \@starttoc{toc}%
      }
\makeatother

\renewcommand{\thechapter}{}
\renewcommand{\chaptername}{}

\title{This is a test}
\author{John Doe\footnote{where is the foot note?}}

\begin{document}
\tableofcontents{Table of Contents}
\chapter{Preface}
 \lipsum[1]
\chapter{First Thing}
  \lipsum[2]
  \chapter{Second Thing}
  \lipsum[3]
   \chapter{Third Thing}
  \lipsum[4]
\end{document}

输出的第一页如下所示。 在此处输入图片描述

答案1

你需要report

如果您可以切换到,article您可以使用“标准”来完成。但您必须将章节更改为章节,将章节更改为小节...

\documentclass[12pt]{article}
\usepackage{lipsum}

%some additional requested format changes
\usepackage{sectsty}
\setcounter{secnumdepth}{0}
\sectionfont{\huge\bfseries}

\title{This is a test}
\author{John Doe\footnote{where is the foot note?}}

\begin{document}
\maketitle
\tableofcontents
\clearpage

\section{Preface}
 \lipsum[1]
\section{First Thing}
  \lipsum[2]
  \section{Second Thing}
  \lipsum[3]
  \section{Third Thing}
  \lipsum[4]

\end{document}

答案2

这是很常见的情况;a\foonote被吞下。类似的情况发生在使用\footnotetable。解决这个问题的一个方法是先在\footnotemark里面排版\author,然后再在\footnotetext外面排版。这里有一点黑客去做这个:

![在此处输入图片描述][1]

\documentclass[12pt]{report}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage[ocgcolorlinks, hypertexnames]{hyperref}


\makeatletter
\renewcommand{\tableofcontents}[1]{%
\begin{center}%
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \let \footnote \thanks
    {\huge\bfseries \@title \par}%
    \vskip 2em%
    {\large
     \lineskip .75em%
      \begin{tabular}[t]{c}%
        {\bfseries \@author}
      \end{tabular}\par}%
      \vskip 1em%
    {\large \@date \par}%     
  \section*{\center{#1}}
  \end{center}\par
    \@starttoc{toc}%
      }
\makeatother

\renewcommand{\thechapter}{}
\renewcommand{\chaptername}{}

\title{This is a test}
\author{John Doe\footnotemark}

\begin{document}
\tableofcontents{Table of Contents}
\makeatletter
{\renewcommand{\thefootnote}{*}% Print * for counter value
\footnotetext{where is the foot note?}}
\makeatother
\chapter{Preface}
 \lipsum[1]
\chapter{First Thing}
  \lipsum[2]
  \chapter{Second Thing}
  \lipsum[3]
   \chapter{Third Thing}
  \lipsum[4]
\end{document}​

为了保持脚注引用的一致性(因为我不确定您想使用脚注符号编号的范围有多广),我暂时更新了计数器的footnote显示方式:

{\renewcommand{\thefootnote}{*}% Print * for counter value
\footnotetext{where is the foot note?}}

临时的改变仅影响组内计数器的显示。[1]:https://i.stack.imgur.com/W1cfL.png

答案3

\usepackage[symbol]{footmisc}

(http://ctan.org/pkg/footmisc)作为符号(在 hyperref 之前!)然后\footnotemark在您想要脚注标记的位置和\footnotetext{...}目录之后使用:

\author{John Doe\footnotemark}

\begin{document}
\tableofcontents{Table of Contents}
\footnotetext{Here is the foot note!}

编辑:不使用 footmisc 包并且对您的代码进行很少的更改:

\documentclass[12pt]{report}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage[ocgcolorlinks, hypertexnames]{hyperref}

\makeatletter
\renewcommand{\tableofcontents}[1]{%
\begin{center}%
%    \renewcommand\thefootnote{\@fnsymbol\c@footnote}% DELETED
    \let \footnote \thanks
    {\huge\bfseries \@title \par}%
    \vskip 2em%
    {\large
     \lineskip .75em%
      \begin{tabular}[t]{c}%
        {\bfseries \@author}
      \end{tabular}\par}%
      \vskip 1em%
    {\large \@date \par}%     
  \section*{\center{#1}}
  \end{center}\par
    \@starttoc{toc}%
      }
\makeatother

\renewcommand{\thechapter}{}
\renewcommand{\chaptername}{}

\title{This is a test}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}% INSERTED    
\author{John Doe\footnotemark}% INSTEAD OF \footnotetext{...}

\begin{document}

\tableofcontents{Table of Contents}
\footnotetext{Here is the foot note!}% INSERTED
\renewcommand{\thefootnote}{\arabic{footnote}}% INSERTED
% \chapter{...} resets the footnote number to one
\chapter{Preface}
 \lipsum[1]
 This is a test.\footnote{This is a footnote.}
\chapter{First Thing}
  \lipsum[2]
  \chapter{Second Thing}
  \lipsum[3]
   \chapter{Third Thing}
  \lipsum[4]
\end{document}

答案4

我正在提交此解决方案仅有的捕捉所接受答案下方的完整对话。

\documentclass[12pt]{article}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\usepackage{sectsty}
\usepackage[ocgcolorlinks, hypertexnames]{hyperref}

\setcounter{secnumdepth}{0}
\title{\huge\bfseries This is a test}
\author{\textbf{John Doe}\footnote{where is the foot note?}}

\begin{document}
\maketitle
\center\tableofcontents
\clearpage
\sectionfont{\huge\bfseries}
\begin{flushleft}
\section{Preface}
\vspace{10pt}
 \lipsum[1]
 \pagebreak
\section{First Thing}
\vspace{10pt}
  \lipsum[2]
  \pagebreak
  \section{Second Thing}
  \vspace{10pt}
  \lipsum[3]
  \pagebreak
  \section{Third Thing}
  \vspace{10pt}
  \lipsum[4]
\end{flushleft}
\end{document}

相关内容