Can someone recommend a tutorial on how to install, add, and work with LaTex/MacTex packages in rmarkdown . For example how do you install packages such as amsmath and multline? Where do you go to look for the packages that are already installed? And do you have to install packages first and then call them in the document header or can you just refer to them in-text?
I am incredibly confused and very few of the suggestions online work when I copy them, so I must be missing something absolutely fundamental but which nevertheless is not referred to anywhere online.
The correct work order would be:
Install the latex packages as usual (e.g. if you have the MiKTex distribution you can use the PackageManager). If you knit your document it will use your standard latex distribution.
Load your packages in the yaml header of your rmarkdown file as discribed here: How can I use latex packages in R markdown beamer? or alternativley write an latex template were you load the packages and include this (http://rmarkdown.rstudio.com/pdf_document_format.html#custom_templates).
It is indispensable that you have installed a latex distribution. Without it will not work ;) If that does not help, your code and an error message could help to figure what is wrong.