Latex autocompile
This commit is contained in:
parent
6802d9e8d9
commit
9061efe6c6
2 changed files with 15 additions and 0 deletions
|
@ -9,6 +9,7 @@ kitty = kitty.conf:~/.config/kitty/kitty.conf
|
|||
#kitty-theme = kitty-theme.conf:~/.config/kitty/theme.conf
|
||||
neovim = init.vim:~/.config/nvim/init.vim
|
||||
git = gitconfig:~/.gitconfig
|
||||
latex_autocompile = latex_autocompile.fish:~/.config/fish/functions/latex_autocompile.fish
|
||||
|
||||
[log]
|
||||
level = INFO
|
||||
|
|
14
config/latex_autocompile.fish
Normal file
14
config/latex_autocompile.fish
Normal 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
|
Reference in a new issue