Skip to content
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

tikzDevice fails without LaTeX installation #131

Closed
3 tasks done
jvcasillas opened this issue Jul 7, 2019 · 2 comments
Closed
3 tasks done

tikzDevice fails without LaTeX installation #131

jvcasillas opened this issue Jul 7, 2019 · 2 comments

Comments

@jvcasillas
Copy link


By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.name/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('tinytex'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('yihui/tinytex').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.


I am attempting to use tikzDevice to create a vectorized figure in R. Here is a minimal, self-contained, (hopefully) reproducible example:

require(tikzDevice)
options(tikzLatexPackages = c(getOption("tikzLatexPackages"), "\\usepackage{tipa}"))
tikz("plot_test.tex", standAlone = TRUE)
plot(cars)
dev.off()

The error I receive is rather long. I will paste below the section I believe is most relevant:

	\char77

Run the following commands for diagnosis:

	tikzTest()
	tikzTest("\\char77")

Common reasons for failure include:
  * The string contains a character which is special to LaTeX unless
    escaped properly, such as % or $.
  * The string makes use of LaTeX commands provided by a package and
    the tikzDevice was not told to load the package.

Based on the plot in my example, I do not believe that this error has to do with characters that need to be escaped.

Session info:

R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.5, RStudio 1.2.1335

Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8

Package version:
  graphics_3.6.0  grDevices_3.6.0 stats_3.6.0     tinytex_0.14   
  tools_3.6.0     utils_3.6.0     xfun_0.8  
@yihui
Copy link
Member

yihui commented Jul 8, 2019

I feel this issue belongs to https://github.com/daqana/tikzDevice. TinyTeX is only one of the possible LaTeX distributions.

@yihui
Copy link
Member

yihui commented Aug 7, 2019

If tikzDevice switches to tinytex::latexmk() to compile tikz graphics, this issue might be automatically resolved. I mentioned it last year at daqana/tikzDevice#172 (comment).

@yihui yihui closed this as completed Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants