为了在我的文档中添加 gnuplots,我使用这个基本代码来验证我的系统(Ubuntu 22.04.2 LTS + Kile 2.9.93)
\documentclass{standalone}
\usepackage{shellesc}
\begin{document}
\ifcase\ShellEscapeStatus
No shell escape\or
Unrestricted shell escape\or
Restricted shell escape%
\fi
\end{document}
它仍然打印我受限 shell 逃逸(尽管我正确配置了 Kile,并在 pdfLaTeX 构建选项卡上添加了“-shell-escape”属性。
在 Overleaf 上运行相同的代码(显然)会打印不受限制的 shell 逃逸。
我花了几个小时在网上希望找到解决方案,甚至尝试更改文件texmf.cnf
,该文件显然位于我的系统中/etc/texmf/web2c
,但它只包含:
%%% This file is automatically generated by update-texmf
%
% PLEASE DO NOT EDIT THIS FILE DIRECTLY. It is meant to be generated from
% files in /etc/texmf/texmf.d/.
% Therefore, if you want a smooth upgrade, please edit the files
% in /etc/texmf/texmf.d,
% or create an additional one (with the extension '.cnf'),
% and invoke update-texmf.
%
%%%
%%% From file: /etc/texmf/texmf.d/00debian.cnf
VARTEXFONTS=/tmp/texfonts
%%% End of file: /etc/texmf/texmf.d/00debian.cnf
日志文件显示以下内容:
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=pdflatex 2022.5.2) 10 MAY 2023 12:05
entering extended mode
\write18 enabled.
%&-line parsing enabled.
**shellescape.tex
(./shellescape.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-01-21>
(/usr/share/texlive/texmf-dist/tex/latex/standalone/standalone.cls
Document Class: standalone 2018/03/26 v1.3a Class to compile TeX sub-files stan
dalone
(/usr/share/texlive/texmf-dist/tex/latex/tools/shellesc.sty
Package: shellesc 2019/11/08 v1.0c unified shell escape interface for LaTeX
Package shellesc Info: Unrestricted shell escape enabled on input line 75.
)
(/usr/share/texlive/texmf-dist/tex/generic/iftex/ifluatex.sty
Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2020/03/06 v1.0d TeX engine tests
))
(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2020/11/20 v2.8 package option processing (HA)
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex
\XKV@toks=\toks16
\XKV@tempa@toks=\toks17
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex))
\XKV@depth=\count185
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
))
\sa@internal=\count186
\c@sapage=\count187
(/usr/share/texlive/texmf-dist/tex/latex/standalone/standalone.cfg
File: standalone.cfg 2018/03/26 v1.3a Default configuration file for 'standalon
e' class
)
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option)
)
\c@part=\count188
\c@section=\count189
\c@subsection=\count190
\c@subsubsection=\count191
\c@paragraph=\count192
\c@subparagraph=\count193
\c@figure=\count194
\c@table=\count195
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
\sa@box=\box50
)
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2022-01-12 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count196
\l__pdf_internal_box=\box51
)
(./shellescape.aux)
\openout1 = `shellescape.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
[1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
(./shellescape.aux) )
Here is how much of TeX's memory you used:
998 strings out of 478287
18798 string characters out of 5849290
305309 words of memory out of 5000000
19247 multiletter control sequences out of 15000+600000
469259 words of font info for 28 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
55i,5n,71p,213b,102s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts
/cm/cmr10.pfb>
Output written on shellescape.pdf (1 page, 13563 bytes).
PDF statistics:
13 PDF objects out of 1000 (max. 8388607)
7 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
请问有什么提示吗?