15 lines
291 B
Fish
15 lines
291 B
Fish
|
function latex_autocompile
|
||
|
if ! test -d $TEX_OUT
|
||
|
set -U TEX_OUT (mktemp -d);
|
||
|
end
|
||
|
|
||
|
mkdir $TEX_OUT/(find . -type d);
|
||
|
|
||
|
latexmk -xelatex -outdir=$TEX_OUT main.tex;
|
||
|
evince $TEX_OUT/main.pdf &;
|
||
|
while true
|
||
|
inotifywait -e MODIFY **;
|
||
|
latexmk -xelatex -outdir=$TEX_OUT main.tex;
|
||
|
end
|
||
|
end
|