feat: support svg package — install Inkscape and enable shell-escape
Build and Deploy Verso / deploy (push) Has been cancelled
Build and Deploy Verso / deploy (push) Has been cancelled
The LaTeX svg package converts .svg files to PDF at compile time by shelling out to Inkscape (requires --shell-escape). Without Inkscape in the image and the flag enabled, compilation fails with "Did you run the export with Inkscape?". - Dockerfile-base: add inkscape to the apt install block - settings.js: expose OVERLEAF_LATEX_SHELL_ESCAPE env var → clsi.latexShellEscape - LatexRunner.js: pass -shell-escape to latexmk when the setting is on - deploy-verso-prod.yml: set OVERLEAF_LATEX_SHELL_ESCAPE=true (trusted-user instance) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -329,6 +329,8 @@ jobs:
|
||||
# (CE default): admin creates accounts / sends invites.
|
||||
- name: OVERLEAF_ENABLE_PROJECT_PYTHON_VENV
|
||||
value: "true"
|
||||
- name: OVERLEAF_LATEX_SHELL_ESCAPE
|
||||
value: "true"
|
||||
# (SMTP email vars are loaded below via envFrom.)
|
||||
# SMTP for password-reset / invite emails. All
|
||||
# OVERLEAF_EMAIL_* vars come from the optional 'verso-smtp'
|
||||
|
||||
@@ -25,6 +25,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
unattended-upgrades \
|
||||
build-essential wget net-tools unzip time poppler-utils optipng strace nginx git python3 python-is-python3 zlib1g-dev libpcre3-dev gettext-base libwww-perl ca-certificates curl gnupg \
|
||||
qpdf \
|
||||
inkscape \
|
||||
# upgrade base-image, batch all the upgrades together, rather than installing them on-by-one (which is slow!)
|
||||
&& unattended-upgrade --verbose --no-minimal-upgrade-steps \
|
||||
# install Node.js https://github.com/nodesource/distributions#nodejs
|
||||
|
||||
@@ -50,6 +50,7 @@ const TMP_DIR = '/var/lib/overleaf/tmp'
|
||||
const settings = {
|
||||
clsi: {
|
||||
optimiseInDocker: process.env.OPTIMISE_PDF === 'true',
|
||||
latexShellEscape: process.env.OVERLEAF_LATEX_SHELL_ESCAPE === 'true',
|
||||
},
|
||||
|
||||
brandPrefix: '',
|
||||
|
||||
@@ -197,6 +197,10 @@ function _buildLatexCommand(mainFile, opts = {}) {
|
||||
command.push(...opts.flags)
|
||||
}
|
||||
|
||||
if (Settings.clsi?.latexShellEscape) {
|
||||
command.push('-shell-escape')
|
||||
}
|
||||
|
||||
// TeX Engine selection. A .tex project may carry a non-LaTeX compiler value
|
||||
// (e.g. 'quarto', the fork-wide default for Project.compiler) because the
|
||||
// runner is chosen by file extension, not by this setting. In that case fall
|
||||
|
||||
Reference in New Issue
Block a user