mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2025-10-07 07:22:36 +02:00
Merge branch 'feat/latexmk' of github.com:aartoni/dotfiles into aartoni-feat/latexmk
This commit is contained in:
commit
2ca3f80dd3
10
.config/latexmk/latexmkrc
Normal file
10
.config/latexmk/latexmkrc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
$bibtex_use = 1.5;
|
||||||
|
$cleanup_includes_cusdep_generated = 1;
|
||||||
|
$cleanup_includes_generated = 1;
|
||||||
|
$out_dir = "out";
|
||||||
|
$pdf_mode = 5;
|
||||||
|
$silent = 1;
|
||||||
|
|
||||||
|
# SyncTeX
|
||||||
|
push(@generated_exts, ("synctex.*"));
|
||||||
|
push(@extra_xelatex_options, '-synctex=1') ;
|
||||||
@ -91,7 +91,7 @@ colorscheme vim
|
|||||||
map <leader>p :!opout "%:p"<CR>
|
map <leader>p :!opout "%:p"<CR>
|
||||||
|
|
||||||
" Runs a script that cleans out tex build files whenever I close out of a .tex file.
|
" Runs a script that cleans out tex build files whenever I close out of a .tex file.
|
||||||
autocmd VimLeave *.tex !texclear %
|
autocmd VimLeave *.tex !latexmk -c %
|
||||||
|
|
||||||
" Ensure files are read as what I want:
|
" Ensure files are read as what I want:
|
||||||
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
|
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
|
||||||
|
|||||||
@ -6,9 +6,6 @@
|
|||||||
# Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent
|
# Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent
|
||||||
# presentations. Runs scripts based on extension or shebang.
|
# presentations. Runs scripts based on extension or shebang.
|
||||||
|
|
||||||
# Note that .tex files which you wish to compile with XeLaTeX should have the
|
|
||||||
# string "xelatex" somewhere in a comment/command in the first 5 lines.
|
|
||||||
|
|
||||||
file="${1}"
|
file="${1}"
|
||||||
ext="${file##*.}"
|
ext="${file##*.}"
|
||||||
dir=${file%/*}
|
dir=${file%/*}
|
||||||
@ -40,15 +37,6 @@ case "${ext}" in
|
|||||||
sass) sassc -a "${file}" "${base}.css" ;;
|
sass) sassc -a "${file}" "${base}.css" ;;
|
||||||
scad) openscad -o "${base}.stl" "${file}" ;;
|
scad) openscad -o "${base}.stl" "${file}" ;;
|
||||||
sent) setsid -f sent "${file}" 2> "/dev/null" ;;
|
sent) setsid -f sent "${file}" 2> "/dev/null" ;;
|
||||||
tex)
|
tex) latexmk ;;
|
||||||
textarget="$(getcomproot "${file}" || echo "${file}")"
|
|
||||||
command="pdflatex"
|
|
||||||
head -n5 "${textarget}" | grep -qi "xelatex" && command="xelatex"
|
|
||||||
${command} --output-directory="${textarget%/*}" "${textarget%.*}" &&
|
|
||||||
grep -qi addbibresource "${textarget}" &&
|
|
||||||
biber --input-directory "${textarget%/*}" "${textarget%.*}" &&
|
|
||||||
${command} --output-directory="${textarget%/*}" "${textarget%.*}" &&
|
|
||||||
${command} --output-directory="${textarget%/*}" "${textarget%.*}"
|
|
||||||
;;
|
|
||||||
*) sed -n '/^#!/s/^#!//p; q' "${file}" | xargs -r -I % "${file}" ;;
|
*) sed -n '/^#!/s/^#!//p; q' "${file}" | xargs -r -I % "${file}" ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user