Latex autocompile

This commit is contained in:
Edgar P. Burkhart 2022-02-28 10:18:04 +01:00
parent 6802d9e8d9
commit 9061efe6c6
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 15 additions and 0 deletions

View file

@ -9,6 +9,7 @@ kitty = kitty.conf:~/.config/kitty/kitty.conf
#kitty-theme = kitty-theme.conf:~/.config/kitty/theme.conf #kitty-theme = kitty-theme.conf:~/.config/kitty/theme.conf
neovim = init.vim:~/.config/nvim/init.vim neovim = init.vim:~/.config/nvim/init.vim
git = gitconfig:~/.gitconfig git = gitconfig:~/.gitconfig
latex_autocompile = latex_autocompile.fish:~/.config/fish/functions/latex_autocompile.fish
[log] [log]
level = INFO level = INFO

View file

@ -0,0 +1,14 @@
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