Replies: 1 comment
-
I think texor can convert this example almost perfectly now. Try with following commands: library(devtools)
setwd("path/to/fzyxh/texor")
load_all()
setwd("path/to/texor-playground/matrix_comparisons")
input_file <- "path/to/texor-playground/matrix_comparisons/Comparisons.Rnw"
rnw_to_rmd(input_file, clean_up = TRUE) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A good test case might be
system.file("doc/Comparisons.Rnw", package = "Matrix")
. This has no figures, only code chunks and moderately complex LaTeX (e.g. mathematics and a bibliography, but no tables). It looks the Sweave chunks are straight-forward (e.g. no nested chunks), but there are a few attributes (echo/eval arguments to the chunks).This is also a case that breaks
Rnw2Rmd::Rnw2Rmd()
, because one of the code chunks has the line-- the
$
is interpreted as the opening fence of an inline code block rather than a verbatim dollar sign, so an error is thrown because there is no matching end fence. If you fix this manually by replacing$
with\$
in the input file,Rnw2Rmd::Rnw2Rmd()
runs but many of the code chunks are not converted, because there is not whitespace around them as expected. It also ignores code after%
because it is treated as a comment.So if we can get a workflow working on this case, we would have already have made a big improvement on the state of the art.
Beta Was this translation helpful? Give feedback.
All reactions