-
-
Notifications
You must be signed in to change notification settings - Fork 981
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
Missing *.sty files when generating PDFs #359
Comments
I think you need to install some additional LaTeX packages: texlive-latex-extra for titling.sty and texlive-pictures for the tufte-handout class |
On openSUSE, this is in texlive-titling and texlive-tufte-latex (using obs://build.opensuse.org/Publishing) |
These files need to be provided by your system LaTeX distribution. It's On Tue, Jan 20, 2015 at 4:06 PM, Nathan Cobb [email protected]
|
Installing texlive-extras seemed to do the trick. |
Any solution for Centos7. $sudo yum -y install texlive-extras
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00
epel/x86_64/metalink | 25 kB 00:00
epel | 4.3 kB 00:00
http://ftp.nluug.nl/pub/os/Linux/distr/fedora-epel/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.
epel | 4.3 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
epel/x86_64/updateinfo FAILED
http://ftp.nluug.nl/pub/os/Linux/distr/fedora-epel/7/x86_64/repodata/b394fc8aa99a5721ac035c79baf15195be6e4b1808058d5b202d95bf882e99c8-updateinfo.xml.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
(1/2): epel/x86_64/updateinfo | 369 kB 00:00
(2/2): epel/x86_64/primary_db | 3.5 MB 00:03
Determining fastest mirrors
* base: mirror.nl.leaseweb.net
* epel: mirrors.coreix.net
* extras: mirror.nl.leaseweb.net
* updates: mirror.nl.leaseweb.net
- No package texlive-extras available.
- Error: Nothing to do |
I don't know the CentOS LaTeX packages well so I'm not sure where these On Mon, Oct 12, 2015 at 1:28 AM, RYO ENG® [email protected] wrote:
|
How can RStudio users Kindly look into it? |
@englianhu It is vital that the end user ensure their LaTeX distribution has the necessary elements installed. About the only thing I think that RStudio could do would be to notify the end user that certain packages are missing. But it would be way out of the swim lane for RStudio to be responsible to install these packages on the system. That being said, Maybe it would be possible to have RStudio grab them from CTAN and place the files in the current directory. I would not want that solution because it would clutter up my system. So, I think that the best thing for RStuio (actually knitr) to do would be to inform the end user what packages are missing so they could be installed, by the end user. As for the Centos7 issue not having a texlive-extras package. It is possible for you to install packages without yum. https://www.ctan.org/tex-archive/macros/latex/contrib/titling?lang=en Disclaimer: I speak only for myself and do not represent RStudio in any way. |
@jjallaire I tested RStudio / knitr on CentOS and even with the EPEL repository enabled there were quite a few LaTeX packages missing. To see this / build tests, install the 'rticles' package and try to build PDFs from the templates. Fedora (as of Fedora 22) did have all the LaTeX pieces required, but I'm not sure how one goes about backporting those to CentOS 7. And both Debian and Ubuntu have all the LaTeX requirements. @englianhu If you can use Fedora 22 (stable) or 23 (alpha/beta now but stable soon) instead of CentOS 7 you should be able to build most PDFs. However, if you want to use RStudio Server, you'll have to build it from source - RStudio Desktop is supported on Fedora but the Server isn't. Server does work on Fedora if you build it from source. |
I'm not sure what we can do about this. I guess we could encourage custom On Fri, Oct 16, 2015 at 4:31 AM, M. Edward (Ed) Borasky <
|
I believe there are two answers to this: when creating R documentation with roxygen, the LaTeX call in the background already knows how to reference Rd.sty, which is not in any LaTeX distribution, but which is required to create the .Rd files. (Rd.sty is distributed as part of the R base package) Thus, there already is a way that some R packages use to reference non-standard LaTeX classes. It would be fairly straightforward to use the same approach and include "critical" style files as part of the rmarkdown package, with a switch to include/exclude them (choose your default value). Second, LaTeX is not a monolithic package, regardless of platform. You can install the universe of LaTeX packages in Miktex or Texlive (about 4GB) to get around such problems, but most users won't bother. You may run into similar problems elsewhere in the R universe with fonts provided by your LaTeX distribution (or not), for instance. So problems like these are likely to pop up. BUT: they are similar, and providing a small FAQ as part of the package may be useful, for instance at https://github.com/rstudio/rmarkdown/wiki/FAQ... |
Okay, those are excellent suggestions. I believe R accomplishes the On Fri, Oct 16, 2015 at 8:16 AM, Lars Vilhuber [email protected]
|
Working off @jjallaires input here: rstudio/rmarkdown#359
@larsvilhuber to the 2nd point, I verified that the following will work on CentOS Linux release 7.1.1503:
This generic approach will work for most CTAN packages. See http://tug.ctan.org/info/beginlatex/html/chapter5.html for more info. |
Did it for me in Fedora... I supposed it'd be similar in CentOS. |
@mimoralea CentOS 7 is binary-compatible with RHEL 7. Fedora is a separate distribution. Fedora has some LaTeX packages that RHEL/CentOS don't have. Moreover, RStudio Server is not supported on Fedora, although the desktop version is. Don't get me wrong; Fedora is a fine distribution, but it's not popular enough to have widespread support like, say, Ubuntu. For these reasons, among others, I gave up on CentOS and Fedora and switched to Debian. And on my workstation I simply install texlive-full. I wasted many hours tracking down LaTeX dependencies even on Fedora. Unless you're under some administrative constraint that forces you to use RHEL / CentOS, I'd recommend staying away from them. |
The bwlewis comment above also works for Fedora 22. Quoted here:
|
@pm0kjp Thanks!! In the unlikely event I'm forced to use RHEL / CentOS I'll keep this in mind. |
@tuxdna "tiling" or _"titling"_?? I'm on Fedora 24:
|
@znmeb You are right! I was using wrong spelling. This makes it super simple to setup on Fedora 24 :-) |
Installed, thanks lot. On Fri, 16 Sep 2016 12:29 PM Saleem Ansari, [email protected]
|
All: let it be noted that on my laptop (Win10 / Fedora 24 dual boot) and my workstation (Fedora 24 with numerous other distros in virtual machines) I nearly always just give up hunting for LaTeX dependencies when authoring and just install the whole TeXLive / MikTeX distribution! ;-) |
More Linux LaTeX tricks: On Ubuntu (and probably Debian) do
Then, if an RStudio / Markdown operation fails on a missing LaTeX component, type On Fedora, you don't need to install anything. Just type This also works when installing R packages from source - if an install fails because of a missing header file you can find out which Linux package to install the same way. |
for arch:
|
Got many same errors like below when compiling project on RHEL 7.4: Installing all textlive-* packages solves the problem: |
I did what @yunyings suggested and it does solve that message but I got this after knitting.
|
Update on Arch Linux: I'm now running Arch Linux. To get all the R Markdown tools to work, I had to install three packages: If you're writing for specific journals, you may need to install some Arch User Repository (AUR) packages. For example:
|
Thanks to @znmeb and the post from October 12, 2016 and also @jjallaire . I got it to work on my Ubuntu 16.04: |
No matter what your OS is, there is no need to wrestle with missing LaTeX packages anymore, if you install.packages(c('tinytex', 'rmarkdown'))
tinytex::install_tinytex() I have been so frustrated by this problem and spent a few weeks in last December on a custom LaTeX distribution named TinyTeX. See https://yihui.name/tinytex/ for more info. |
I followed the instructions below and it solve the problem. |
tinytex solved my problem. Thanks @yihui! |
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. |
Running rmarkdown out of RStudio 0.98.1091 on Ubuntu I am getting errors trying to generate PDFs. These started cropping up as we sequentially upgraded the server over the past 6 months or so.
Trying to generate the default .rmd template gives me a missing "titling.sty" file:
Trying to generate a tufte handout gives me a similar error:
I'm not sure where these files should be found, within RMarkdown or with RStudio/pandoc?
The text was updated successfully, but these errors were encountered: