1

I am new to Latex and wanted to get it working with Vim in Arch Linux. I tried using plugins but that didn't work. I am currently trying to script it myself my just having a script open Vim to the .tex file, run latexmk -pdf -pvc, and then opening Zathura and opening the output pdf. I have also installed a vim autosave plugin so that whenever I change a character Vim saves the document. (It only applies to .tex files.) This miraculously all works, but every time latexmk compiles, which is after every keystroke, it interrupts my typing with this text telling me its compiled.

HelloWorld.tex Latexmk: Run number 1 of rule 'pdflatex'
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Arch Linux) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
For rule 'update_view', running '&do_update_view( 1 1 0 1 )' ...
=== Watching for updated files. Use ctrl/C to stop ...

I would simply like to run latexmk in a silent mode of sorts so that it doesn't remind me. Just in case its necessary, here are the script files.

EDIT: I tried -quiet but it didnt seem to do anything.

This is called "parallel_commands.sh" and it's in the .vim folder. I use it to run vim and latexmk at the same time.

#!/bin/bash
for cmd in "$@"; do {
    echo "Process \"$cmd\" started";
    $cmd & pid=$!
    PID_LIST+=" $pid";
} done

trap "kill $PID_LIST" SIGINT
echo "Parallel processes have started";
wait $PID_LIST
echo
echo "All processes have completed";

This is called "runlatex.sh" and it is in the same folder. $1 is the directory and $2 is the .tex file.

cd $1
bash ~/.vim/parallel_commands.sh "vim $2" "latexmk -pdf -pvc -quiet"
KNOB Personal
  • 333
  • 4
  • 15

0 Answers0