-
Notifications
You must be signed in to change notification settings - Fork 525
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
Additional tufte ebook error #51
Comments
In itself R, Rstudio, the packages knitr, pandoc, rticles and the Latex compiler work properly as I was able to generate a document based on the JSS template (also included with rticles) without any problems. Let me know if any additional information is needed. |
It appears you used the R package knitcitations. You need to make sure it writes out the bib entries in UTF-8 (contact the package author if you don't know what this means). |
@yihui Err ... I don't feel I was 'using' the knitcitations package. My point is: it's loaded in the tufte book example, and the example I ran (as supplied) doesn't work. Commenting knitcitations out doesn't work because of all the function calls (citep) the document contains. Removing the citep calls doesn't work either: I get a downstream complaint that the bib file must be present. Looking at the document I see that knitcitations does something with citations, but I didn't see what exactly (I found the bib database that's submitted to Latex, but seems to be generated by pandoc, not knitcitations. I couldn't find out where pandoc gets its entries from (they're not in the example Rcmd file) and I'm not sure how all this ties in with knitcitations either.). A quick online search on the problem suggests that somehow the knitcitations finds a bibliographic reference with 'funny' characters, puts those characters in the bibliography and causes downstream packages to choke. The package maintainer of knitcitations responded to an earlier question (april 2015) about non utf-8 chars by blaming the 'choice of 'locale' in Windows and said he couldn't reproduce the problem. Trying to edit the bibtex database to remove the funny characters doesn't work, as it's overwritten each time you 'knit' the example. I have no idea what citation is the problem as none of the program logs is telling me that. I just know the basics about Latex and barely anything about pandoc. I still think it's something for the rticles package maintainer to resolve. I ran the example in order to learn how to use rticles, not to do substantial debugging on one of its examples due to package incompatibilities when I know barely anything about the toolchain involved. Does that seem reasonable? |
Unfortunately we do not maintain the knitcitations package, so we cannot solve the problem on our side. If you claim you were not using knitcitations package, please prove it by providing a minimal reproducible example. If the problem still occurs when no third-party packages are used, that means it is rticles' responsibility to fix the problem, otherwise it will be too much burden for us to fix the whole outside world... |
@yihui (1) Just load the tufte e-book example as provided by the rticles package, without any alterations or additions, and knit it. That should reproduce the error. (2) As I wrote, I didn't 'use' the knitcitations package, the tufte ebook example provided by rticles does, right out of the box. What I can do on my side is to to try and re-introduce the citations from the rticles example (I removed all of them) and see if I can find one that doesn't cause a problem. Does that sound like a plan? |
Hi Yihu, got it. I left the following references in place: I still have no idea where the rcites package got that name from. A hint would be welcome. |
@justsomeone1001 On Sat, Nov 14, 2015 at 11:25 AM, RudolfLi notifications@github.com wrote:
|
Yeah, I'll take care of this this weekend. |
Ok, I just looked at this. It compiles perfectly here. However, there have been other documents where I have seen the "error 83" caused by special characters in a bibtex. I have not seen them in about a year though -- I believed it was a bug in part of the TeX distribution that had been fixed. I suspect this is going to turn out to be a limitation of the Windows implementation of pandoc or some part of TeX. @RudolfLi Can you provide more information about your TeX & pandoc installation? Versions? If you have a way of reaching you directly, I'd like to try to track this down once and for all. |
I feel this is more likely to be an issue of knitcitations instead of Pandoc. knitcitations has to write the output in UTF8. If it is too much trouble to get it right, I'd suggest we remove knitcitations from the example document. It is not essential after all. |
I see your point, but I’ve seen this error before. Let me try to track it down with him. You may be right. If its being caused by knitcitations then of course knitcitations gets pulled out. From: Yihui Xie notifications@github.com I feel this is more likely to be an issue of knitcitations instead of Pandoc. knitcitations has to write the output in UTF8. If it is too much trouble to get it right, I'd suggest we remove knitcitations from the example document. It is not essential after all. — |
Latex: Miktex 2.9 Package: pander Archs: i386, x64Let me know if there is any more information I can help you with. P.S. as I mentioned, the issue might have something to do with locales under Windows (whatever they are), as voiced by the author of the knitcitations package here: P.P.S. If you omit the special characters, it works OK. If you compile your bibtex database manually, you can ensure that no such characters are present. The problem is that knitcitations seems to have license to obtain a bibtech reference from ... whereever. So you have no control over special characters or anything. P.P.P.S. Ironic isn't it, that it's the name of pander's author (that accented 'o') that causes pandoc to choke :-). |
@RudolfLi well done, yeah I'm sure that's exactly what it is. I've asked on that issue to see what the status is and we can proceed from there. You are using R 3.2, right? I'm not a fan of pulling something out because of an issue with supporting Windows. There are so many different Windows flavors, and Windows support for R and TeX is just not good. If there hasn't been a resolution to this, I'll put some code into the template to detect the OS and report the issue while skipping that citation. |
My R version is: sessionInfo() locale: attached base packages: other attached packages: loaded via a namespace (and not attached): |
👍 |
Ok. Knitcitations isn't going to fix it, and since there apparently is more than one Windows user out there still (seriously, people...), I'm going to put in code to turn off that cite and issue a warning on Windows. |
Thanks @elbamos, much appreciated |
I'm using Arch Linux x64 and I get this error:
I simply installed the rticles pakcage in RStudio, along with dependencies and tried to knit it removing the line: bibliography: "knitcitations.bib" allows the document to be compiled. I'm actually trying to use the tufte handout template outside of R, because I just want to write a protocol in markdown with svg images, but that seems to be way more complex than simply starting a Latex document |
@elgitmariachi Assuming that its tufte-ebook you're trying to knit, can you open up a new issue, and try upgrading your installation of LaTeX and pandoc to the latest through Arch's package management system? Thanks. |
Closing this issue since the tufte-ebook format has been removed from this package (b5a41d0). You may consider the tufte package instead: https://github.com/rstudio/tufte. |
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. |
After installing the rticles package I tried to make an example tufte ebook using the template. After installing the dependencies (note: those were not automatically installed upon loading the rticles package) I got the following error (a different one from the one reported by AmitRohanty)
pandoc-citeproc.exe: Cannot decode byte '\xf3': Data.Text.Internal.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream
pandoc.exe: Error running filter pandoc-citeproc
Error: pandoc document conversion failed with error 83
The complete log is:
processing file: Mytitle.Rmd
|.. | 5%
ordinary text without R code
|.... | 11%
label: setup (with options)
List of 4
$ echo : logi FALSE
$ message: logi FALSE
$ cache : logi FALSE
$ include: logi TRUE
|...... | 16%
ordinary text without R code
|....... | 21%
label: unnamed-chunk-1 (with options)
List of 2
$ fig.margin: logi TRUE
$ fig.cap : chr "Sepal length vs. petal length, colored by species"
|......... | 26%
ordinary text without R code
|........... | 32%
label: unnamed-chunk-2 (with options)
List of 4
$ fig.width : num 10
$ fig.height : num 2
$ fig.fullwidth: logi TRUE
$ fig.cap : chr "Full width figure"
|............. | 37%
ordinary text without R code
|............... | 42%
label: unnamed-chunk-3 (with options)
List of 1
$ fig.cap: chr "Another figure"
|................. | 47%
ordinary text without R code
|.................. | 53%
label: unnamed-chunk-4 (with options)
List of 1
$ results: chr "asis"
|.................... | 58%
ordinary text without R code
|...................... | 63%
label: amargintable (with options)
List of 2
$ results: chr "latex"
$ echo : logi FALSE
|........................ | 68%
inline R code fragments
|.......................... | 74%
label: pandocDemo2 (with options)
List of 1
$ results: chr "asis"
|............................ | 79%
inline R code fragments
|............................. | 84%
label: kable (with options)
List of 1
$ results: chr "asis"
|............................... | 89%
inline R code fragments
|................................. | 95%
label: fullwidthxtable (with options)
List of 2
$ results: chr "asis"
$ echo : logi FALSE
|...................................| 100%
inline R code fragments
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS Mytitle.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Mytitle.tex --filter pandoc-citeproc --table-of-contents --toc-depth 3 --template "D:\bin\R\R-3.2.2\library\rticles\rmarkdown\templates\tufte_ebook\resources\tufte-ebook.tex" --number-sections --highlight-style pygments --latex-engine xelatex --bibliography knitcitations.bib
Writing 8 Bibtex entries ... OK
Results written to file 'knitcitations.bib'
output file: Mytitle.knit.md
pandoc-citeproc.exe: Cannot decode byte '\xf3': Data.Text.Internal.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream
pandoc.exe: Error running filter pandoc-citeproc
Error: pandoc document conversion failed with error 83
In addition: Warning message:
running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS Mytitle.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Mytitle.tex --filter pandoc-citeproc --table-of-contents --toc-depth 3 --template "D:\bin\R\R-3.2.2\library\rticles\rmarkdown\templates\tufte_ebook\resources\tufte-ebook.tex" --number-sections --highlight-style pygments --latex-engine xelatex --bibliography knitcitations.bib' had status 83
Execution halted
The text was updated successfully, but these errors were encountered: