bersama catatan peribadi & teknikalnya.

#Vimtex

Tentang LaTeX, Vimtex dan Zathura
Penerangan lebih terperinci mengenainya

PENGENALAN

Awalannya, saya fikirkan sudah begitu banyak penulisan berkenaan apa itu LaTeX boleh didapati melalui kajian dan carian di Internet, malahan buku yang menerangkan dengan begitu terperinci akan kegunaannya juga sudah sekian banyak dikeluarkan.

Tetapi kali ini saya fikir tidak mengapalah. Penulisan ini, jikalau saya menulis dengan lebih lanjut tentang ketiga-tiga perisian ini, sudah tentunya saya juga yang akan termanfaat daripadanya di masa akan datang. Selain saya boleh membuat rujukan kembali dengan membaca pos ini, saya juga boleh meneliti untuk menilai sejauh mana perkembangan saya dalam menulis hal-hal keilmuan seperti ini.

VimTeX and Zathura
Compiling and Viewing TeX Docs

Updated on 24 September 2020:-

Synctex-searches work just fine by installing zathura and all the dependencies from the Arch official repository (libmupdf can be skipped) as long as we set the vimtex-clientserver (please refer to the first related configuration file below) which is specifically for vimtex-synctex-inverse-search.

I use [1] vimtex, a vim plugin that provides support for writing and compiling LaTeX documents and [2] zathura as the document viewer.

In the beginning, I was determined to stick to [3] MuPDF as the PDF viewer due to its fast and complete features despite being small and lightweight but I kept encountering unpleasant experiences while compiling documents where it always froze the screen of my laptop when I closed the viewer.

.latexmkrc
~/.latexmkrc

$print_type = 'pdf';
$pdf_mode = 1;
$bibtex_use = 2;
push @generated_exts, "cb";
push @generated_exts, "cb2";
push @generated_exts, "spl";
push @generated_exts, "nav";
push @generated_exts, "snm";
push @generated_exts, "tdo";
push @generated_exts, "nmo";
push @generated_exts, "brf";
push @generated_exts, "nlg";
push @generated_exts, "nlo";
push @generated_exts, "nls";
push @generated_exts, "synctex.gz";
push @generated_exts, "tex.latexmain";
push @generated_exts, "run.xml";
$latex = 'latex --src-specials %O %S';
#$pdflatex = 'pdflatex -file-line-error -synctex=1 -interaction=nonstopmode -shell-escape %O %S';
$pdflatex = 'xelatex -file-line-error -synctex=1 -interaction=nonstopmode -shell-escape %S %O -verbose';

# If zero, check for a previously running previewer on the same file and update it.  If nonzero, always start a new previewer.
$new_viewer_always = 0;

# How to make the PDF viewer update its display when the PDF file changes.  See the man page for a description of each method.
$pdf_update_method = 2;

# When PDF update method 2 is used, the number of the Unix signal to send
$pdf_update_signal = 'SIGHUP';

add_cus_dep('nlo', 'nls', 0, 'nlo2nls');
sub nlo2nls {
  system("makeindex $_[0].nlo -s nomencl.ist -o $_[0].nls -t $_[0].nlg" );
}

# vim: ft=perl

Top