-
Notifications
You must be signed in to change notification settings - Fork 14
LaTeX Installation
This is a place to assemble instructions for setting up LaTeX so that the book compiles to PDF.
It takes various steps to get this running properly.
XeTeX does not run with the default 256 MByte. Change it to 512 MByte.
After logging in (in text mode), switch language and keyboard to English: Type
export LANG=C
before running startx. From the Xfce menu select "Settings / Keyboard", switch to "Layout" tab, disable "Use system defaults" option, klick "Add", select "USA / International (AltGr dead keys)", then activate new "us" layout in list.
Open a terminal window and run the following commands:
sudo apt-get install texlive-xetex # for xelatex
sudo apt-get install texlive-latex-extra # for "soul" and other packages
TEXD=/usr/share/texmf-texlive/tex/latex
for PK in adjmulticol bytefield idxlayout; do
wget http://mirrors.ctan.org/macros/latex/contrib/$PK.zip
unzip $PK.zip; cd $PK
sudo latex $PK.ins
sudo mkdir $TEXD/$PK
sudo mv $PK.sty $TEXD/$PK/
cd ..
done
sudo texhash
- Create a folder fonts/ in tex-build/ and copy the ttf files from http://sourceforge.net/projects/linuxlibertine/files/linuxlibertine/5.3.0/LinLibertineTTF_5.3.0_2012_07_02.tgz/download into the fonts/ folder
- Search for the file Menlo.ttc (a ttf collection). On a Mac it can be found in /System/Library/Fonts/, but there are also download sources on the web. Move this to the fonts/ folder, too.
- remove "hidelinks" option from "\usepackage[...]{hyperref}" command (this hyperref version does not like it -- why?)
- replace the \usepackage{xltxtra} command with \newcommand\XeLaTeX{XE\LaTeX{}}
- disable the font setting commands \set...font by placing a "%" character at the heads of the following lines
Lines
\setmainfont ...
\setmathsfont ...
\setmonofont ...
\setsansfont ...
Only if you have installed the fonts in step 4, add the following lines:
\setmainfont[
Mapping=tex-text, ExternalLocation=./fonts/,
UprightFont = LinLibertine_Rah.ttf, BoldFont = LinLibertine_RBah.ttf,
ItalicFont = LinLibertine_RIah.ttf, BoldItalicFont = LinLibertine_RBIah.ttf,
]{LinLibertine}
\setmathsfont(Digits,Latin,Greek)[
Numbers={Lining,Proportional}, ExternalLocation=./fonts/,
UprightFont = LinLibertine_Rah.ttf, BoldFont = LinLibertine_RBah.ttf,
ItalicFont = LinLibertine_RIah.ttf, BoldItalicFont = LinLibertine_RBIah.ttf,
]{LinLibertine}
\setmonofont[FakeStretch=.9, Scale=MatchLowercase, ExternalLocation=./fonts/]{Menlo.ttc}
\setsansfont[
Mapping=tex-text, Scale=MatchLowercase, ExternalLocation = ./fonts/,
UprightFont = LinBiolinum_Rah.ttf, BoldFont = LinBiolinum_RBah.ttf,
ItalicFont = LinBiolinum_RIah.ttf, BoldItalicFont = LinBiolinum_RIah.ttf,
]{LinBiolinum}
Now typing "make" in the tex-build/ directory should create a PDF file. There are still some minor differences between the results and the published Ulix book PDF file, but I guess it is as good as it can get.
Assumption: LaTeX, including XeTeX, already installed
sudo zypper in texlive-blowup # contains "blowup" package
(work in progress, ignore this page for now...)