Skip to content
Hans-Georg Eßer edited this page Jan 5, 2016 · 10 revisions

This is a place to assemble instructions for setting up LaTeX so that the book compiles to PDF.

Development VM

It takes various steps to get this running properly.

1. Modify virtual machine settings

XeTeX does not run with the default 256 MByte. Change it to 512 MByte.

2. Change language and keyboard (optional)

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.

3. Install missing packages:

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

4. Install fonts (LinuxLibertine, LinuxBiolinum, Menlo)

5. Modify ulix-book.nw:

  • 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}

6. Try making

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.

OpenSuse 13.2

Assumption: LaTeX, including XeTeX, already installed

sudo zypper in texlive-blowup   # contains "blowup" package

(work in progress, ignore this page for now...)