ClaudioZandonella / trackdown

R package for collaborative writing and editing of R Markdown (or Sweave) documents in Google Docs.
https://ClaudioZandonella.github.io/trackdown/
GNU General Public License v3.0
214 stars 15 forks source link

[BUG] issues in the identification of the document header start/end line indexes #35

Open victor4110 opened 2 years ago

victor4110 commented 2 years ago

Hello,

I have a problem trying to upload my .Rnw document to Google drive. When I do it with hide_code= FALSE it works fine but, when I change it to hide_code=TRUE it does not work and an error message appears.

I read in the bug report (#21 ) that using code headers --- inline can be producing the problem however, I use <<>>= as chunk headers and begin document and end document as document headers due to I work with a .Rnw file. Even so, I already checked my document, and the headers <<>>= are not repeated in any other part (just code chunks) as well as begin and end document code. I also have installed the 1.3.4 trackdown version but nothing the error is still appearing. Do you have an idea of how to solve this issue? Thanks in advance!

ClaudioZandonella commented 2 years ago

hi @victor4110,

thanks for reporting this issue. Very strange.

The error message complains about "identification of the document header start/end line indexes". These are the latex preamble to the document.

To identify the document header we consider the line between "\documentclass{...}" and "\begin{document}".

I guess that you may have some options, for example, "\documentclass[...]{..." the regex did not match. Now I have fixed it. Changes are in the develop version. Please install the dev version with

devtools::install_github("claudiozandonella/trackdown", ref = "develop")

Please, let me know if this solves the issue so I can merge into the main branch. Alternatively, could you please send an MWE of your .rnw file that causes the issue? o I can try to figure out the problem (if you prefer you can send me via email, claudiozandonella@gmail.com).

Again, thank you for reporting the issue❤️