a-shell icon indicating copy to clipboard operation
a-shell copied to clipboard

Perl script "latexmk" hangs in the middle

Open chchen2021 opened this issue 2 years ago • 12 comments

The pdflatex engine included with a-Shell works amazingly well – much faster and more reliable than other iOS apps that I have tested. However, the standard package is missing some niceties associated with the full TexLive package. Is there any plan to support texlive-full down the road?

I also have a specific question about latexmk, which is a Perl script widely used by latex applications. Basically, latexmk helps to decide if the bibliography is up to date after a pdflatex run. If not, latexmk will invoke successive runs of bibtex and pdflatex until the bibliography is fully updated.

I tried to port latexmk into a-Shell, but the system always hangs up in the middle. Here are the steps:

  1. Download the "latexmk.pl" script from ctan.
  2. Remove the file extension to make an executable, per the instruction from ctan.
  3. Move the executable into ~/Documents/bin, the same location where ffmpeg resides.
  4. Run "latexmk -pdf doc.tex". The "-pdf" option will invoke pdflatex.

After these steps, a-Shell always hung up at the end of "Run number 1", the very first pass through pdflatex. Even if I force quitted by control+D, the system seemed to be in a very confused state: Further commands were not executed and "exit" could not always quit a-Shell ("exit" typically leads to a clean quit on the iPad). Note that I tested the same executable on a Mac and it was working fine.

The latexmk script was obviously able to find the perl interpreter. In any case, the results were the same with different shebangs. So what is causing the hangup? Why is a-Shell different from Mac Terminal?

chchen2021 avatar Jul 16 '21 05:07 chchen2021