Skip to content

Commit

Permalink
Merge pull request #39 from latex3/no-shell-escape
Browse files Browse the repository at this point in the history
always load epsftopdf-base for issue #38
  • Loading branch information
davidcarlisle authored Apr 16, 2024
2 parents 082eb8c + 5a5f918 commit 1362826
Show file tree
Hide file tree
Showing 24 changed files with 476 additions and 266 deletions.
7 changes: 7 additions & 0 deletions .github/tl_packages
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ kvsetkeys
ltxcmds
pdftexcmds
mwe
#
# for tests with plain tex
graphics-pln
eplain
mptopdf
amsfonts

5 changes: 3 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
# Boilerplate
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
# GitHub Actions don't regenerate the test if the key doesn't change, so
# we integrate a random UUID into the key to keep them different.
# DO NOT CHANGE THIS
Expand All @@ -36,7 +36,8 @@ jobs:
key: texlive-v0-${{ steps.get-id.outputs.id }}
restore-keys: texlive-v0-
- name: Install TeX Live
uses: zauguin/install-texlive@v1
id: texlive
uses: zauguin/install-texlive@v3
with:
# List the required TeX Live packages in a separate file to allow reuse in
# different workflows.
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
# Boilerplate
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
# GitHub Actions don't regenerate the test if the key doesn't change, so
# we integrate a random UUID into the key to keep them different.
# DO NOT CHANGE THIS
Expand All @@ -34,7 +34,8 @@ jobs:
key: texlive-v0-${{ steps.get-id.outputs.id }}
restore-keys: texlive-v0-
- name: Install TeX Live
uses: zauguin/install-texlive@v1
id: texlive
uses: zauguin/install-texlive@v3
with:
# List the required TeX Live packages in a separate file to allow reuse in
# different workflows.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
LaTeX support for color and graphics
====================================

Release 2022-09-22
Release 2024-04-13

This bundle contains the 'engine-dependent' part of support for
color and graphics in LaTeX2e (the code here will also function
Expand Down
15 changes: 8 additions & 7 deletions luatex.def
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
%% Hans Hagen, Heiko Oberdiek and
%% Martin Schr\"oder
%% Copyright (C) 2016-2018 LaTeX3 project and Heiko Oberdiek
%% Copyright (C) 2018-2022 LaTeX3 project
%% Copyright (C) 2018-2024 LaTeX3 project
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
Expand Down Expand Up @@ -651,16 +651,19 @@
}
% Load package epstopdf if
% a) LaTeX is running (plain TeX users are on their own),
% b) and shell escape is enabled (possibly restricted),
% c) and \DoNotLoadEpstopdf either does not exist or is not \relax,
% d) and neither pst-pdf nor pdftricks is loaded (by \begin{document}).
% b) and \DoNotLoadEpstopdf either does not exist or is not \relax,
% c) and neither pst-pdf nor pdftricks is loaded (by \begin{document}).
%
% In other words, by default .eps files will be automatically
% converted to .pdf files when outputting pdf. This can be wrong!
% If the .pdf is the source, rather than the .eps, you should put
% \newcommand{\DoNotLoadEpstopdf}{}
% before even the \documentclass line of your document.
%
% Earlier versions did not load epstopdf if shell escape was disabled.
% Now load, for better error reporting and to allow inclusion of pre-esisting
% converted files: see gh/38
%
% More information about the epstopdf run will be in the .log file;
% see http://ctan.org/pkg/epstopdf-pkg for more info about the
% epstopdf package itself. In turn, it calls the epstopdf script
Expand All @@ -680,11 +683,9 @@
\@ifpackageloaded{pst-pdf}{}{%
\@ifpackageloaded{pdftricks}{}{%
\@ifpackageloaded{graphics}{%
\ifnum\directlua{tex.sprint(status.shell_escape)}>0 %
% only add .eps to file extension list if epstopdf is loaded
\edef\Gin@extensions{\Gin@extensions,.eps}%
\RequirePackage{epstopdf-base}[2009/07/12]%
\fi}{}
}{}
}% pdftricks not loaded
}% pst-pdf not loaded
\fi
Expand Down
17 changes: 9 additions & 8 deletions pdftex.def
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
%% Hans Hagen, Heiko Oberdiek and
%% Martin Schr\"oder
%% Copyright (C) 2016-2018 LaTeX3 project and Heiko Oberdiek
%% Copyright (C) 2018-2022 LaTeX3 project
%% Copyright (C) 2018-2024 LaTeX3 project
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
Expand All @@ -20,7 +20,7 @@
%% https://github.com/latex3/graphics-def/issues
%%
\ProvidesFile{pdftex.def}
[2022/09/22 v1.2b Graphics/color driver for pdftex]
[2024/04/13 v1.2c Graphics/color driver for pdftex]
\def\GPT@space{ }
\def\c@lor@arg#1{%
\dimen@#1\p@
Expand Down Expand Up @@ -652,16 +652,19 @@ E \else
}
% Load package epstopdf if
% a) LaTeX is running (plain TeX users are on their own),
% b) and shell escape (\write18) is enabled (possibly restricted),
% c) and \DoNotLoadEpstopdf either does not exist or is not \relax,
% d) and neither pst-pdf nor pdftricks is loaded (by \begin{document}).
% b) and \DoNotLoadEpstopdf either does not exist or is not \relax,
% c) and neither pst-pdf nor pdftricks is loaded (by \begin{document}).
%
% In other words, by default .eps files will be automatically
% converted to .pdf files when outputting pdf. This can be wrong!
% If the .pdf is the source, rather than the .eps, you should put
% \newcommand{\DoNotLoadEpstopdf}{}
% before even the \documentclass line of your document.
%
% Earlier versions did not load epstopdf if shell escape was disabled.
% Now load, for better error reporting and to allow inclusion of pre-esisting
% converted files: see gh/38
%
% More information about the epstopdf run will be in the .log file;
% see http://ctan.org/pkg/epstopdf-pkg for more info about the
% epstopdf package itself. In turn, it calls the epstopdf script
Expand All @@ -681,11 +684,9 @@ E \else
\@ifpackageloaded{pst-pdf}{}{%
\@ifpackageloaded{pdftricks}{}{%
\@ifpackageloaded{graphics}{%
\ifnum\pdfshellescape>0 %
% only add .eps to file extension list if epstopdf is loaded
\edef\Gin@extensions{\Gin@extensions,.eps}%
\RequirePackage{epstopdf-base}[2009/07/12]%
\fi}{}
}{}
}% pdftricks not loaded
}% pst-pdf not loaded
\fi
Expand Down
12 changes: 4 additions & 8 deletions testfiles-plain/eplain-001.luatex.tlg
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
(graphicx.tex
(../miniltx.tex
(../graphicx.tex (../miniltx.tex
\@tempcnta=\count...
\@tempcntb=\count...
\@tempdima=\dimen...
Expand All @@ -26,19 +25,16 @@ Defining generic filename parser.
\@dashdim=\dimen...
\fboxsep=\dimen...
\fboxrule=\dimen...
)
(../graphicx.sty
) (../graphicx.sty
graphicx: ....-..-.. v... Enhanced LaTeX Graphics (DPC,SPQR)
(../keyval.sty
keyval: ....-..-.. v... key=value parser (DPC)
\KV@toks@=\toks...
)
(../graphics.sty
) (../graphics.sty
graphics: ....-..-.. v... Standard LaTeX Graphics (DPC,SPQR)
(../trig.sty
trig: ....-..-.. v... sin cos tan (DPC)
)
(../graphics.cfg
) (../graphics.cfg
graphics.cfg: ....-..-.. v... sample graphics configuration
)
graphics: Driver file: luatex.def
Expand Down
12 changes: 4 additions & 8 deletions testfiles-plain/eplain-001.tlg
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
(graphicx.tex
(../miniltx.tex
(../graphicx.tex (../miniltx.tex
\@tempcnta=\count...
\@tempcntb=\count...
\@tempdima=\dimen...
Expand All @@ -26,19 +25,16 @@ Defining generic filename parser.
\@dashdim=\dimen...
\fboxsep=\dimen...
\fboxrule=\dimen...
)
(../graphicx.sty
) (../graphicx.sty
graphicx: ....-..-.. v... Enhanced LaTeX Graphics (DPC,SPQR)
(../keyval.sty
keyval: ....-..-.. v... key=value parser (DPC)
\KV@toks@=\toks...
)
(../graphics.sty
) (../graphics.sty
graphics: ....-..-.. v... Standard LaTeX Graphics (DPC,SPQR)
(../trig.sty
trig: ....-..-.. v... sin cos tan (DPC)
)
(../graphics.cfg
) (../graphics.cfg
graphics.cfg: ....-..-.. v... sample graphics configuration
)
graphics: Driver file: pdftex.def
Expand Down
12 changes: 4 additions & 8 deletions testfiles-plain/eplain-001.xetex.tlg
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
(graphicx.tex
(../miniltx.tex
(../graphicx.tex (../miniltx.tex
\@tempcnta=\count...
\@tempcntb=\count...
\@tempdima=\dimen...
Expand All @@ -26,19 +25,16 @@ Defining generic filename parser.
\@dashdim=\dimen...
\fboxsep=\dimen...
\fboxrule=\dimen...
)
(../graphicx.sty
) (../graphicx.sty
graphicx: ....-..-.. v... Enhanced LaTeX Graphics (DPC,SPQR)
(../keyval.sty
keyval: ....-..-.. v... key=value parser (DPC)
\KV@toks@=\toks...
)
(../graphics.sty
) (../graphics.sty
graphics: ....-..-.. v... Standard LaTeX Graphics (DPC,SPQR)
(../trig.sty
trig: ....-..-.. v... sin cos tan (DPC)
)
(../graphics.cfg
) (../graphics.cfg
graphics.cfg: ....-..-.. v... sample graphics configuration
)
graphics: Driver file: xetex.def
Expand Down
6 changes: 3 additions & 3 deletions testfiles-xetex/xetex001.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Completed box being shipped out [2]
...\hbox(49.99988+0.0)x345.0, glue set 280.00012fil
....\hbox(0.0+0.0)x15.0
....\hbox(49.99988+0.0)x49.99988
.....\special{pdf:image bbox 12.9514 64.757 62.76448 114.57008 clip 1 width 49.9998\ETC.}
.....\special{pdf:image bbox 12.9514 64.757 62.76448 114.57008 clip 1 width 49.99988pt (clip-1-2.jpg) }
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand All @@ -141,7 +141,7 @@ Completed box being shipped out [2]
...\hbox(49.99988+0.0)x345.0, glue set 280.00012fil
....\hbox(0.0+0.0)x15.0
....\hbox(49.99988+0.0)x49.99988
.....\special{pdf:image bbox 12.9514 64.757 62.76448 114.57008 clip 1 width 49.9998\ETC.}
.....\special{pdf:image bbox 12.9514 64.757 62.76448 114.57008 clip 1 width 49.99988pt (clip-1-2.png) }
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand All @@ -151,7 +151,7 @@ Completed box being shipped out [2]
...\hbox(128.88118+0.0)x345.0, glue set 183.65361fil
....\hbox(0.0+0.0)x15.0
....\hbox(128.88118+0.0)x146.34639
.....\special{pdf:image bbox 0 0 145.79965 128.39969 clip 0 width 146.34639pt (clip\ETC.}
.....\special{pdf:image bbox 0 0 145.79965 128.39969 clip 0 width 146.34639pt (clip-1-2.jpg) <</Interpolate true>>}
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand Down
14 changes: 7 additions & 7 deletions testfiles/dvipdfmx001.luatex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Completed box being shipped out [1]
.....\localrightbox=null
....\hbox(0.0+0.0)x15.0, direction TLT
....\hbox(240.9+0.0)x321.2, direction TLT
.....\special{pdf:epdf pagebox cropbox bbox 0 0 320 240 clip 0 width 321.2pt (examp\ETC.}
.....\special{pdf:epdf pagebox cropbox bbox 0 0 320 240 clip 0 width 321.2pt (example-image-a.pdf) }
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand All @@ -45,7 +45,7 @@ Completed box being shipped out [1]
.....\localrightbox=null
....\hbox(0.0+0.0)x15.0, direction TLT
....\hbox(240.9+0.0)x321.2, direction TLT
.....\special{pdf:epdf page 1 pagebox cropbox bbox 0 0 320 240 clip 0 width 321.2pt\ETC.}
.....\special{pdf:epdf page 1 pagebox cropbox bbox 0 0 320 240 clip 0 width 321.2pt (example-image-a.pdf) }
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand All @@ -60,7 +60,7 @@ Completed box being shipped out [1]
.....\localrightbox=null
....\hbox(0.0+0.0)x15.0, direction TLT
....\hbox(50.1875+0.0)x30.11249, direction TLT
.....\special{pdf:epdf pagebox cropbox bbox 0 0 30 50 clip 0 width 30.11249pt (az2.\ETC.}
.....\special{pdf:epdf pagebox cropbox bbox 0 0 30 50 clip 0 width 30.11249pt (az2.pdf) }
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand Down Expand Up @@ -99,7 +99,7 @@ Completed box being shipped out [2]
.....\localrightbox=null
....\hbox(0.0+0.0)x15.0, direction TLT
....\hbox(36.135+0.0)x36.135, direction TLT
.....\special{pdf:epdf pagebox artbox bbox 36 36 72 72 clip 0 width 36.135pt (az2.p\ETC.}
.....\special{pdf:epdf pagebox artbox bbox 36 36 72 72 clip 0 width 36.135pt (az2.pdf) }
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand All @@ -114,7 +114,7 @@ Completed box being shipped out [2]
.....\localrightbox=null
....\hbox(0.0+0.0)x15.0, direction TLT
....\hbox(49.99988+0.0)x49.99988, direction TLT
.....\special{pdf:image bbox 12.9514 64.757 62.76448 114.57008 clip 1 width 49.9998\ETC.}
.....\special{pdf:image bbox 12.9514 64.757 62.76448 114.57008 clip 1 width 49.99988pt (clip-1-2.jpg) }
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand All @@ -129,7 +129,7 @@ Completed box being shipped out [2]
.....\localrightbox=null
....\hbox(0.0+0.0)x15.0, direction TLT
....\hbox(49.99988+0.0)x49.99988, direction TLT
.....\special{pdf:image bbox 12.9514 64.757 62.76448 114.57008 clip 1 width 49.9998\ETC.}
.....\special{pdf:image bbox 12.9514 64.757 62.76448 114.57008 clip 1 width 49.99988pt (clip-1-2.png) }
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand All @@ -144,7 +144,7 @@ Completed box being shipped out [2]
.....\localrightbox=null
....\hbox(0.0+0.0)x15.0, direction TLT
....\hbox(128.48+0.0)x146.54749, direction TLT
.....\special{pdf:image bbox 0 0 146 128 clip 0 width 146.54749pt (clip-1-2.jpg) <<\ETC.}
.....\special{pdf:image bbox 0 0 146 128 clip 0 width 146.54749pt (clip-1-2.jpg) <</Interpolate true>>}
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
Expand Down
Loading

0 comments on commit 1362826

Please sign in to comment.