hughjonesd / huxtable

An R package to create styled tables in multiple output formats, with a friendly, modern interface.
http://hughjonesd.github.io/huxtable
Other
321 stars 28 forks source link

quick pdf issue #74

Closed beusse closed 6 years ago

beusse commented 6 years ago

Hi, I converted my table into a huxtable but I'm unable to use the quick pdf function, even when specifying the file. The error message I get is:

Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, : Running 'texi2dvi' on '/private/var/folders/yg/8tlsnbln3q39xkk3xgjg00580000gp/T/RtmpMfvnVD/file79326b60d82c.tex' failed

I imagine the solution is simple but I've been reading the documentation again and again and can't seem to progress. I'm running the latest R version on macOS 10.13.

Thanks in advance for your help. Kindly

hughjonesd commented 6 years ago

Please could you provide a minimal working example? -- Sent from Gmail Mobile

beusse commented 6 years ago

Sure, your example returns the same error:

library(huxtable) ht <- hux( Employee = c('John Smith', 'Jane Doe', 'David Hugh-Jones'), Salary = c(50000, 50000, 40000), add_colnames = TRUE ) ht=as_hux(ht) quick_pdf(ht)

hughjonesd commented 6 years ago

Hmm. Works for me. Could you try using github master?

install.packages('remotes') # or devtools will work remotes::install_github('hughjonesd/huxtable')

David

beusse commented 6 years ago

Yes I tried, but I still get the same error :(

hughjonesd commented 6 years ago

Worse and worse! Tell me your R version and platform details.

Could you also try to find that .tex file the error message talks about and (a) attach it here (b) run tools::texi2pdf on it with clean = FALSE, quiet = FALSE; and send me any output and log files?

Lastly, could you check that you can run tools::texi2pdf on a different TeX file without an error? If not, you might want to try the suggestions in the help page for that.

David

hughjonesd commented 6 years ago

One other thing: please list all your installed packages. In particular, you may find (I'm guessing) that installing rmarkdown and knitr will help if you haven't already. And, you might want to check that all the TeX packages listed in report_latex_dependencies() are installed.

On Wed, 1 Aug 2018 at 15:03, David Hugh-Jones davidhughjones@gmail.com wrote:

Worse and worse! Tell me your R version and platform details.

Could you also try to find that .tex file the error message talks about and (a) attach it here (b) run tools::texi2pdf on it with clean = FALSE, quiet = FALSE; and send me any output and log files?

Lastly, could you check that you can run tools::texi2pdf on a different TeX file without an error? If not, you might want to try the suggestions in the help page for that.

David

beusse commented 6 years ago

Indeed I hadn't downloaded the rmarkdown and knitr packages. Nonetheless, I cannot download any of the packages listed in 'report_latex_dependencies()`. I get a warning message telling me they're not available for the R version 3.5.1. And I cannot find that .tex file the error message talks about when trying the quick pdf function. I'm pretty sure it doesn't exist?

I'm sorry, I'm probably lacking basic knowledge in R...

hughjonesd commented 6 years ago

That's because they are LaTeX packages, not R packages. You need to install them with your latex package manager (maybe tlmgr).

Could you try building an Rmarkdown tex file?

David

hughjonesd commented 6 years ago

Closing. We now have check_latex_dependencies() and install_latex_dependencies() to help with this stuff. Please reopen if you still have problems.