-
-
Notifications
You must be signed in to change notification settings - Fork 978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pandoc error when rendering Rmd included in roxygen documentation during devtools::document()
#2331
Comments
I can't reproduce using Pandoc 2.17.1.1 on Windows and Linux. It seems like it could be related to environment-related thing. 🤔 |
From @EmilHvitfeldt: the issue happens without roxygen2 > rmarkdown::render("man/rmd/foo.md", output_format = rmarkdown::github_document())
/Applications/RStudio.app/Contents/MacOS/quarto/bin/pandoc +RTS -K512m -RTS foo.md --to gfm-yaml_metadata_block --from markdown+autolink_bare_uris+tex_math_single_backslash --output foo.md --template /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rmarkdown/rmarkdown/templates/github_document/resources/default.md '--webtex=https://latex.codecogs.com/png.image?%5Cdpi%7B110%7D&space;%5Cbg_white&space;'
/Applications/RStudio.app/Contents/MacOS/quarto/bin/pandoc +RTS -K512m -RTS foo.md --to html4 --from gfm --output foo.html --standalone --self-contained --highlight-style pygments --template /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rmarkdown/rmarkdown/templates/github_document/resources/preview.html --variable 'github-markdown-css:/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rmarkdown/rmarkdown/templates/github_document/resources/github.css' --metadata pagetitle=PREVIEW '--webtex=https://latex.codecogs.com/png.image?%5Cdpi%7B110%7D&space;%5Cbg_white&space;'
Could not fetch https://latex.codecogs.com/png.image?%5Cdpi%7B110%7D&space;%5Cbg_white&space;%0A%5Ceta_%7Bi%7D%20%3D%20%28%5Cbeta_0%20%2B%20b_%7B0i%7D%29%20%2B%20%5Cbeta_1x_%7Bi1%7D%20%2B%20%5Cbeta_1x_%7Bi1%7D%20%2B%20%5Cbeta_1x_%7Bi1%7D%20%2B%20%5Cbeta_1x_%7Bi1%7D%20%0A
HttpExceptionRequest Request {
host = "latex.codecogs.com"
port = 443
secure = True
requestHeaders = []
path = "/png.image"
queryString = "?%5Cdpi%7B110%7D&space;%5Cbg_white&space;%0A%5Ceta_%7Bi%7D%20%3D%20%28%5Cbeta_0%20%2B%20b_%7B0i%7D%29%20%2B%20%5Cbeta_1x_%7Bi1%7D%20%2B%20%5Cbeta_1x_%7Bi1%7D%20%2B%20%5Cbeta_1x_%7Bi1%7D%20%2B%20%5Cbeta_1x_%7Bi1%7D%20%0A"
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
(InternalException (HostCannotConnect "latex.codecogs.com" [Network.Socket.connect: <socket: 69>: does not exist (Connection refused)]))
Error: pandoc document conversion failed with error 61 |
It seems I can reproduce intermittently in some situations. Still looking into this to understand the why and the correct solution. |
After looking deeper into this, I can reproduce sometimes on my side. I believe this comes from the fact that by default Regarding this new default feature, I am still wondering if we should really use So maybe we should make Thanks for your repro reprex @EmilHvitfeldt it is helpful ! |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
We are reporting this here for now. cc @EmilHvitfeldt
Reprex repo by @EmilHvitfeldt: https://github.com/EmilHvitfeldt/codecogsreprex
This happens because we made
math_method: "webtex"
the default ingithub_document()
, which is called by roxygen@includeRmd
:https://github.com/r-lib/roxygen2/blob/7b706c9f7f2e4227c98928a67c5dcb51d88ec15d/R/rd-include-rmd.R#L46-L52
This happens when math are using in the Rmd or md file which is included.
It seems like codecog is not responded well when the rendering is done within the context of
devtools::document()
.Maybe something related to User-Agent being checked. From @gaborcsardi investigation
cc @juliasilge
The text was updated successfully, but these errors were encountered: