Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latexmk #1443

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Latexmk #1443

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .config/latexmk/latexmkrc
Original file line number Diff line number Diff line change
@@ -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') ;
2 changes: 1 addition & 1 deletion .config/nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ colorscheme vim
map <leader>p :!opout "%:p"<CR>

" 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:
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
Expand Down
14 changes: 1 addition & 13 deletions .local/bin/compiler
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
# Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent
# 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}"
ext="${file##*.}"
dir=${file%/*}
Expand Down Expand Up @@ -38,15 +35,6 @@ case "${ext}" in
sass) sassc -a "${file}" "${base}.css" ;;
scad) openscad -o "${base}.stl" "${file}" ;;
sent) setsid -f sent "${file}" 2> "/dev/null" ;;
tex)
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%.*}"
;;
tex) latexmk ;;
*) sed -n '/^#!/s/^#!//p; q' "${file}" | xargs -r -I % "${file}" ;;
esac