Skip to content

shipout does not produce PDF when settings.render is nonzero #574

@bariserkus

Description

@bariserkus

I have freshly installed Windows 11 and TeXLive 2025. I did not install Asymptote or GS seperately.

The shipout command in the following MWE does not produce PDF when the render setting is nonzero (the MWE is taken from the "An Asymptote tutorial" by Charles Staats III (2022):

settings.outformat="pdf";
settings.prc=false;
settings.render=1; //shipout does not work when this value is not zero, works fine when it is zero
import graph3;
size(4cm,0);
path3 myarc = rotate(18,Z) * Arc(c=O,
normal=X, v1=-Z, v2=Z, n=10);
surface backHemisphere =
surface(myarc, angle1=0,
angle2=180, c=O, axis=Z, n=10);
surface frontHemisphere = surface(myarc, angle1=180,
angle2=360, c=O, axis=Z, n=10);
draw(backHemisphere, surfacepen=material(white+opacity(0.8),
emissivepen=0.1*white), meshpen=gray(0.4));
draw(O--X, blue+linewidth(1pt));
draw(frontHemisphere, surfacepen=material(white+opacity(0.8),
emissivepen=0.1*white), meshpen=gray(0.4));
shipout(scale(4.0)*currentpicture.fit());

Executing the asy.exe on the file produces the following files:

testasy+0.eps
texput.log
texput.aux

The texput.log file is as follows:

This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025) (preloaded format=latex 2025.9.30)  30 SEP 2025 14:02
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**\scrollmode

*
(Please type a command or say `\end')
*\documentclass[12pt]{article}

*\let\paperwidthsave\paperwidth\let\paperwidth\undefined
(d:/texlive/2025/texmf-dist/tex/latex/base/article.cls
Document Class: article 2024/06/29 v1.4n Standard LaTeX document class
(d:/texlive/2025/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2024/06/29 v1.4n Standard LaTeX file (size option)
)
\c@part=\count196
\c@section=\count197
\c@subsection=\count198
\c@subsubsection=\count199
\c@paragraph=\count266
\c@subparagraph=\count267
\c@figure=\count268
\c@table=\count269
\abovecaptionskip=\skip49
\belowcaptionskip=\skip50
\bibindent=\dimen141
)
*\usepackage{graphicx}

*\let\paperwidth\paperwidthsave
(d:/texlive/2025/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)

(d:/texlive/2025/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks17
)
(d:/texlive/2025/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR)

(d:/texlive/2025/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2023/12/02 v1.11 sin cos tan (DPC)
)
(d:/texlive/2025/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: dvips.def on input line 106.

(d:/texlive/2025/texmf-dist/tex/latex/graphics-def/dvips.def
File: dvips.def 2022/09/22 v3.1e Graphics/color driver for dvips
))
\Gin@req@height=\dimen142
\Gin@req@width=\dimen143
)
*\newbox\ASYbox
\ASYbox=\box52

*\newdimen\ASYdimen
\ASYdimen=\dimen144

*\def\ASYprefix{}

*\long\def\ASYbase#1#2{\leavevmode\setbox\ASYbox=\hbox{#1}%\ASYdimen=\ht\ASYbox
%

*\setbox\ASYbox=\hbox{#2}\lower\ASYdimen\box\ASYbox}

*\makeatletter

*\def\Ginclude@eps#1{%

* \message{<#1>}%

*  \bgroup

*  \def\@tempa{!}%

*  \dimen@\Gin@req@width

*  \dimen@ii.1bp%

*  \divide\dimen@\dimen@ii

*  \@tempdima\Gin@req@height

*  \divide\@tempdima\dimen@ii

*    \special{PSfile=#1\space

*      llx=\Gin@llx\space

*      lly=\Gin@lly\space

*      urx=\Gin@urx\space

*      ury=\Gin@ury\space

*      \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi

*      \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi

*      \ifGin@clip clip\fi}%

*  \egroup}

*\makeatother

*\begin{document}
(d:/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-dvips.def
File: l3backend-dvips.def 2024-05-08 L3 backend support: dvips
\l__pdf_internal_box=\box53
\l__pdf_backend_content_box=\box54
\l__pdf_backend_model_box=\box55
\g__pdf_backend_annotation_int=\count270
\g__pdf_backend_link_int=\count271
\g__pdf_backend_link_sf_int=\count272
)
No file texput.aux.
\openout1 = `texput.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 0.
LaTeX Font Info:    ... okay on input line 0.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 0.
LaTeX Font Info:    ... okay on input line 0.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 0.
LaTeX Font Info:    ... okay on input line 0.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 0.
LaTeX Font Info:    ... okay on input line 0.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 0.
LaTeX Font Info:    ... okay on input line 0.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 0.
LaTeX Font Info:    ... okay on input line 0.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 0.
LaTeX Font Info:    ... okay on input line 0.

*\makeatletter%

*\let\ASYencoding\f@encoding%

*\let\ASYfamily\f@family%

*\let\ASYseries\f@series%

*\let\ASYshape\f@shape%

*\makeatother%

*\fontsize{12}{14.4}\selectfont%

*
(Please type a command or say `\end')
*\usefont{\ASYencoding}{\ASYfamily}{\ASYseries}{\ASYshape}%

*
(Please type a command

The file testasy+0.eps can be deleted, but the files texput.log and texput.aux cannot be deleted. The task manager shows two asy.exe and one latex.exe processes that continue running on the background. Upon ending the latex.exe process, these two files can be deleted.

The asy.exe -vvv execution produces the following:

PS D:\latextest\asymptote> asy testasy.asy -vvv
D:/texlive/2025/texmf-dist

Using configuration directory C:\Users\user\.asy
Using history C:\Users\user\.asy/history
Welcome to Asymptote version 3.01
cd D:\latextest\asymptote
Processing testasy
Loading plain from D:/texlive/2025/texmf-dist\asymptote/plain.asy
Including plain_constants from D:/texlive/2025/texmf-dist\asymptote/plain_constants.asy
Loading version from D:/texlive/2025/texmf-dist\asymptote/version.asy
Including plain_strings from D:/texlive/2025/texmf-dist\asymptote/plain_strings.asy
Including plain_pens from D:/texlive/2025/texmf-dist\asymptote/plain_pens.asy
Including plain_paths from D:/texlive/2025/texmf-dist\asymptote/plain_paths.asy
Including plain_filldraw from D:/texlive/2025/texmf-dist\asymptote/plain_filldraw.asy
Including plain_margins from D:/texlive/2025/texmf-dist\asymptote/plain_margins.asy
Including plain_picture from D:/texlive/2025/texmf-dist\asymptote/plain_picture.asy
Loading plain_bounds from D:/texlive/2025/texmf-dist\asymptote/plain_bounds.asy
Including plain_scaling from D:/texlive/2025/texmf-dist\asymptote/plain_scaling.asy
Loading simplex2 from D:/texlive/2025/texmf-dist\asymptote/simplex2.asy
Including plain_prethree from D:/texlive/2025/texmf-dist\asymptote/plain_prethree.asy
Including plain_Label from D:/texlive/2025/texmf-dist\asymptote/plain_Label.asy
Including plain_arcs from D:/texlive/2025/texmf-dist\asymptote/plain_arcs.asy
Including plain_boxes from D:/texlive/2025/texmf-dist\asymptote/plain_boxes.asy
Including plain_shipout from D:/texlive/2025/texmf-dist\asymptote/plain_shipout.asy
Including plain_markers from D:/texlive/2025/texmf-dist\asymptote/plain_markers.asy
Including plain_arrows from D:/texlive/2025/texmf-dist\asymptote/plain_arrows.asy
Including plain_debugger from D:/texlive/2025/texmf-dist\asymptote/plain_debugger.asy
Loading testasy.asy from testasy.asy
Loading graph3 from D:/texlive/2025/texmf-dist\asymptote/graph3.asy
Loading math from D:/texlive/2025/texmf-dist\asymptote/math.asy
Loading graph from D:/texlive/2025/texmf-dist\asymptote/graph.asy
Loading graph_splinetype from D:/texlive/2025/texmf-dist\asymptote/graph_splinetype.asy
Loading graph_settings from D:/texlive/2025/texmf-dist\asymptote/graph_settings.asy
Loading three from D:/texlive/2025/texmf-dist\asymptote/three.asy
Loading embed from D:/texlive/2025/texmf-dist\asymptote/embed.asy
Including three_light from D:/texlive/2025/texmf-dist\asymptote/three_light.asy
Including three_surface from D:/texlive/2025/texmf-dist\asymptote/three_surface.asy
Loading bezulate from D:/texlive/2025/texmf-dist\asymptote/bezulate.asy
Loading interpolate from D:/texlive/2025/texmf-dist\asymptote/interpolate.asy
Including three_margins from D:/texlive/2025/texmf-dist\asymptote/three_margins.asy
Including three_tube from D:/texlive/2025/texmf-dist\asymptote/three_tube.asy
Including three_arrows from D:/texlive/2025/texmf-dist\asymptote/three_arrows.asy
adjusting camera to (4.9999900034771,4.00001055773498,2.00000387583729)
adjusting target to (-9.99652289856591e-06,1.05577349764709e-05,3.87583729144532e-06)
GLSL version 4.00 NVIDIA via Cg compiler
Exporting testasy+0 as 230x230 image using tiles of size 230x230
4 tiles drawn
Wrote testasy+0.eps
This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2024-11-01> patch level 2
L3 programming layer <2025-01-18>


*
\documentclass[12pt]{article}
\let\paperwidthsave\paperwidth\let\paperwidth\undefined
\usepackage{graphicx}
\let\paperwidth\paperwidthsave
\newbox\ASYbox
\newdimen\ASYdimen
\def\ASYprefix{}
\long\def\ASYbase#1#2{\leavevmode\setbox\ASYbox=\hbox{#1}%\ASYdimen=\ht\ASYbox%
\setbox\ASYbox=\hbox{#2}\lower\ASYdimen\box\ASYbox}
\makeatletter
\def\Ginclude@eps#1{%
 \message{<#1>}%
  \bgroup
  \def\@tempa{!}%
  \dimen@\Gin@req@width
  \dimen@ii.1bp%
  \divide\dimen@\dimen@ii
  \@tempdima\Gin@req@height
  \divide\@tempdima\dimen@ii
    \special{PSfile=#1\space
      llx=\Gin@llx\space
      lly=\Gin@lly\space
      urx=\Gin@urx\space
      ury=\Gin@ury\space
      \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
      \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
      \ifGin@clip clip\fi}%
  \egroup}
\makeatother
\begin{document}
\makeatletter%
\let\ASYencoding\f@encoding%
\let\ASYfamily\f@family%
\let\ASYseries\f@series%
\let\ASYshape\f@shape%
\makeatother%
\fontsize{12}{14.4}\selectfont%

(Please type a command or say `\end')
*
*(d:/texlive/2025/texmf-dist/tex/latex/base/article.cls
Document Class: article 2024/06/29 v1.4n Standard LaTeX document class
(d:/texlive/2025/texmf-dist/tex/latex/base/size12.clo))
*
*(d:/texlive/2025/texmf-dist/tex/latex/graphics/graphicx.sty
(d:/texlive/2025/texmf-dist/tex/latex/graphics/keyval.sty)
(d:/texlive/2025/texmf-dist/tex/latex/graphics/graphics.sty
(d:/texlive/2025/texmf-dist/tex/latex/graphics/trig.sty)
(d:/texlive/2025/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(d:/texlive/2025/texmf-dist/tex/latex/graphics-def/dvips.def)))
*
*
*(d:/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
No file texput.aux.
*
*(Please type a command or say `\end')
*\usefont{\ASYencoding}{\ASYfamily}{\ASYseries}{\ASYshape}%

*(Please type a command or say `\end')
*\setbox\ASYbox=\hbox{\includegraphics[hiresbb]{testasy+0}}

<testasy+0.eps>
*(Please type a command or say `\end')
*\immediate\write16{>dim(\the\wd\ASYbox)dim}
>dim(115.4112pt)dim

*\immediate\write16{>dim(\the\ht\ASYbox)dim}
>dim(115.43126pt)dim

*\immediate\write16{>dim(\the\dp\ASYbox)dim}
>dim(0.0pt)dim

*adjusting target to (0,5.03539548560166e-16,0)
Multisampling enabled with sample width 4
Rendering testasy as 1440x1440 image
Rendering testasy as 120x1 image
Rendering testasy as 1440x1440 image

The following MWE, which is also taken from the same tutorial also does not work when settings.render is nonzero:

settings.outformat="pdf";
settings.render=1;
settings.prc = false;
import three;
size(1cm,0);
draw((0,0,0) -- (1,1,1),
linewidth(2pt));
shipout(scale(4.0) * currentpicture.fit());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions