Hello,
I've posted about this issue on stackoverflow and rmarkdown github. I am trying to run a RMarkdown document that outputs a github_document. I have latex included in my RMarkdown file. I've pasted some RMarkdown code that intermittently works::
---
title: 'TEST'
output:
github_document:
pandoc_args: --webtex
always_allow_html: yes
---
\newcommand*{\indep}{\perp \!\!\! \perp}
$$\Bigl \{ Y_i, \; M_i \Bigr \} \indep{} \, A_i|Z_i=z $$
The error that I get is:
Could not fetch https://latex.codecogs.com/png.latex?%5CBigl%20%5C%7B%20Y_i%2C%20%5C%3B%20M_i%20%5CBigr%20%5C%7D%20%7B%5Cperp%20%5C%21%5C%21%5C%21%20%5Cperp%7D%7B%7D%20%5C%2C%20A_i%7CZ_i%3Dz%20
HttpExceptionRequest Request {
host = "latex.codecogs.com"
port = 443
secure = True
requestHeaders = []
path = "/png.latex"
queryString = "?Y_i"
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
ConnectionTimeout
Error: pandoc document conversion failed with error 61
Execution halted
Copying and pasting the code shows that the latex code exists, however there is a problem with returning/accessing the codecogs site causing pandoc to fail. There is a posted workaround, which adds onto the pandoc_args:
---
title: 'TEST'
output:
github_document:
pandoc_args: --webtex=http://chart.apis.google.com/chart?cht=tx&chl=
always_allow_html: yes
---
\newcommand*{\indep}{\perp \!\!\! \perp}
$$\Bigl \{ Y_i, \; M_i \Bigr \} \indep{} \, A_i|Z_i=z $$
But this does not output the command correctly.
Any suggestions?