I am trying to setup my system to render PDFs with rmarkdown and quarto, so I installed tinytex by running tinytex::install_tinytex(). when i run the render/knit i am getting the following error
running xelatex - 1
command xelatex not found, attempting install
finding package for xelatex
> 1 package to install
> installing xelatex (1 of 1)
ERROR: Error executing 'C:\Users\myname\AppData\Roaming\TinyTeX\bin\win32\xelatex': This program is blocked by group policy. For more information, contact your system administrator. (os error 1260)
i don't have administrative powers since the laptop belongs to the company. so i told the IT guy to run the xelatex.exe file and also to add that path to environment variables. but i am still getting the same error.
what could be the issue and how to solve it? thanks in advance
Related
I am using Rstudio in windows 10. I am triying to create a pdf from a .tex file. However, when I compile the PDF, the following error appears:
Running pdflatex.exe on file_name.tex...failed Error running C:/Users/user_name/AppData/Local/Programs/MiKTeX/miktex/bin/x64/pdflatex.exe (exit code -1073740791)
I am using a native installation of R, Rstudio and MikTeX. Not an envioronment with anaconda or similar.
If you are using RStudio, have you tried tinytex instead of MikTeX? In the Tools Menu>Global Options>Sweave, tick "use tinytex for compiling .tex files". Then install tinytex package. After installing tinytex package, write in console "tinytex::install_tinytex()". This will install the latex compiler tinytex. Try compiling your tex file using it.
I think that issue has to do with missing packages. In fact, MiKTeX doesnt preinstall most of them. I recommend to compile with TinyTeX, because it shows where the compilation stops (as I said, due to a missing package typically required in some sty file). This way you can track which are the missing packages and install them on the MiKTeX Console one by one.
I posted about this issue in an open discussion on Github. Drop the link here in case you need more details.
I am checking my package and this is actually the last remaining problem. The pdf file cannot be compiled and the logfile tells me
2015-10-15 14:17:47,430+0200 INFO pdflatex - running 'initexmf --quiet --update-fndb' to refresh the file name database
2015-10-15 14:17:50,276+0200 FATAL pdflatex - GUI framework cannot be initialized.
2015-10-15 14:17:50,276+0200 FATAL pdflatex - Info:
2015-10-15 14:17:50,276+0200 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2015-10-15 14:17:50,276+0200 FATAL pdflatex - Line: 50
Any idea where the problem could be?
This is known problem wit MikTex 2.9 when pdflatex encounters error
GUI framework cannot be initialized.
(found on my Windows 7 system in the file ~\AppData\Local\MiKTeX\2.9\miktex\log)
So far, I can offer following sequence of actions to remedy this:
In Windows Command prompt go to MiKTeX bin folder (e.g. C:\Program Files (x86)\MiKTeX 2.9\miktex\bin) and run utility mo.exe;
In General tab change 'Install missing packages on-the-fly:' option to No (this will disable GUI and error above won't be happening again);
Run R CMD that calls latex converter again (in my case
R CMD Rd2pdf man/
again to see new errors;
This time miktex won't complaint about GUI - instead it will be missing packages with error like this
! LaTeX Error: File `inconsolata.sty' not found.
Start MiKTeX package manager (again from mo.exe Packages tab) and install missing package one at the time by repeating steps 3.-5.
This might be not most effective way of fixing this so I appreciate corrections or alternative solutions.
I had this same issue, but for the newest versions of Miktex, mo.exe does not exist, and is replaced by the Miktex console. If you open it, go into settings and change the package on-the-fly setting from "Ask Me" to "Always", then the packages will install. If you do "Never" instead, then you'll have to do the individual package installation described by #topchef.
I ran into this problem just... A very easy solution for me that allowed me not to renege on the install on the fly option is to install TexStudio, open your .tex file in there, and compile it: you will be able to install all your MikTex packages on the fly as desired and retain control over what gets installed.
I had the same problem compiling Knit to PDF of a R markdown file in R studio. Once I changed from "Ask me" to "Always" in the MikTex console setting (see the screenshot posted above [Cara Wogsland]) it compiled without errors.
I am using RStudio on a windows machine. recently, I wanted to deploy an shiny-markdown document using the HH library - wihout sucess. I broke down the error to the following test program
---
title: "Untitled"
runtime: shiny
output: html_document
---
```{r}
require( Rmpfr )
```
This program works well if I run it locally. However, if I try to deploy it to shinyapps.io using shinyapps::deployApp(), RStudio tries to build the package Rmpfr from source even tough the package is already installed. This building from source fails with the following error (full error log: http://pastebin.com/D5KVc44n)
configure: error: Header file mpfr.h not found; maybe use --with-mpfr-include=INCLUDE_PATH
ERROR: configuration failed for package ‘Rmpfr’
* removing ‘/usr/local/lib/R/site-library/Rmpfr’
################################# End Task Log #################################
Error: Unhandled Exception: Child Task 61322212 failed: Error building image: Error building Rmpfr (0.5-7). Build exited with non-zero status: 1
I think this question is related to this one about the rmpfr package, but the solution does not work on windows since it uses the apt-get command.
Any suggestions are welcome.
EDIT: I already tried to make mpfr.h available. I downloaded the mpfr package from http://www.mpfr.org/mpfr-current/, unpacked it and added it to the windows PATH variable. I also copied the entries of the mpfr-3.0.0 folder to the R working directory. Both methods showed no success.
I am new to R and am trying to knit my R Markdown files into PDF format.
I continually get the error message:
pandoc: pdflatex not found. pdflatex is needed for pdf output.
Error: pandoc document conversion failed with error 41
Execution halted
No TeX installation detected (TeX is required to create PDF output). You should install a recommended TeX distribution for your platform:
Windows: MiKTeX (Complete) - http://miktex.org/2.9/setup
(NOTE: Be sure to download the Complete rather than Basic installation)
Mac OS X: TexLive 2013 (Full) - http://tug.org/mactex/
(NOTE: Download with Safari rather than Chrome strongly recommended)
Linux: Use system package manager
I have downloaded pandoc, and I have also downloaded TexLive and have installed them both onto my computer. For the life of me I cannot figure out why R wont recognize that Ive installed them, and knit into a PDF.
Please help!
For Mac OS X, if you have installed TexLive (I installed so through homebrew caskroom) you should have pdftex available via command line.
type 'which pdftex' to make sure something shows up. from there, i created a symbolic link into my $PATH, specifically into my /usr/local/bin (which is where all my homebrew stuff is stored) with:
ln -s /usr/texbin/pdftex /usr/local/bin/pdflatex
from there, using knitr in RStudio and R in general seemed to work and rendering R Markdown is definitely a really beautiful option (check some of the templates too like the Tufte one!)
I had the same problem, after downloading mactex through FireFox and installing the package.
I quit and restarted RStudio, and it worked (no changes at the terminal command line level).
The .pdf output is, however, a bit blurry at least on my first attempt.
I had a similar issue as I wasn't able to knit pdf file & solved it by installing & running tinitex packages using those commands in the console -- not the terminal
install.packages("tinytex")
tinytex::install_tinytex()
I have been using Sweave for quite sometime on my system using RStudio.
However, I recently upgraded my Mac OS from Lion to Mavericks.
This caused several issues:
First, RStudio was not able to locate the R library, and it just wont start. I reinstalled RStudio, but still got the same issue. So I reinstalled both R and RStudio, and then RStudio started to work.
And now, RStudio is still not able to locate TeX installation, and gives me the following warning:
"No TeX installation detected. Please install TeX before compiling."
This will probably get fixed by a reinstall, but I would prefer to avoid a fresh download of TeX (~2.3G).
Any ideas on how to resolve this?
RStudio expects pdflatex to be on the system path (i.e. entering Sys.which("pdflatex") at the R console should return the path to pdflatex).
You can fix the problem by getting pdflatex back on the system path:
Find the path where pdflatex is installed on your system--likely /usr/texbin, but use find /usr -name pdflatex if you need help.
Create a file called TeX in /etc/paths.d that contains this path.
For example:
$ sudo -s "echo /usr/texbin > /etc/paths.d/TeX"
You'll need to restart to apply the changes.