Docker image with full Tex Live installation.
Pull from here.
sudo docker run -v "/path/to/your/tex/project":'/home/texlive/doc' -it --rm sdavidhdez/texlive-full:latest sh -c "latexmk -xelatex"
In your ~/.bashrc or ~/.zshrc add the following function to compile with latexmk
and -xelatex
.
function lmk {
cd $1
cur_path=$(pwd -P)
shift
command="latexmk $@"
echo " - $cur_path"
echo " - $command"
sudo docker run -v "$cur_path":'/home/texlive/doc' -it --rm sdavidhdez/texlive-full:latest sh -c $command
}
Then you can execute with lmk <path> [latexmk options]
.
lmk path/to/your/tex/project -xelatex main.tex
Change the command if needed.
To highligth the output add ccze
in the command.
function lmk {
cd $1
cur_path=$(pwd -P)
shift
command="latexmk $@ | ccze -A"
echo " - $cur_path"
echo " - $command"
sudo docker run -v "$cur_path":'/home/texlive/doc' -it --rm sdavidhdez/texlive-full:latest sh -c $command
}
git clone https://github.com/sdhdez/docker-texlive-full.git
cd docker-texlive-full/docker
sudo docker build -t sdavidhdez/texlive-full:latest ./
Note: It could take several time and space.