diff --git a/Dockerfile b/Dockerfile index f735e07e69..39a6e96fa6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -213,6 +213,7 @@ COPY --from=base /opt/base/pg $APP_ROOT/pg # Patch files that are applied below COPY docker-config/imagemagick-allow-pdf-read.patch /tmp +COPY docker-config/pgfsys-dvisvmg-bbox-fix.patch /tmp RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \ && mkdir /run/webwork2 /etc/ssl/local \ @@ -230,7 +231,9 @@ RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \ && cd $PG_ROOT/htdocs \ && npm install \ && patch -p1 -d / < /tmp/imagemagick-allow-pdf-read.patch \ - && rm /tmp/imagemagick-allow-pdf-read.patch + && rm /tmp/imagemagick-allow-pdf-read.patch \ + && patch -p1 -d / < /tmp/pgfsys-dvisvmg-bbox-fix.patch \ + && rm /tmp/pgfsys-dvisvmg-bbox-fix.patch # ================================================================== # Phase 7 - Final setup and prepare docker-entrypoint.sh diff --git a/DockerfileStage2 b/DockerfileStage2 index f14bf34b5b..6c69289548 100644 --- a/DockerfileStage2 +++ b/DockerfileStage2 @@ -75,6 +75,7 @@ COPY --from=base /opt/base/pg $APP_ROOT/pg # Patch files that are applied below COPY docker-config/imagemagick-allow-pdf-read.patch /tmp +COPY docker-config/pgfsys-dvisvmg-bbox-fix.patch /tmp RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \ && mkdir /run/webwork2 /etc/ssl/local \ @@ -92,7 +93,9 @@ RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \ && cd $PG_ROOT/htdocs \ && npm install \ && patch -p1 -d / < /tmp/imagemagick-allow-pdf-read.patch \ - && rm /tmp/imagemagick-allow-pdf-read.patch + && rm /tmp/imagemagick-allow-pdf-read.patch \ + && patch -p1 -d / < /tmp/pgfsys-dvisvmg-bbox-fix.patch \ + && rm /tmp/pgfsys-dvisvmg-bbox-fix.patch # ================================================================== # Phase 5 - Final setup and prepare docker-entrypoint.sh diff --git a/docker-config/pgfsys-dvisvmg-bbox-fix.patch b/docker-config/pgfsys-dvisvmg-bbox-fix.patch new file mode 100644 index 0000000000..6e29205368 --- /dev/null +++ b/docker-config/pgfsys-dvisvmg-bbox-fix.patch @@ -0,0 +1,19 @@ +--- a/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def 2024-02-22 13:30:26.167777811 -0600 ++++ b/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def 2024-02-22 13:36:29.820956330 -0600 +@@ -127,7 +127,15 @@ + \dp#1=0pt% + \leavevmode% + \pgf@xa=\pgf@trimleft@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi% +- \raise-\pgf@ya\hbox{\ifpgf@sys@svg@inpicture\else\special{dvisvgm:bbox \pgf@sys@tonumber\pgf@picmaxx\space\pgf@sys@tonumber\pgf@picmaxy}\fi\box#1}% ++ \raise-\pgf@ya\hbox{% ++ \ifpgf@sys@svg@inpicture ++ \box#1% ++ \else ++ \special{dvisvgm:bbox \pgf@sys@tonumber\pgf@picmaxx\space\pgf@sys@tonumber\pgf@picmaxy}% ++ \special{dvisvgm:bbox lock}% ++ \box#1% ++ \special{dvisvgm:bbox unlock}% ++ \fi}% + \pgf@xa=\pgf@trimright@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi% + } +