Skip to main content

Questions tagged [shell-escape]

{shell-escape} is about the “--shell-escape” argument, i.e. to enable external running of commands from inside the ‘.tex’ file.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Use of the package 'bodeplot' giving warnings and doesn't produce the plot

I am just a beginner and am writing my first report in LaTeX, so excuse me if the solution is very obvious. I am trying to plot asymptotic approximation of bode plots using the package bodeplot as ...
caramalizedTomato's user avatar
6 votes
1 answer
208 views

pdflatex, include eps file, run with -no-shell-escape => no error/warning/message but broken output

When running pdflatex -no-shell-escape on a file that includes an eps file, the automatic conversion to pdf will not be executed and the images not included. I am surprised that in this case: there ...
norbert's user avatar
  • 8,347
0 votes
1 answer
38 views

Why can't tikzexternalize write to a directory above

I use the command \tikzexternalize[prefix=../figures-tikz/] and I got the error message ! I can't write on file `../figures-tikz/BQ-m-meca_0.md5'. If on the other hand I write the command \...
rpapa's user avatar
  • 12.4k
0 votes
0 answers
29 views

Using `--cnf-line` to add `pygmentize` to `shell_escape_commands` ad hoc

I noticed the command-line flag --cnf-line, which can be used for lualatex (and related commands) and is described in its help page (lualatex --help) as follows (formatted for clarity): --cnf-line=...
steve's user avatar
  • 2,256
1 vote
0 answers
56 views

How to get Anki working with TikZ-based packages in 2024?

I want to learn the LaTeX language to study chemistry with chemfig package and make Anki flashcards. The problem is that I am unable to make it work with Anki (normal LaTeX works fine) I tried these ...
Fancôme's user avatar
0 votes
0 answers
22 views

Automatically running nomenclature makeindex (on mac)

When I update the nomenclatures in my beamer presentation (file.tex) using texstudio on my mac, I run on the terminal command line: makeindex file.nlo -s nomencl.ist -o file.nls This works, but is a ...
rhz's user avatar
  • 225
0 votes
0 answers
37 views

Link on pdf triggers .sh/.py/.bat

I have been looking for a while for a solution in LaTex. My intention is to create a link inside a PDF generated with LaTex that triggers a .sh/.py/.bat by clicking in the link. Not like \write18, ...
picgon's user avatar
  • 1
4 votes
1 answer
79 views

LuaLatex and intersection segments: Error only with Lua

I need to use LuaLatex with my document and somehow run into an error while compiling a plot. I reduced my document to the following MWE: \documentclass{scrartcl} \usepackage{shellesc} \usepackage{...
AcademicCoder's user avatar
1 vote
2 answers
86 views

How to create indexes using the songs package in overleaf

I'm creating a songbook using the songspackage. I'm very new to LaTex and opted to use overleaf which has worked good, the only problem I really have is with the index. I'm using an older base ...
Benja S's user avatar
  • 13
1 vote
1 answer
66 views

Why "shellesc" conflicts with "tabularx" and how to fix?

This is the code that works just fine: \documentclass{article} \usepackage{shellesc} \begin{document} \begin{tabular}{lr} hello! & \ShellEscape{/bin/echo 'hello!' > a.tex} \...
yegor256's user avatar
  • 12.2k
1 vote
1 answer
58 views

Print output of `\write18` in the log file

When running commands like: \immediate\write18{ls} in the command line, I can see the output in the command line directly in the terminal, which is practical for instance to get error messages. ...
tobiasBora's user avatar
  • 8,964
0 votes
0 answers
149 views

.eps files not working with pdfLaTeX

As the title suggests, I'm trying to use .eps files for my figures but pdfLaTeX can't seem to find the converted PDFs. Package pdftex.def: File `Figures/fragment 1ab-eps-converted-to.pdf' not found: ...
m0n74g3's user avatar
  • 77
2 votes
1 answer
207 views

Markdown package not working despite `--shell-escape` enabled

I am trying to use this markdown package. I tried to compile the document \documentclass{article} \usepackage{markdown} \begin{document} \begin{markdown} _Hello,_ [Stack Exchange](http://...
Bubaya's user avatar
  • 2,549
5 votes
1 answer
405 views

How to change the shell used by \write18?

I'm on macOS (the same happens on Ubuntu). Here is my default/current shell: $ ps -p $$ PID TTY TIME CMD 5835 ttys002 0:00.13 -bash Then, here is my document foo.tex: \documentclass{...
yegor256's user avatar
  • 12.2k
1 vote
1 answer
82 views

How to restore Texstudio to the configuration before using "latex --shell-escape"

today I implemented (with my Macbook) the answer from: Export eps figures from TikZ, where I ran the CLI command: latex --shell-escape Up until then I used Texstudio without issues. After that, ...
Ignasi Piqué Muntané's user avatar
2 votes
1 answer
290 views

How to run `--shell-escape` for LuaLaTeX in Texshop

Is there a way to run the --shell-escape command for the LuaLaTex engine in Texshop? I know there are editable TEX and Latex commands in the Texshop settings under Engine->pdfTeX settings, but I do ...
Qohelet's user avatar
  • 119
0 votes
0 answers
127 views

Python from LaTeX: Strange Networkx/Graphviz error

It is hard to give a minimal example, because Python3 with some packages is needed. I want to call Python from LaTeX, here is an example how I want to do it (--shell-escape is needed): \documentclass[]...
Titanlord's user avatar
  • 541
2 votes
1 answer
58 views

How to insert a eps file

I have a .EPs file I need to include in my latex document. A previous answer suggested epstopdf. Also how can I incorporate shell-escapae into my preamble.
Megamind's user avatar
3 votes
0 answers
151 views

svg can't call Inkscape from LuaLaTeX

The following MWE fails with LuaLaTeX but runs fine with pdfLaTeX on an up to date MiKTeX installation. Both cases work on a different machine with a TeX Live installation. Any idea what the problem ...
schtandard's user avatar
  • 15.4k
1 vote
1 answer
50 views

Piping shell command output to another command

I'm trying to write a command that wraps \href with a QR code to the given URL. For this I need to generate a temp file and reuse it later, so I wrote a \mktemp command that wraps the mktemp utility: %...
user84207's user avatar
  • 145
0 votes
1 answer
151 views

Using a batch script in latex \immediate\write18 env [closed]

I am trying to write a script that using texcount will output only the number of characters including spaces. I made a batch script which works, no problems there. The problem is trying to run it in ...
mriisa's user avatar
  • 540
0 votes
2 answers
64 views

Ouptut the current time using `datetime` to a file

How do I print the current time to a file using the datetime pacakge. While running pdflatex I am generating a foo.def in which I would like to add a comment at the top with the current date time in ...
Peter Grill's user avatar
0 votes
0 answers
177 views

Still getting a "Restricted shell escape" on Kile

In order to add gnuplots in my documents, I'm using this basic code to verify my system (Ubuntu 22.04.2 LTS + Kile 2.9.93) \documentclass{standalone} \usepackage{shellesc} \begin{document} \...
JJ Henry's user avatar
  • 473
0 votes
1 answer
74 views

Post build processes with shell script and write18

I would like to start a shell script from LaTeX. In the shell script I need to wait until the .pdf file is generated and afterwards I want to do some stuff with this file. So I created a MWE Test.tex ...
PascalS's user avatar
  • 750
1 vote
1 answer
97 views

Package PAGELAYOUT, 'cannot access shell'

While running the package-supplied *.tex samples for pagelayout.cls, I am getting error messages. That alone is odd, because I would expect those examples to be rock-solid. The errors claim that the ...
Birdman's user avatar
  • 145
0 votes
0 answers
216 views

Issue with Loading Packages into MikTeX using a .tex file

I have uninstalled and reinstalled MikTeX along with all updates. I have loaded all packages because I have still gotten the same error after trying to load .tex file someone more experienced with ...
Jonathan Thomas's user avatar
2 votes
1 answer
308 views

\ShellEscape fails in certain cases with lualatex

This question stems from my question here about minted and lualatex, with similar issues reported by another user here. I think I've isolated the issue to the following. minted relies on \ShellEscape ...
mbert's user avatar
  • 4,541
0 votes
0 answers
230 views

LuaLaTeX issue using minted (continued from ...)

In issue with minted and LuaLaTeX there is a discussion in the comments underneath the question and an answer confirming the issue. Since I can confirm the issue as well and have additional ...
alchemist's user avatar
  • 1,846
3 votes
1 answer
132 views

\sys_get_shell:nnN seems to strip newlines from shell output

Goal: run a shell command and \input its output as LaTeX code. See related: How to protect \input shell command args with backslashes When using expl3's \sys_get_shell:nnN, newlines from the shell ...
David Fink's user avatar
0 votes
1 answer
95 views

Consuming variable's value (produced from shell call) as `\input`

Note: \input is not expandable: Why is \input not expandable? However, \@@input is. The goal is to \@@input some text produced from a shell call, obtained via \sys_get_shell:nnN (for how, see egreg's ...
David Fink's user avatar
0 votes
1 answer
413 views

TeXstudio does not find shell command with LuaLaTeX

I am relying on shell commands to include git information in my documents. This was working fine, but stopped recently. I am yet unable to figure out why. Check the following MWE. Of course this would ...
Gunter's user avatar
  • 443
1 vote
2 answers
115 views

How to write the string "^^^^" into a file

I am trying to write "^^^" into an already opened file (under the variable \myfile) using the command \immediate\write\myfile{"^^^"} This, however results in an error. I am ...
Murali Agastya's user avatar
2 votes
1 answer
820 views

issue with minted and LuaLaTeX

The following document test.tex compiles with both pdflatex --shell-escape test.tex and xelatex --shell-escape test.tex, but not lualatex --shell-escape test.tex (from a fully updated MikTeX ...
mbert's user avatar
  • 4,541
0 votes
1 answer
70 views

How to redefine the behavior of dollar and then use dollar for \write18?

I did what was suggested here (I just want to use $...$ instead of \texttt{...}, for the sake of experiment): \documentclass{article} \catcode`\$=\active \gdef$#1${\texttt{#1}} \begin{document} Hello, ...
yegor256's user avatar
  • 12.2k
0 votes
0 answers
62 views

Call metapost with command line arguments through shell-escape; then include the resulting graphics

I would like to use metapost to draw long curved lines and overset the resulting images over long subformulas instead of relatively short widetilde. Would be great if I can choose not from the set of ...
Vadim Radionov's user avatar
1 vote
1 answer
31 views

What happens with ECHO via \write18?

This is my code: \documentclass{article} \begin{document} \immediate\write18{echo '\detokenize{\hi \foo \hi}' > x.txt} \end{document} The content of x.txt contains: \hi oo \hi What happened ...
yegor256's user avatar
  • 12.2k
0 votes
0 answers
225 views

Is there a secure way to use --shell-escape with untrusted content?

I'm planning to create a service that would allow users to render LaTeX documents online with TeX Live running on the server, and I would like to enable certain features (such as gnuplot) that require ...
ttsc's user avatar
  • 415
2 votes
1 answer
208 views

How to escape percent sign in shell command

I am working on a macro which will build revision history table in my document using Git tags. Each published version of my document has a tag with short description. I want to use them to ...
MaciekS's user avatar
  • 277
2 votes
1 answer
548 views

When to use `--no-shell-escape`?

I saw an introduction of -shell-escape here: https://tex.stackexchange.com/a/598819/180617 I know that if I want to use a package like minted or tkz-fct, I have to use pdflatex --shell-escape main to ...
Syvshc's user avatar
  • 1,348
2 votes
1 answer
473 views

Stop at error + Meaningfull errors with shell-escape and Tikz externalize

I've been trying to use shell escape and tikz externalize (see for instance here), but I have two issues: when the tikz picture fails with some errors, the compilation does not stops if it compiled ...
tobiasBora's user avatar
  • 8,964
0 votes
0 answers
891 views

restricted\write18 enabled, on MacOS, when I try to compile to a PDF on TeXMaker and TeXshop

How to solve this error message: restricted\write18 enabled, on MacOS, when I try to compile to a PDF on TeXMaker and TeXshop.
user262462's user avatar
3 votes
1 answer
154 views

Use \immediate\write18 with Single Quote

I would like to use \immediate\write18 (encoded in the \OuputToFileA macro) to output a string containing a single quote. If I replace the single quote with another character, such as X \StrSubstitute{...
Peter Grill's user avatar
1 vote
1 answer
47 views

Using \immediate\write18 when lineno package yields spurious text

I am getting spurious text in the output of \immediate\write18 when the lineno package is used. The MWE below yields the following in the file foo.tex: If one comments out the line that includes ...
Peter Grill's user avatar
0 votes
1 answer
625 views

TikZ externalize while using -output-directory

I'm using tikzexternalize to speed things up and to have a clean working directory, And I'm using -output-directory on compilation to have a clean working directory (actually I use cluttex, but I've ...
atticus's user avatar
  • 587
2 votes
1 answer
124 views

Problem tikzexternalize with \def

I am trying to save some plots as individual PDFs, but I want to decide which ones to save with a condition. mwe.tex: \documentclass[11pt]{article} \...
Daniel Duque's user avatar
1 vote
1 answer
100 views

Can I enable FFI by default without shell-escape?

The FFI library included in luatex could be dangerous so it is disabled by default (at least in TeXLive). In order to access the library, one has to invoke luatex with the --shell-escape option. Is ...
cjorssen's user avatar
  • 10.1k
7 votes
1 answer
266 views

Inconsistent behaviour of \detokenize on macro beginning with "e" or "f"

I need to write to a file the unexpanded LaTeX. The macro \OuputToFile is bascially an \immediate\write18 and works fine with the following: \OuputToFile{\detokenize{$\OuterMacro{\cXXX{X}}$}}% \...
Peter Grill's user avatar
1 vote
1 answer
1k views

pdflatex doesn't allow me to enable system calls from another directory

I am trying to save the plots in my file into separate PDFs. My file is called my_file.tex located in /full/path/to/my/file This is my_file.tex: \documentclass[11pt]{article} ...
Daniel Duque's user avatar
1 vote
2 answers
158 views

\verbatiminput shell command Minted equivalent

\verbatiminput{|"echo foo"} produces foo, wrapped in verbatim. Is it possible to do the same with Minted’s syntax highlighting? I have tried \begin{minted}[escapeinside=!]{text} !\...
LeopardShark's user avatar
0 votes
1 answer
119 views

How to prevent script (via \immediate\write18) from running multiple times?

How to prevent the execution of script (via \immediate\write18) multiple times when running latexmk (which calls pdftex multiple times)? The problem is that during each iteration of pdftex, the script ...
Pedro's user avatar
  • 373

1
2 3 4 5
7