Skip to content

Instantly share code, notes, and snippets.

@Gitmoko
Created March 28, 2018 09:08
Show Gist options
  • Save Gitmoko/6158acbfd82b542737facae64f1b4c9c to your computer and use it in GitHub Desktop.
Save Gitmoko/6158acbfd82b542737facae64f1b4c9c to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
if ($^O eq 'MSWin32') {
$latex = 'uplatex %O -kanji=utf8 -no-guess-input-enc -synctex=1 %S';
$pdflatex = 'pdflatex %O -synctex=1 %S';
$lualatex = 'lualatex -cmdx %O -synctex=1 %S';
$xelatex = 'xelatex %O -synctex=1 %S';
$biber = 'biber %O --bblencoding=utf8 -u -U --output_safechars %B';
$bibtex = 'upbibtex %O %B';
$makeindex = 'upmendex %O -o %D %S';
$dvipdf = 'dvipdfmx %O -o %D %S';
$dvips = 'dvips %O -z -f %S | convbkmk -u > %D';
$ps2pdf = 'ps2pdf.exe %O %S %D';
$pdf_mode = 3;
if (-f 'C:/Program Files/SumatraPDF/SumatraPDF.exe') {
$pdf_previewer = '"C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance';
} elsif (-f 'C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe') {
$pdf_previewer = '"C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe" -reuse-instance';
} else {
$pdf_previewer = 'texworks';
}
} else {
$latex = 'uplatex %O -synctex=1 %S';
$pdflatex = 'pdflatex %O -synctex=1 %S';
$lualatex = 'lualatex %O -synctex=1 %S';
$xelatex = 'xelatex %O -synctex=1 %S';
$biber = 'biber %O --bblencoding=utf8 -u -U --output_safechars %B';
$bibtex = 'upbibtex %O %B';
$makeindex = 'upmendex %O -o %D %S';
$dvipdf = 'dvipdfmx %O -o %D %S';
$dvips = 'dvips %O -z -f %S | convbkmk -u > %D';
$ps2pdf = 'ps2pdf %O %S %D';
$pdf_mode = 3;
if ($^O eq 'darwin') {
$pvc_view_file_via_temporary = 0;
$pdf_previewer = 'open -ga /Applications/Skim.app';
} else {
$pdf_previewer = 'xdg-open';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment