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

Closed
natecobb opened this Issue Jan 20, 2015 · 30 comments

Comments

Projects
None yet
@natecobb

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:

/usr/lib/rstudio-server/bin/pandoc/pandoc Preview-1e791624af74.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Preview-1e791624af74.pdf --template /home/natecobb/ShinyApps/tempdeleteme/packrat/lib/x86_64-pc-linux-gnu/3.1.2/rmarkdown/rmd/latex/default.tex --highlight-style tango --latex-engine pdflatex --variable 'geometry:margin=1in' 
output file: Preview-1e791624af74.knit.md

! LaTeX Error: File `titling.sty' not found.

Trying to generate a tufte handout gives me a similar error:

/usr/lib/rstudio-server/bin/pandoc/pandoc Preview-1e795f314859.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Preview-1e795f314859.pdf --template /home/natecobb/ShinyApps/tempdeleteme/packrat/lib/x86_64-pc-linux-gnu/3.1.2/rmarkdown/rmarkdown/templates/tufte_handout/resources/tufte-handout.tex --highlight-style pygments --latex-engine pdflatex 
output file: Preview-1e795f314859.knit.md

! LaTeX Error: File `tufte-handout.cls' not found.

I'm not sure where these files should be found, within RMarkdown or with RStudio/pandoc?

@jjallaire

This comment has been minimized.

Show comment
Hide comment
@jjallaire

jjallaire Jan 20, 2015

Member

I think you need to install some additional LaTeX packages: texlive-latex-extra for titling.sty and texlive-pictures for the tufte-handout class

Member

jjallaire commented Jan 20, 2015

I think you need to install some additional LaTeX packages: texlive-latex-extra for titling.sty and texlive-pictures for the tufte-handout class

@larsvilhuber

This comment has been minimized.

Show comment
Hide comment
@larsvilhuber

larsvilhuber Apr 23, 2015

On openSUSE, this is in texlive-titling and texlive-tufte-latex (using obs://build.opensuse.org/Publishing)

On openSUSE, this is in texlive-titling and texlive-tufte-latex (using obs://build.opensuse.org/Publishing)

@jjallaire

This comment has been minimized.

Show comment
Hide comment
@jjallaire

jjallaire Apr 24, 2015

Member

These files need to be provided by your system LaTeX distribution. It's
likely that as part of your upgrading your installation got pruned or
otherwise modified. Installing the correct LaTeX packages should resolve
the issue.

On Tue, Jan 20, 2015 at 4:06 PM, Nathan Cobb notifications@github.com
wrote:

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:

/usr/lib/rstudio-server/bin/pandoc/pandoc Preview-1e791624af74.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Preview-1e791624af74.pdf --template /home/natecobb/ShinyApps/tempdeleteme/packrat/lib/x86_64-pc-linux-gnu/3.1.2/rmarkdown/rmd/latex/default.tex --highlight-style tango --latex-engine pdflatex --variable 'geometry:margin=1in'
output file: Preview-1e791624af74.knit.md

! LaTeX Error: File `titling.sty' not found.

Trying to generate a tufte handout gives me a similar error:

/usr/lib/rstudio-server/bin/pandoc/pandoc Preview-1e795f314859.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Preview-1e795f314859.pdf --template /home/natecobb/ShinyApps/tempdeleteme/packrat/lib/x86_64-pc-linux-gnu/3.1.2/rmarkdown/rmarkdown/templates/tufte_handout/resources/tufte-handout.tex --highlight-style pygments --latex-engine pdflatex
output file: Preview-1e795f314859.knit.md

! LaTeX Error: File `tufte-handout.cls' not found.

I'm not sure where these files should be found, within RMarkdown or with
RStudio/pandoc?


Reply to this email directly or view it on GitHub
#359.

Member

jjallaire commented Apr 24, 2015

These files need to be provided by your system LaTeX distribution. It's
likely that as part of your upgrading your installation got pruned or
otherwise modified. Installing the correct LaTeX packages should resolve
the issue.

On Tue, Jan 20, 2015 at 4:06 PM, Nathan Cobb notifications@github.com
wrote:

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:

/usr/lib/rstudio-server/bin/pandoc/pandoc Preview-1e791624af74.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Preview-1e791624af74.pdf --template /home/natecobb/ShinyApps/tempdeleteme/packrat/lib/x86_64-pc-linux-gnu/3.1.2/rmarkdown/rmd/latex/default.tex --highlight-style tango --latex-engine pdflatex --variable 'geometry:margin=1in'
output file: Preview-1e791624af74.knit.md

! LaTeX Error: File `titling.sty' not found.

Trying to generate a tufte handout gives me a similar error:

/usr/lib/rstudio-server/bin/pandoc/pandoc Preview-1e795f314859.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Preview-1e795f314859.pdf --template /home/natecobb/ShinyApps/tempdeleteme/packrat/lib/x86_64-pc-linux-gnu/3.1.2/rmarkdown/rmarkdown/templates/tufte_handout/resources/tufte-handout.tex --highlight-style pygments --latex-engine pdflatex
output file: Preview-1e795f314859.knit.md

! LaTeX Error: File `tufte-handout.cls' not found.

I'm not sure where these files should be found, within RMarkdown or with
RStudio/pandoc?


Reply to this email directly or view it on GitHub
#359.

@natecobb

This comment has been minimized.

Show comment
Hide comment
@natecobb

natecobb Apr 25, 2015

Installing texlive-extras seemed to do the trick.

Installing texlive-extras seemed to do the trick.

@natecobb natecobb closed this Apr 25, 2015

@englianhu

This comment has been minimized.

Show comment
Hide comment
@englianhu

englianhu Oct 12, 2015

Any solution for Centos7.
http://bertelsen.ca/texlive-for-rmarkdown-on-ubuntu/

$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

Any solution for Centos7.
http://bertelsen.ca/texlive-for-rmarkdown-on-ubuntu/

$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
@jjallaire

This comment has been minimized.

Show comment
Hide comment
@jjallaire

jjallaire Oct 12, 2015

Member

I don't know the CentOS LaTeX packages well so I'm not sure where these
styles can be found.

On Mon, Oct 12, 2015 at 1:28 AM, RYO ENG® notifications@github.com wrote:

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:00http://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 FAILEDhttp://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


Reply to this email directly or view it on GitHub
#359 (comment).

Member

jjallaire commented Oct 12, 2015

I don't know the CentOS LaTeX packages well so I'm not sure where these
styles can be found.

On Mon, Oct 12, 2015 at 1:28 AM, RYO ENG® notifications@github.com wrote:

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:00http://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 FAILEDhttp://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


Reply to this email directly or view it on GitHub
#359 (comment).

@englianhu

This comment has been minimized.

Show comment
Hide comment
@englianhu

englianhu Oct 15, 2015

How can RStudio users knit PDF especially researchers, MSc or PhD students who gonna write thesis in pdf format?

Kindly look into it?

How can RStudio users knit PDF especially researchers, MSc or PhD students who gonna write thesis in pdf format?

Kindly look into it?

@justacec

This comment has been minimized.

Show comment
Hide comment
@justacec

justacec Oct 15, 2015

@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.

@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.

@znmeb

This comment has been minimized.

Show comment
Hide comment
@znmeb

znmeb Oct 16, 2015

@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.

znmeb commented Oct 16, 2015

@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.

@jjallaire

This comment has been minimized.

Show comment
Hide comment
@jjallaire

jjallaire Oct 16, 2015

Member

I'm not sure what we can do about this. I guess we could encourage custom
LaTeX formats to directly embed more of heir required .sty and .cls files
but I'm not sure if most format authors would go to this trouble just for
CentOS. Or perhaps there is a way to create a mini-distribution of commonly
required packages and embed it in either rmarkdown or RStudio. I'd be open
to this but don't have the time to run down all of the requirements, etc.
so this would have to contributed by another party.

On Fri, Oct 16, 2015 at 4:31 AM, M. Edward (Ed) Borasky <
notifications@github.com> wrote:

@jjallaire https://github.com/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.


Reply to this email directly or view it on GitHub
#359 (comment).

Member

jjallaire commented Oct 16, 2015

I'm not sure what we can do about this. I guess we could encourage custom
LaTeX formats to directly embed more of heir required .sty and .cls files
but I'm not sure if most format authors would go to this trouble just for
CentOS. Or perhaps there is a way to create a mini-distribution of commonly
required packages and embed it in either rmarkdown or RStudio. I'd be open
to this but don't have the time to run down all of the requirements, etc.
so this would have to contributed by another party.

On Fri, Oct 16, 2015 at 4:31 AM, M. Edward (Ed) Borasky <
notifications@github.com> wrote:

@jjallaire https://github.com/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.


Reply to this email directly or view it on GitHub
#359 (comment).

@larsvilhuber

This comment has been minimized.

Show comment
Hide comment
@larsvilhuber

larsvilhuber Oct 16, 2015

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...

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...

@jjallaire

This comment has been minimized.

Show comment
Hide comment
@jjallaire

jjallaire Oct 16, 2015

Member

Okay, those are excellent suggestions. I believe R accomplishes the
inclusion of additional sty files using the TEXINPUTS environment variable
so we could likely do the same.

On Fri, Oct 16, 2015 at 8:16 AM, Lars Vilhuber notifications@github.com
wrote:

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...


Reply to this email directly or view it on GitHub
#359 (comment).

Member

jjallaire commented Oct 16, 2015

Okay, those are excellent suggestions. I believe R accomplishes the
inclusion of additional sty files using the TEXINPUTS environment variable
so we could likely do the same.

On Fri, Oct 16, 2015 at 8:16 AM, Lars Vilhuber notifications@github.com
wrote:

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...


Reply to this email directly or view it on GitHub
#359 (comment).

stephlocke added a commit to stephlocke/isc-proposal that referenced this issue Nov 6, 2015

More dependencies!
Working off @jjallaires input here: rstudio/rmarkdown#359
@bwlewis

This comment has been minimized.

Show comment
Hide comment
@bwlewis

bwlewis Nov 9, 2015

@larsvilhuber to the 2nd point, I verified that the following will work on CentOS Linux release 7.1.1503:

wget http://mirrors.ctan.org/macros/latex/contrib/titling.zip
unzip titling.zip     # (might need to sudo yum install unzip)
cd titling
latex titling.ins
sudo mkdir -p /usr/share/texlive/texmf-dist/tex/latex/titling
sudo cp titling.sty /usr/share/texlive/texmf-dist/tex/latex/titling/
sudo texhash

This generic approach will work for most CTAN packages. See http://tug.ctan.org/info/beginlatex/html/chapter5.html for more info.

bwlewis commented Nov 9, 2015

@larsvilhuber to the 2nd point, I verified that the following will work on CentOS Linux release 7.1.1503:

wget http://mirrors.ctan.org/macros/latex/contrib/titling.zip
unzip titling.zip     # (might need to sudo yum install unzip)
cd titling
latex titling.ins
sudo mkdir -p /usr/share/texlive/texmf-dist/tex/latex/titling
sudo cp titling.sty /usr/share/texlive/texmf-dist/tex/latex/titling/
sudo texhash

This generic approach will work for most CTAN packages. See http://tug.ctan.org/info/beginlatex/html/chapter5.html for more info.

@mimoralea

This comment has been minimized.

Show comment
Hide comment
@mimoralea

mimoralea Feb 6, 2016

sudo dnf install texlive-titling

Did it for me in Fedora... I supposed it'd be similar in CentOS.

sudo dnf install texlive-titling

Did it for me in Fedora... I supposed it'd be similar in CentOS.

@znmeb

This comment has been minimized.

Show comment
Hide comment
@znmeb

znmeb Feb 7, 2016

@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.

znmeb commented Feb 7, 2016

@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.

@pm0kjp

This comment has been minimized.

Show comment
Hide comment
@pm0kjp

pm0kjp Aug 28, 2016

The bwlewis comment above also works for Fedora 22. Quoted here:

@larsvilhuber to the 2nd point, I verified that the following will work on CentOS Linux release 7.1.1503:

wget http://mirrors.ctan.org/macros/latex/contrib/titling.zip
unzip titling.zip     # (might need to sudo yum install unzip)
cd titling
latex titling.ins
sudo mkdir -p /usr/share/texlive/texmf-dist/tex/latex/titling
sudo cp titling.sty /usr/share/texlive/texmf-dist/tex/latex/titling/
sudo texhash

This generic approach will work for most CTAN packages. See http://tug.ctan.org/info/beginlatex/html/chapter5.html for more info.

pm0kjp commented Aug 28, 2016

The bwlewis comment above also works for Fedora 22. Quoted here:

@larsvilhuber to the 2nd point, I verified that the following will work on CentOS Linux release 7.1.1503:

wget http://mirrors.ctan.org/macros/latex/contrib/titling.zip
unzip titling.zip     # (might need to sudo yum install unzip)
cd titling
latex titling.ins
sudo mkdir -p /usr/share/texlive/texmf-dist/tex/latex/titling
sudo cp titling.sty /usr/share/texlive/texmf-dist/tex/latex/titling/
sudo texhash

This generic approach will work for most CTAN packages. See http://tug.ctan.org/info/beginlatex/html/chapter5.html for more info.

@znmeb

This comment has been minimized.

Show comment
Hide comment
@znmeb

znmeb Aug 28, 2016

@pm0kjp Thanks!! In the unlikely event I'm forced to use RHEL / CentOS I'll keep this in mind.

znmeb commented Aug 28, 2016

@pm0kjp Thanks!! In the unlikely event I'm forced to use RHEL / CentOS I'll keep this in mind.

@tuxdna

This comment has been minimized.

Show comment
Hide comment
@tuxdna

tuxdna Sep 14, 2016

texlive-tiling seems to be present in CentOS 7, however it is not present in latest version of Fedora ( 24 ).

@bwlewis thanks, your steps work for me on Fedora 24.

tuxdna commented Sep 14, 2016

texlive-tiling seems to be present in CentOS 7, however it is not present in latest version of Fedora ( 24 ).

@bwlewis thanks, your steps work for me on Fedora 24.

@znmeb

This comment has been minimized.

Show comment
Hide comment
@znmeb

znmeb Sep 15, 2016

@tuxdna "tiling" or _"titling"_?? I'm on Fedora 24:

$ dnf search texlive|grep titling
texlive-titling.noarch : Control over the typesetting of the \maketitle command
texlive-titling-doc.noarch : Documentation for titling

znmeb commented Sep 15, 2016

@tuxdna "tiling" or _"titling"_?? I'm on Fedora 24:

$ dnf search texlive|grep titling
texlive-titling.noarch : Control over the typesetting of the \maketitle command
texlive-titling-doc.noarch : Documentation for titling
@tuxdna

This comment has been minimized.

Show comment
Hide comment
@tuxdna

tuxdna Sep 16, 2016

@znmeb You are right! I was using wrong spelling. This makes it super simple to setup on Fedora 24 :-)

tuxdna commented Sep 16, 2016

@znmeb You are right! I was using wrong spelling. This makes it super simple to setup on Fedora 24 :-)

@englianhu

This comment has been minimized.

Show comment
Hide comment
@englianhu

englianhu Sep 16, 2016

Installed, thanks lot.

On Fri, 16 Sep 2016 12:29 PM Saleem Ansari, notifications@github.com
wrote:

@znmeb https://github.com/znmeb You are right! I was using wrong
spelling. This makes it super simple to setup on Fedora 24 :-)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#359 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AG5IvuTkYmY7_kVhOB4mhHvO5VyXvsd_ks5qqg0wgaJpZM4DU4q6
.

®γσ, Eng Lian Hu https://beta.rstudioconnect.com/englianhu/ryo-eng/

Installed, thanks lot.

On Fri, 16 Sep 2016 12:29 PM Saleem Ansari, notifications@github.com
wrote:

@znmeb https://github.com/znmeb You are right! I was using wrong
spelling. This makes it super simple to setup on Fedora 24 :-)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#359 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AG5IvuTkYmY7_kVhOB4mhHvO5VyXvsd_ks5qqg0wgaJpZM4DU4q6
.

®γσ, Eng Lian Hu https://beta.rstudioconnect.com/englianhu/ryo-eng/

@znmeb

This comment has been minimized.

Show comment
Hide comment
@znmeb

znmeb Sep 16, 2016

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! ;-)

znmeb commented Sep 16, 2016

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! ;-)

@znmeb

This comment has been minimized.

Show comment
Hide comment
@znmeb

znmeb Oct 12, 2016

More Linux LaTeX tricks:

On Ubuntu (and probably Debian) do

sudo apt-get install apt-file
sudo apt-file update

Then, if an RStudio / Markdown operation fails on a missing LaTeX component, type apt-file search <component>. For example, if titling.sty is missing, type apt-file search titling.sty. You'll get a listing that tells you which package(s) have a file that matches the text titling.sty.

On Fedora, you don't need to install anything. Just type dnf whatprovides */<component>, e.g., dnf whatprovides */titling.sty. You'll get the package name.

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.

znmeb commented Oct 12, 2016

More Linux LaTeX tricks:

On Ubuntu (and probably Debian) do

sudo apt-get install apt-file
sudo apt-file update

Then, if an RStudio / Markdown operation fails on a missing LaTeX component, type apt-file search <component>. For example, if titling.sty is missing, type apt-file search titling.sty. You'll get a listing that tells you which package(s) have a file that matches the text titling.sty.

On Fedora, you don't need to install anything. Just type dnf whatprovides */<component>, e.g., dnf whatprovides */titling.sty. You'll get the package name.

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.

@GuangchuangYu

This comment has been minimized.

Show comment
Hide comment
@GuangchuangYu

GuangchuangYu Jan 10, 2017

for arch:

sudo pacman -S texlive-latexextra

for arch:

sudo pacman -S texlive-latexextra
@yunyings

This comment has been minimized.

Show comment
Hide comment
@yunyings

yunyings Aug 30, 2017

Got many same errors like below when compiling project on RHEL 7.4:
LaTeX Error: File `xtab.sty' not found.

Installing all textlive-* packages solves the problem:
sudo yum install texlive-*.el7.noarch

yunyings commented Aug 30, 2017

Got many same errors like below when compiling project on RHEL 7.4:
LaTeX Error: File `xtab.sty' not found.

Installing all textlive-* packages solves the problem:
sudo yum install texlive-*.el7.noarch

@yihui yihui referenced this issue Aug 30, 2017

Open

Some potential topics for future blog posts #3

22 of 53 tasks complete
@elinw

This comment has been minimized.

Show comment
Hide comment
@elinw

elinw Sep 20, 2017

I did what @yunyings suggested and it does solve that message but I got this after knitting.

PDF.js v1.3.158 (build: 944d1e6)
Message: Invalid PDF structure

elinw commented Sep 20, 2017

I did what @yunyings suggested and it does solve that message but I got this after knitting.

PDF.js v1.3.158 (build: 944d1e6)
Message: Invalid PDF structure

@znmeb

This comment has been minimized.

Show comment
Hide comment
@znmeb

znmeb Sep 20, 2017

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: texlive-most, texlive-lang and t1utils. The first two are meta-packages / package collections. As with most Linux distros, this takes up about 4 GB of disk space.

If you're writing for specific journals, you may need to install some Arch User Repository (AUR) packages. For example:

aur/texlive-aastex6 6.1-3 (1) (0.24)
    Package for preparing papers in American Astronomical Society (AAS) journals

znmeb commented Sep 20, 2017

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: texlive-most, texlive-lang and t1utils. The first two are meta-packages / package collections. As with most Linux distros, this takes up about 4 GB of disk space.

If you're writing for specific journals, you may need to install some Arch User Repository (AUR) packages. For example:

aur/texlive-aastex6 6.1-3 (1) (0.24)
    Package for preparing papers in American Astronomical Society (AAS) journals
@boyko11

This comment has been minimized.

Show comment
Hide comment
@boyko11

boyko11 Feb 4, 2018

Thanks to @znmeb and the post from October 12, 2016 and also @jjallaire . I got it to work on my Ubuntu 16.04:
sudo apt-get install texlive-latex-extra

boyko11 commented Feb 4, 2018

Thanks to @znmeb and the post from October 12, 2016 and also @jjallaire . I got it to work on my Ubuntu 16.04:
sudo apt-get install texlive-latex-extra

@yihui

This comment has been minimized.

Show comment
Hide comment
@yihui

yihui Feb 5, 2018

Member

No matter what your OS is, there is no need to wrestle with missing LaTeX packages anymore, if you

devtools::install_github(c('yihui/tinytex', 'rstudio/rmarkdown'))

# first uninstall your existing LaTeX distribution, and then
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.

Member

yihui commented Feb 5, 2018

No matter what your OS is, there is no need to wrestle with missing LaTeX packages anymore, if you

devtools::install_github(c('yihui/tinytex', 'rstudio/rmarkdown'))

# first uninstall your existing LaTeX distribution, and then
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.

@willpearse willpearse referenced this issue Feb 7, 2018

Closed

submission: suppdata #195

15 of 19 tasks complete
@GinkoEagle

This comment has been minimized.

Show comment
Hide comment
@GinkoEagle

GinkoEagle Apr 19, 2018

I followed the instructions below and it solve the problem.

https://www.pydanny.com/setting-up-latex-on-mac-os-x.html

I followed the instructions below and it solve the problem.

https://www.pydanny.com/setting-up-latex-on-mac-os-x.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment