Re: [LaTeX] How to tell the user that the document wasn't compiled with -shell-escape flag?

Liste des GroupesRevenir à ct tex 
Sujet : Re: [LaTeX] How to tell the user that the document wasn't compiled with -shell-escape flag?
De : ud.usenetcorrespondence (at) *nospam* web.de (Ulrich D i e z)
Groupes : comp.text.tex
Date : 22. Aug 2024, 16:24:21
Autres entêtes
Message-ID : <va7l76$1ic1p$1@solani.org>
References : 1
User-Agent : Mozilla/5.0 (X11; Linux i686 on x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0
Annada Behera schrieb:

Hi,
 
I am writing a LaTeX package and it invokes external Python code to do
some heavy preprocessing. I have not learned TeX programming language
enough yet to do everything in TeX. So, when the user of my package
doesn't invoke pdflatex with the -shell-escape flag, I would like print
a helpful error message telling them so.
 
Anybody has any idea how that can be done. Thank you.
 
    Annada

I recommend using the package shellesc (https://ctan.org/pkg/shellesc)
as it provides a unified shell escape interface which works out both
with traditional TeX engines where \write18 is available and with TeX
engines based on LuaTeX which don't have  \write18 and instead provide
the function os.execute .

With that package you can query the \write18-status via \ShellEscapeStatus.

The package manual plus implementation, where you can learn how
\ShellEscapeStatus is defined, is at
http://mirrors.ctan.org/macros/latex/required/tools/shellesc.pdf .

Sincerely

Ulrich

Date Sujet#  Auteur
22 Aug 24 * [LaTeX] How to tell the user that the document wasn't compiled with -shell-escape flag?5Annada Behera
22 Aug 24 +- Re: [LaTeX] How to tell the user that the document wasn't compiled with -shell-escape flag?1Ulrich D i e z
22 Aug 24 `* Re: [LaTeX] How to tell the user that the document wasn't compiled with -shell-escape flag?3Stefan Ram
23 Aug 24  +- Re: [LaTeX] How to tell the user that the document wasn't compiled with -shell-escape flag?1Ulrich D i e z
23 Aug 24  `- Re: [LaTeX] How to tell the user that the document wasn't compiled with -shell-escape flag?1Annada Behera

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal