2

I'm using rmarkdown, and after knitting a document I always receive this warning (the document knits normal, though).

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

I've learned the issue might be related to the "footmisc" package and the order of package loading. Therefore, I assume a package clash whatsoever. Since there are several answers for similar warnings, but none of them including \@footnotemark, allow me to post the relevant part of my YAML header here. What should I possibly change?

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

Edit: And this would be the compiled LaTeX code:

% 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}
7
  • Could you please make your code compilable? – leandriis Jan 7 '20 at 10:37
  • 2
    Note that not many here are using markdown or r-markdown to generate LaTeX/PDF. So it would be useful to have the generated latex code posted as that is easier for us to debug than markdown setups. (I'm guessing this is what @leandriis is asking for in their comment above) – daleif Jan 7 '20 at 11:17
  • 2
    @daleif I understand, thx for the suggestion, updated. – jay.sf Jan 7 '20 at 11:23
  • 2
    MWE that still reproduced the warning: \documentclass{article} \usepackage{hyperref} \usepackage[hang,flushmargin]{footmisc} \usepackage{scrextend} \begin{document} test \end{document}. You can get rid of the warning in the above MWE by loading hyperref last, which is, according to its documentation, generally (with a few exceptions) the correct order. – leandriis Jan 7 '20 at 12:07
  • 3
    As mentioned we mostly handles LaTeX stuff, so we cannot help debugging markdown compilers. So you probably have to find someone who knows about this markdown conversion route. – daleif Jan 7 '20 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.