I get the error message:
! Missing $ inserted.
<inserted text>
$
l.4 .... Graphic was created using BioRender.com.}
\label{fig:label}
and am going absolutely bonkers trying to resolve the issue. The text in question is in a figure caption, and I have checked all my math expressions preceding the 'hinted' line. All my math expressions are correctly closed with $'s; I've removed all underscores (_); and I even removed a link to a website.
Is there a way for me to at least be directed to where the problem is located in my file?
I'm using Rmarkdown, papaja::apa6_pdf.
Kind regards to anyone who can help.
EDIT
Thanks for the responses.
I've managed to narrow down the problem. Here is a sample of the chunk I'm having issues with:
{r fig-label, include = TRUE, fig.cap="**This is the title of the image.** (**A**) Explanation A with a special character alpha $\\alpha$5.(**B**) Explanation B with a supercript degree symbol 60^o^C."}
if (Sys.info()[1]=="Windows"){
knitr::include_graphics("C:\\Path\\To\\My\\Image\\File.png")
} else if (Sys.info()[1]=="Mac OS"){
knitr::include_graphics("Path To My Image/File.png")
}
The problem arises with my supercripted degree symbol. Windows can effortlessly render the image to the correct size with all the text options (boldface, special characters, etc). My Mac fails to do so, and even removing the degree symbol makes my Mac include the ** around the text I want to have as boldface. Windows can make the image the correct size, Mac prints the image way too big.
I've followed all the debugging options explained at https://yihui.org/tinytex/r/#debugging.
I very much want (need) this to work on my Mac, so can anyone give me some advice on how I can get my mac to properly knit my markdown document?
Again, kind regards to anyone/everyone who is able to help or offer advice. Let me know if you need additional information.