I have the following latex macro that I used in previous projects to add new terms to the margins of the document:
\newcommand{\margintext}[1]{\setstretch{0.4} \raggedright{\tiny{\textsf{\uppercase{#1}}}}}
\catcode`\"=13 % make the double quote character " active
\gdef"#1"{\textit{#1}\marginpar{\margintext{#1}}\index{#1}}
\newcommand{\new}[2]
{\textit{#2}\marginpar{\margintext{#1}}\index{#1}}
The idea is that wherever I use quotation marks the function will be invoked. I am now writing my thesis in bookdown and want to use this macro. I import it in the following way:
output:
thesisdown::thesis_pdf:
includes:
in_header: define_terms.tex
But this doesn't work. Calling the function new from within the document works, but quotation marks are completely ignored.
Any advice?
Thanks!