I am interested in getting a LATEX template working in RMarkdown. In the past I have been able to get this to work by implementing a .cls
document. But this is not available for this template.
In the main directory of the LATEX template I see a structure.tex
and main.tex
. Where structure.tex
seems identical to previous .cls
files I have used in the past.
Here is an example of how I implemented this in the past within an .Rmd
document
---
title: My Title Goes Here
author: "Author Name"
output:
pdf_document:
keep_tex: yes
latex_engine: xelatex
documentclass: styles/thesis-umich3 #This is where the .cls document is stored
---
This causes me to get the following error claiming that /chaptermark is undefined.
`documentclass` searches specifically for a `.sty` file
Yet on line 173 I have:
\renewcommand{\chaptermark}[1]{\markboth{\sffamily\normalsize\bfseries\chaptername\ \thechapter.\ #1}{}} % Styling for the current chapter in the header
WHAT I HAVE TRIED
Calling a .tex
document within in_header
rather than in documentclass
---
title: "fNIRS Guide"
output:
pdf_document:
includes:
in_header: style/structure.tex
---
This causes the following error
tlmgr search --file --global "/numeric.dbx"
tlmgr search --file --global "/biblatex-dm.cfg"
! LaTeX Error: Command \chaptermark undefined.
Error: Failed to compile index.tex. See index.log for more info.
In addition: Warning messages:
1: In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
Failed to find a package that contains numeric.dbx
2: In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
Failed to find a package that contains biblatex-dm.cfg
Execution halted
I have also tried to call documentclass
---
title: "index"
output:
pdf_document:
keep_tex: yes
latex_engine: xelatex
documentclass: style/structureSavedAsCLS
---
This also fails to work. Does anyone have any suggestions on getting this template into a cls
so I can use it in RMarkdown?
I understand this might be a very entry level question and I was not certain if it was moreso an RMarkdown or Latex question. Any input is greatly appreciated.
\input{structure.tex}
early in the main text of your document? (This assumes it is valid to put it in the body of the document.) Generally speaking, LaTeX macros pass through Markdown. – user2554330structure.tex
is mentioned inmain.tex
would help a lot. – user2554330