I am currently trying to create a technical report which contains: chapters, figures, tables and equations. I currently use Rmarkdown to render the PDF, and when I create the PDF, there is a Bookmarks panel that helps navigate to chapters, sections, etc. (If this question needs to be taken to an R forum please let me know!) However, when I click on the "List of Equation" Bookmark, it jumps to "List of Tables".
Below is the Code used in my .Rmd file
Code: Select all
---
output:
pdf_document:
includes:
in_header: preamble.tex
fontsize: 11pt
documentclass: book
---
\tableofcontents
\clearpage
\listoffigures
\clearpage
\listoftables
\clearpage
\listofmyequations
\clearpage
\chapter{First chapter}
\section{First section}
\begin{equation}
E=mc^2
\end{equation}
\myequations{Some equation}
Code: Select all
\usepackage{tocbibind}
\usepackage{tocloft}
\usepackage{xpatch}
\newcommand{\listequationsname}{List of Equations}
\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{%
\addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par}
\xpretocmd{\listofmyequations}{\addcontentsline{toc}{chapter}{\listequationsname}}{}{}
Thank you for reading this post, and any help is much appreciated.
Alan