Skip to content

feat: add --[no-]shell-escape flag#153

Draft
dmke wants to merge 1 commit intomasterfrom
feat/shell-escape
Draft

feat: add --[no-]shell-escape flag#153
dmke wants to merge 1 commit intomasterfrom
feat/shell-escape

Conversation

@dmke
Copy link
Member

@dmke dmke commented Nov 5, 2024

This allows or prohibits shell command execution from within TeX files.

  • Verify whether latexmk -showextraoptions mentions direct support for passing either flag.

    latexmk(1) does not, but has examples passing it via the -pdf{lua,xe,}latex="COMMAND" options. This would complicate the construction of the latexmk command.

Fixes: #152

@dmke dmke force-pushed the feat/shell-escape branch from d9e5b50 to 0f32231 Compare November 5, 2024 21:45
@codecov
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

❌ Patch coverage is 58.06452% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.97%. Comparing base (f61cb3b) to head (cfb6180).

Files with missing lines Patch % Lines
cmd/texd/main.go 0.00% 10 Missing ⚠️
tex/engine.go 85.71% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #153      +/-   ##
==========================================
- Coverage   70.20%   69.97%   -0.23%     
==========================================
  Files          34       34              
  Lines        1537     1562      +25     
==========================================
+ Hits         1079     1093      +14     
- Misses        396      407      +11     
  Partials       62       62              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dmke dmke force-pushed the feat/shell-escape branch from 0f32231 to 3c8d02f Compare November 8, 2024 18:47
@dmke dmke force-pushed the feat/shell-escape branch from 3c8d02f to 998ab89 Compare November 8, 2024 19:09
@dmke dmke force-pushed the feat/shell-escape branch 5 times, most recently from d11b2c0 to 5bdbbbb Compare November 26, 2024 18:34
This allows or prohibits shell command execution from within TeX files.

The use case here is to allow users to download images from within the
build process, e.g. compiling something like this with `lualatex`:

    \documentclass{article}
    \usepackage{luacode}
    \usepackage{graphicx}

    \begin{document}
    \begin{luacode*}
      os.execute("curl -o apod.jpg https://apod.nasa.gov/apod/")
    \end{luacode*}
    \includegraphics{apod.jpeg}
    \end{document}

To this end, I've included `curl` into the base image.

Fixes: #152
@dmke dmke force-pushed the feat/shell-escape branch from 5bdbbbb to cfb6180 Compare January 12, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow --shell-escape equivalent

1 participant