LaTeX in Alpine Linux


My first moves with LaTeX in Linux.

A few notes, future me!

With Alpine Linux in Docker:

docker run --rm -itv "$PWD:/mnt" alpine:3.16

Let’s get started: I need to use a specific TrueType font, so it seems that xelatex is needed. I hope to find out what this is at some time!

apk update
apk add texlive-xetex

Installing the font(s) means copying the files in a specific directory and indexing them. We’ll do a test using LeagueSpartan, an open font:

mkdir -p /usr/local/share/fonts
cp LeagueSpartan-2.220/static/TTF/* /usr/local/share/fonts/
fc-cache -fv

I’ll also need to place some pieces of text in specific positions using package textpos:

cd /mnt
cd textpos
tex textpos.ins
cp textpos.sty ..
cd ..

At this point we can run an example, adapted from here:

    % General document formatting

    % Related to math




Name, date, Exercise X

\section*{Part a}

Put your answer to part a here

\section*{Part b}


\begin{textblock*}{10cm}(15cm,16cm) % {block width} (coords) 
   Your text here



xelatex example.tex

and enjoy the generated PDF file.

Hope this helps!

Comments? Octodon, , GitHub, Reddit, or drop me a line!