如何克服 LaTeX 警告:命令 \@footnotemark 已更改?

如何克服 LaTeX 警告:命令 \@footnotemark 已更改?

我正在使用 rmarkdown,在编织文档后我总是收到此警告(尽管文档编织正常)。

Output created: XY.pdf
Warning message:
LaTeX Warning: Command \@footnotemark  has changed.
               Check if current package is valid. 

我了解到问题可能是与“footmisc”包相关以及包加载的顺序。因此,我假设存在任何包冲突。由于有几种针对类似警告的答案,但均不包括\@footnotemark,请允许我在此处发布 YAML 标头的相关部分。我应该更改什么?

---
output:
  pdf_document:
    fig_caption: yes
    keep_tex: yes
    # toc: yes
    toc_depth: 3
    # number_sections: true
lang: en
subparagraph: yes
fontsize: 12pt
link-citations: yes
linkcolor: blue
header-includes:
- \usepackage{setspace}
- \usepackage[hang,flushmargin]{footmisc}
- \usepackage{fancyhdr}
- \usepackage{pdflscape}
- \usepackage{dcolumn}
# - \usepackage[english]{babel}
- \usepackage{rotating, graphicx}
- \usepackage{floatpag}
- \usepackage{caption}
- \usepackage[export]{adjustbox}
- \usepackage{icomma}
- \usepackage{tabularx}
- \usepackage{lipsum}
- \usepackage{csquotes}
- \usepackage{amsmath,amssymb}
- \usepackage{amsfonts}
- \usepackage{mathtools,extarrows}
# - \usepackage[sf,bf]{titlesec}
- \usepackage[labelfont=bf]{caption}
- \usepackage{scrextend}
- \usepackage{graphicx}
- \usepackage{subfig}
- \usepackage{dcolumn}
- \usepackage{changepage}
# - \usepackage{siunitx}
# - \documentclass[english, article]
- \usepackage{placeins}

- \pagestyle{fancy}
- \fancyhf{} % sets both header and footer to nothing
- \renewcommand{\headrulewidth}{0pt}
- \fancyhead[LE,RO]{\textsf{\thepage}}
- \fancyfoot[CE,CO]{}
- \fancyhead[LO,RE]{\textsf{\textit{\footnotesize{author$\text{:}$ title}}}}
- \newcommand{\blandscape}{\begin{landscape}}
- \newcommand{\elandscape}{\end{landscape}}
- \floatpagestyle{empty}
- \setlength{\columnsep}{18pt}
- \setlength{\parskip}{0cm}
- \setlength{\parindent}{1em}
- \setlength{\headheight}{14.5pt}
- \captionsetup{justification=raggedright, singlelinecheck=false}
# nocite: | 
#  @knitr, @rmarkdown, @RStudio, @R
urlcolor: blue
# documentclass: article
classoption: 
- a4paper
- twoside
# - english
---

test

编辑:编译后的代码如下LaTeX

% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
\PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor}
%
\documentclass[
  12pt,
  english,
  a4paper,
  twoside]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math}
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
  colorlinks=true,
  linkcolor=blue,
  filecolor=Maroon,
  citecolor=Blue,
  urlcolor=blue,
  pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\usepackage[margin=1in]{geometry}
\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\usepackage{setspace}
\usepackage[hang,flushmargin]{footmisc}
\usepackage{fancyhdr}
\usepackage{pdflscape}
\usepackage{dcolumn}
\usepackage{rotating, graphicx}
\usepackage{floatpag}
\usepackage{caption}
\usepackage[export]{adjustbox}
\usepackage{icomma}
\usepackage{tabularx}
\usepackage{lipsum}
\usepackage{csquotes}
\usepackage{amsmath,amssymb}
\usepackage{amsfonts}
\usepackage{mathtools,extarrows}
\usepackage[labelfont=bf]{caption}
\usepackage{scrextend}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{dcolumn}
\usepackage{changepage}
\usepackage{placeins}
\pagestyle{fancy}
\fancyhf{} % sets both header and footer to nothing
\renewcommand{\headrulewidth}{0pt}
\fancyhead[LE,RO]{\textsf{\thepage}}
\fancyfoot[CE,CO]{}
\fancyhead[LO,RE]{\textsf{\textit{\footnotesize{author$\text{:}$ title}}}}
\newcommand{\blandscape}{\begin{landscape}}
\newcommand{\elandscape}{\end{landscape}}
\floatpagestyle{empty}
\setlength{\columnsep}{18pt}
\setlength{\parskip}{0cm}
\setlength{\parindent}{1em}
\setlength{\headheight}{14.5pt}
\captionsetup{justification=raggedright, singlelinecheck=false}
\ifxetex
  % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
  \usepackage{polyglossia}
  \setmainlanguage[]{english}
\else
  \usepackage[shorthands=off,main=english]{babel}
\fi

\author{}
\date{\vspace{-2.5em}}

\begin{document}

test

\end{document}

相关内容