Installing latex packages
-
- Posts: 4
- Joined: 2016/11/18 18:42:21
Installing latex packages
I am very new to Centos. I am using Centos 7. So I installed Texlive and using texmaker for compiling my document. It cannot find a lot of packages and I am having a hard time to install all the new packages. I tried to find and install a latex package manager. From my search I found something called tlmgr but seems that there is no Centos version of it available. What is the best way to install new packages without having to install them one by one? And if there is no systematic way of doing it how should I install a package manually?
Re: Installing latex packages
How did you install texlive?astronasrin wrote:So I installed Texlive
I (as a LaTeX package maintainer) strongly recommend not using the version from the repository but using the version from TUG instead:
https://www.tug.org/texlive/quickinstall.html
(Prerequisites for CentOS 7: yum install perl-Tk perl-Digest-MD5 )
Yes, I recommend not using the CentOS repository here, which is clearly an exception since usually it's a very bad idea not using the repository. Why I do this:
- The version from the repository is outdated. When it comes to LaTeX this can lead to problems: First of all package maintainers usually only support the recent version. And when asking questions on https://tex.stackexchange.com/ they recommend to update your TeXlive first, but you cannot using the version from repository. When installing LaTeX packages manually you can get easily into dependency hell - The recent version of the package you try to install does not work with older versions of other packages, so you get strange error messages. If you install updated versions of LaTeX packages manually to solve this issue, they depend on newer versions of other packages as well, and so on... In the end you lost 2 days just for updating half of the packages manually and resolving all the issues caused by incompatible versions of LaTeX packages.
- There are some LaTeX packages missing when using the repository version.
- You get no tlmgr for installing/removing/updating TeX packages.
- TeXlive is a TeX distribution which uses a mixture of "stable release" and "rolling release" paradigms.The core components (for example TeX itself) has been tested by the TeXlive team, but very nearly everything else and especially all the LaTeX packages are just the very recent version. So the version of TeXlive in the CentOS repository is not a very good or stable or tested version. It's just a snapshot of a rolling release TeX distribution which was done when TeXlive was packaged for CentOS. So in this case you get no benefit in using the version from the CentOS repository, just the opposite.
Unfortunately the procedure for installing LaTeX package is not always the same. There is a recommended way but not all package maintainers follow this route. Usually there is a file with the extension ".ins" (e.g. packagename.ins), compiling this file with TeX will extract the package and will print a small instruction which files should now be copied to the corresponding location. For some packages there are "just unzip and use it" archives located at http://mirror.ctan.org/install/macros/latex/contrib/ .I am having a hard time to install all the new packages.
But when doing a full install of the TUG version of TeXlive you should have most of the package (if not all the packages) you need. If there is a specific package missing please name it so we can help.
This sounds as if you had installed TeXlive from the CentOS repositories.I tried to find and install a latex package manager. From my search I found something called tlmgr but seems that there is no Centos version of it available.
As already mentioned above this depends on the package, so we need to know what packages you are missing.how should I install a package manually?
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/
-
- Posts: 4
- Joined: 2016/11/18 18:42:21
Re: Installing latex packages
Hello again;
I installed the TUG version of texlive, but still have troubles with packages. There are still a lot of packages missing (I can't say exactly cause Latex just stops compiling once it sees the first unavailable package). For example:
todonotes.sty
lipsum.sty
here.sty
tabu.sty
And a lot more. Could you please help me go through this? Sorry I am very new to Centos.
Thanks
I installed the TUG version of texlive, but still have troubles with packages. There are still a lot of packages missing (I can't say exactly cause Latex just stops compiling once it sees the first unavailable package). For example:
todonotes.sty
lipsum.sty
here.sty
tabu.sty
And a lot more. Could you please help me go through this? Sorry I am very new to Centos.
Thanks
Re: Installing latex packages
These packages are part of TeXlive 2016. Proof:astronasrin wrote:todonotes.sty
lipsum.sty
here.sty
tabu.sty
Code: Select all
$ find /usr/local -name todonotes.sty -print
/usr/local/texlive/2016/texmf-dist/tex/latex/todonotes/todonotes.sty
$ find /usr/local -name lipsum.sty -print
/usr/local/texlive/2016/texmf-dist/tex/latex/lipsum/lipsum.sty
$ find /usr/local -name here.sty -print
/usr/local/texlive/2016/texmf-dist/tex/latex/here/here.sty
$ find /usr/local -name tabu.sty -print
/usr/local/texlive/2016/texmf-dist/tex/latex/tabu/tabu.sty
Code: Select all
$ which pdflatex
/usr/local/bin/pdflatex
Code: Select all
$ which pdflatex
/usr/local/texlive/2016/bin/x86_64-linux/pdflatex
Code: Select all
/usr/local/texlive/2016/bin/x86_64-linux/tlmgr --gui
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/
-
- Posts: 4
- Joined: 2016/11/18 18:42:21
Re: Installing latex packages
The output of "which pdflatex" is:
Also it can find the .sty file:
So why I receive the warning message that the package is not found? Is it possible that the problem is with Texmaker?
Code: Select all
/usr/bin/pdflatex
Code: Select all
find /usr/local -name todonotes.sty -print
/usr/local/texlive/2016/texmf-dist/tex/latex/todonotes/todonotes.sty
Re: Installing latex packages
That's the problem, it should be either /usr/local/bin/pdflatex or /usr/local/texlive/2016/bin/x86_64-linux/pdflatex. (/usr/bin/pdflatex is the version offered by CentOS.)astronasrin wrote:The output of "which pdflatex" is:
Code: Select all
/usr/bin/pdflatex
So updating symlinks in tlmgr (as I have described in my previous post) should help.
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/