TeX Live is a complete TeX distribution with several programs to create professional documents.
USE flags for app-text/texlive A complete TeX distribution
||Add support for X11|
||Add support for Multi-byte character languages (Chinese, Japanese, Korean)|
||Add support for the ConTeXt format (dev-texlive/texlive-context)|
||Add support for extra TeXLive packages|
||Add typesetting support for games (chess, etc.) (dev-texlive/texlive-games)|
||Add support for several graphics packages (pgf, tikz,...)|
||Add LaTeX support for the humanities (dev-texlive/texlive-humanities)|
||Add extra support for luatex|
||Add support for metapost: A tool for creating graphics in scalable PostScript|
||Add support for music typesetting (dev-texlive/texlive-music)|
||Add dev-tex/pdfannotextractor support, for extracting annotations from PDF files|
||Add support for libpng (PNG images)|
||Add pstricks packages (dev-texlive/texlive-pstricks)|
||Add support for publishers (dev-texlive/texlive-publishers)|
||Add typesetting support for natural and computer sciences (dev-texlive/texlive-mathscience)|
||Add support for dev-tex/tex4ht (for converting (La)TeX to (X)HTML, XML and OO.org)|
||Add support for app-text/texi2html which converts texi files to HTML|
||Add support for FreeType and/or FreeType2 fonts|
||Add support for XeTeX macros (dev-texlive/texlive-xetex)|
||Add support for XML files|
emerge --ask app-text/texlive
When wanting to merge multiple Doxygen PDF files into one PDF file, or book style PDF preferable for E-Reading devices; it is likely the dev-texlive/texlive-latexextra package will be needed to be installed. (i.e. pdflatex refman.tex)
When users try to upgrade TeXLive, they'll meet a failure due to "hard blocking". Here are a solution to overcome it and the reasons behind it.
First you need to unmerge some packages in dev-texlive:
qlist -I dev-texlive/texlive-lang > texlive-lang-packages.txt
# Or if you prefer 'eix' to qlist, do instead:
eix '-I#' dev-texlive/texlive-lang > texlive-lang-packages.txt
emerge --deselect=n --unmerge texlive-latex texlive-basic $(cat texlive-lang-packages.txt)
Now you can upgrade:
emerge --ask --oneshot --update app-text/texlive $(cat texlive-lang-packages.txt)
Or simply pull in "world":
emerge -uDN1a @world
Why this workaround?
Some dev-texlive/texlive-* packages (see below) do "hard blocking". For example, texlive-basic-2016 hard-blocks <texlive-basic-2016, i.e., older versions of itself. Hard-blocked packages can't be installed simultaneously, even temporarily. But as of 2017, portage can't resolve hard blocks automatically (bug #250286), and users must handle them manually. They are hard instead of normal blocks because of some file moves. (bug #606730)
Thus, to upgrade texlive-basic, users must first unmerge it manually using the above procedure.
Some more details
Although some language packs have only 2012 versions (e.g. texlive-langcroatian-2012), even for them the above solution (re-emerging them afterwards) works, too. It's because blocking in an ebuild file is in fact one-sided, unlike normal dependency, which is checked at "emerge --depclean": Assume virtual/src-0.ebuild contains DEPEND="!!cat/dest", and cat/dest-0.ebuild has no dependency. Then:
- if you already have cat/dest, then "emerge virtual/src" will fail. However,
- even if you already have virtual/src, "emerge cat/dest" is allowed.
Hard blocking is specified in ebuilds by the operator !!. As of 2017, the only ebuilds using the !! operator (in our context) are texlive-basic, texlive-latex, and texlive-langcjk. Packages blocked by them are these three themselves plus texlive-lang*.
Most of the time users will implement TeX Live through the editor of choice. The following is a list of compilers capable of translating a .tex document into .pdf file:
There are several editors users can choose from in Gentoo. To list a few pure TeX editors:
|kile||app-editors/kile||https://kile.sourceforge.io/||A KDE based editor, which lets users write in LaTeX code and then compile the document.|
|texmaker||app-office/texmaker||http://www.xm1math.net/texmaker/||A Qt based editor, which lets user write in LaTeX code and then compile the document|
|texstudio||app-office/texstudio||http://texstudio.sourceforge.net/||Free cross-platform LaTeX editor (former texmakerX)|
|gummi||app-editors/gummi||https://github.com/alexandervdm/gummi||GTK based editor, which lets users write in LaTeX code and then compile the document|
|latexila||app-editors/latexila||https://wiki.gnome.org/Apps/LaTeXila||GNOME based editor, which lets users write in LaTeX code and then compile the document|
|lyx||app-office/lyx||https://www.lyx.org/||Qt based WYSIWYM editor, users type directly into the LaTeX document and can edit LaTeX code afterwards|
|texworks||app-editors/texworks||https://www.tug.org/texworks/||Qt based editor, suggested editor by the UK-TUG which lets users write in LaTeX code and then compile the document|
The above table is not a comprehensive list of TeX editors.
Programs with LaTeX support
- net-im/pidgin - has a LaTeX plugin to display mathematical formulae.
- app-misc/freemind - has a LaTeX plugin for inserting formulae in mind maps.
Find the Gentoo package that contains a tex package
app-portage/pfl contains a program to search in an online database for a Gentoo package containing a particular file.
emerge --ask app-portage/pfl
* dev-texlive/texlive-mathextra Available Versions: 2015 2014 Description: TeXLive Mathematics packages Matched Files: /usr/share/texmf-dist/tex/latex/yhmath/yhmath.sty; [I] dev-texlive/texlive-mathscience Available Versions: 2017 2016 Last Installed Ver: 2016 (Thu Jul 20 17:41:05 2017) Description: TeXLive Mathematics and science packages Matched Files: /usr/share/texmf-dist/tex/latex/yhmath/yhmath.sty;
Gentoo would automatically clean out any previous version during upgrade. In order to intentionally install several versions into different slots a script exists that enables easy switching:
emerge --ask app-eselect/eselect-pdftex
List available distributions with the following command:
eselect pdftex list
To set the distribution:
eselect pdftex set 1
Shows the original TeX documentation by keywords. For example everything about article:
This should open the default PDF viewer with the documentation.
In order to use the texdoc command, the
doc USE flag enabled for TeX Live and any other module which users would like documentation available.
To enable the
doc USE flag on any TeX Live module automatically, use a wildcard:
echo dev-texlive/* doc >> /etc/portage/package.use
A full list of installed TeX modules can be shown with the following command:
qlist -C -I texlive
To enable the
doc USE flag only for certain modules, add them to /etc/portage/package.use. A quick way of adding them all is by running this command:
qlist -C -I texlive | sed 's/$/ doc/' >> /etc/portage/package.use
Afterwards edit the USE flags for each module in /etc/portage/package.use individually
Increase main memory
The error message "TeX capacity exceeded, sorry main memory size = xxxxxxxxx" can be prevented by
1. Change the value of main_memory in file /etc/texmf/texmf.d/20sizes.cnf. This should persist through all future texliveupgrades.
2. Regenerate the system-wide texmf.cnf
3. Regenerate .fmt files