Asymptote 3D Texlive 2022의 글꼴 문제

Asymptote 3D Texlive 2022의 글꼴 문제

다음 코드는 texlive 2021에서는 작동하지만 더 이상 texlive 2022에서는 작동하지 않습니다.

    % !TeX program = lualatex
    \documentclass{article}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \usepackage[inline]{asymptote}
    \begin{document}

    Alors?

    \begin{asydef}
        texpreamble("\usepackage[math-style=french,bold-style=ISO]{fourier-otf}");
        texpreamble("\setmainfont[Scale=0.72]{Verdana}");
        settings.tex="lualatex";
        \end{asydef}
    \begin{center}
        \begin{asy}
    import three;
    unitsize(1cm);
    //draw('en 2D : $A$ et A',(0,0)--(10,0));
    draw('en 3D : $B$ et B',(0,0,0)--(10,0,0));
            \end{asy}
        \end{center}
    \end{document}

2D에서는 문제가 없지만 3D에서는 더 이상 PDF가 제대로 생성되지 않습니다. PDF에 그려지고 asy -f pdf essai-1.asy를 사용하여 _ps에만 텍스트가 생성됩니다.

댓글 이후에 수정되었습니다. Système d'exploitation 64비트, 프로세서 x64 Windows 10 제품군

여기에 이미지 설명을 입력하세요

생성된 코드

    if(!settings.multipleView) settings.batchView=false;
    settings.tex="pdflatex";
    settings.inlinetex=true;
    deletepreamble();
    defaultfilename="essai-1";
    if(settings.render < 0) settings.render=4;
    settings.outformat="";
    settings.inlineimage=true;
    settings.embed=true;
    settings.toolbar=false;
    viewportmargin=(2,2);

    texpreamble("\usepackage[math-style=french,bold-style=ISO]{fourier-otf}");
    texpreamble("\setmainfont[Scale=0.72]{Verdana}");
    settings.tex="lualatex";

    import three;
    unitsize(1cm);
    //draw('en 2D : $A$ et A',(0,0)--(10,0));
    draw('en 3D : $B$ et B',(0,0,0)--(10,0,0));

생성된 파일

여기에 이미지 설명을 입력하세요

essai-1__.ps 파일 여기에 이미지 설명을 입력하세요

essai-1_0.pdf 파일 여기에 이미지 설명을 입력하세요

답변1

TeXLive 2022를 다운로드했습니다.

/usr/local/texlive/2022/bin/x86_64-linux/asy -f pdf

test.asy에 줄이 포함되어 있으면 잘 작동합니다.

import three;
unitsize(1cm);
draw('en 3D : $B$ et B',(0,0,0)--(10,0,0));

를 사용하여 asy 버전이 3D 지원으로 컴파일되었는지 확인하세요 asy --version. x86_64-linux 버전이 반환됩니다.

Asymptote version 2.79 [(C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince]

ENABLED OPTIONS:
V3D      3D vector graphics output
WebGL    3D HTML rendering
OpenGL   3D OpenGL rendering
SSBO     GLSL shader storage buffer objects
XDR      External Data Representation (portable binary file format for V3D)
Readline Interactive history and editing
GC       Boehm garbage collector
threads  Render OpenGL in separate thread

DISABLED OPTIONS:
GSL      GNU Scientific Library (special functions)
FFTW3    Fast Fourier transforms
CURL     URL support
LSP      Language Server Protocol
Sigsegv  Distinguish stack overflows from segmentation faults

답변2

아마도 새로운 질문을 열면 안 될 것 같습니다. 내가해야합니까?

John Bowman의 test.asy 파일을 살펴보겠습니다. 첫 번째 줄을 추가하면 다음과 같습니다.

settings.tex="latex";
import three;
unitsize(1cm);
draw('en 3D : $B$ et B',(0,0,0)--(10,0,0));

그런 다음 asy -kf pdf test.asy가 작동하고(test.pdf에는 줄과 텍스트가 포함되어 있음) test_.tex는

\documentclass[12pt]{article}
\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}
\pagestyle{empty}
\textheight=2048pt
\textwidth=2048pt
\begin{document}
\makeatletter%
\let\ASYencoding\f@encoding%
\let\ASYfamily\f@family%
\let\ASYseries\f@series%
\let\ASYshape\f@shape%
\makeatother%
\fontsize{12.000000}{14.400000}\selectfont%
\usefont{\ASYencoding}{\ASYfamily}{\ASYseries}{\ASYshape}%
\special{ps:
/ASYx {( ) print ASYX sub 12 string cvs print} bind def
/ASYy {( ) print ASYY sub 12 string cvs print} bind def
/ASY1 true def
/show {ASY1 {/ASYX currentpoint pop def /ASYY currentpoint exch pop def /ASY1 false def} if currentpoint newpath moveto false charpath {(M) print ASYy ASYx} {(L) print ASYy ASYx} {(C) print ASYy ASYx ASYy ASYx ASYy ASYx} {(c) print} pathforall} bind def /V {ASY1 {/ASYX currentpoint pop def /ASYY currentpoint exch pop def ASY1 false def} if Ry neg Rx 4 copy 4 2 roll 2 copy 6 2 roll 2 copy (M) print ASYy ASYx (L) print ASYy add ASYx (L) print add ASYy add ASYx (L) print add ASYy ASYx (c) print} bind def}
en 3D : $B$ et B\ %
\end{document}

"latex"를 "pdflatex"로 바꾸는 경우에도 마찬가지입니다.

"latex"를 "xelatex"로 바꾸면

settings.tex="xelatex";

그런 다음 asy -kf pdf test.asy는 작동하지 않으며(줄만 있고 텍스트는 없음) text_.tex는

\documentclass[12pt]{article}
\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}
\pagestyle{empty}
\textheight=2048pt
\textwidth=2048pt
\begin{document}
\makeatletter%
\let\ASYencoding\f@encoding%
\let\ASYfamily\f@family%
\let\ASYseries\f@series%
\let\ASYshape\f@shape%
\makeatother%
\fontsize{12.000000}{14.400000}\selectfont%
\usefont{\ASYencoding}{\ASYfamily}{\ASYseries}{\ASYshape}%
en 3D : $B$ et B\ %
\end{document}

내 생각엔 우리에게 문제가 있는 것 같아...

추신: Manjaro Linux, Asymptote 2.79, texlive 2022.

관련 정보