Menu

#346 Include Asymptote

6400
closed
None
2017-09-03
2017-07-16
AndréC
No

Can you include Asymptote in MikTeX as is done with TexLive?

Discussion

  • Christian Schenk

    • assigned_to: Christian Schenk
    • Milestone: 6300 --> None
     
  • karl koeller

    karl koeller - 2017-07-21

    A new package Asymptote has been added to the MiKTeX distribution, but it lacks the executables.

    See

    https://www.ctan.org/tex-archive/graphics/asymptote/binaries

     
  • Christian Schenk

    • status: open --> in-the-works
     
  • Christian Schenk

    The asymptote package contains input files only. The binary package (miktex-asymptote-bin) will be released later.

     
  • Christian Schenk

    • labels: feature -->
    • Milestone: None --> 6400
     
  • karl koeller

    karl koeller - 2017-08-04

    Note that asy.exe doesn't work as expected.

    Try, for example, with the file bundled with asymptote,

    http://mirrors.ctan.org/graphics/asymptote/doc/latexusage.tex

    the following

    pdflatex latexusage
    asy latexusage-*.asy
    

    The response of asy.exe is

    error: could not load module 'latexusage-*.asy'
    
     
  • Christian Schenk

    This is expected behaviour. Try running

    pdflatex latexus*.tex
    

    Reason is, that the Windows command line interpreter cmd does not expand wildcard arguments.

    If you need wildcard expansion, you can try another shell (e.g., bash).

     
  • karl koeller

    karl koeller - 2017-08-04

    Note that the same command

    asy latexusage-*.asy
    

    works as expected under Windows with TeX Live.

     
  • Christian Schenk

    Yes, maybe. TeX Live for Windows assimilated the Cygwin executable (asy.exe). MiKTeX asy.exe is a native Windows executable. As stated above, all MiKTeX executables depend on the shell to expand wildcard arguments. I am not planning to change this. But please feel free to create a bug report.

     
  • Christian Schenk

    Since MiKTeX asy.exe is new and experimental, I will enable internal wildcard expansion for this executable, i.e, asy latexusage-*.asy will work when started from cmd.exe.

     
  • karl koeller

    karl koeller - 2017-08-05

    Thank you very much for this.

     
  • AndréC

    AndréC - 2017-08-06

    Hi,
    Thank you for including Asymptote in the new version of MikTeX, I am reporting an error.

    When I compile from a command prompt, (powershell on windows 10) the code below that produces a playable dice with the mouse directly I have the following error:

    MiKTeX 2.9/asymptote/three.asy: 2905.13: runtime: to support onscreen rendering, please install glut library, run ./configure, and recompile

    But when I compile the same document included in a Tex file with the compilation Pdflatex-> Asymptote-Pdflatex, it works.

    import three;
        currentprojection =orthographic((5,2,3));
        currentlight=nolight;
        settings.tex="latex"; // Moteur LaTeX utilisé pour la compilation (latex, pdflatex, ...)
        settings.outformat="pdf"; // Format de sortie ; eps par défaut
        settings.prc=true; // Format PRC de la figure ; vrai par défaut
        settings.render=-1; // Rendu des figures ; -1 par défaut
        size(6cm,0);
        real a = 0.05;
        real h=0.001;
        path  carre = box ((0,0),(84a,84a)),
              disque = scale(9a)*unitcircle,
              patron1[] = shift(42a,42a)*disque,
              patron2[] = shift(14a,70a)*disque^^shift(70a,14a)*disque,
              patron3[] = shift(14a,70a)*disque^^shift(70a,14a)*disque^^shift(42a,42a)*disque,
              patron4[] = shift(14a,14a)*disque^^shift(14a,70a)*disque^^shift(70a,14a)*disque^^shift(70a,70a)*disque,
              patron5[] = shift(14a,14a)*disque^^shift(14a,70a)*disque^^shift(70a,14a)*disque^^shift(70a,70a)*disque^^shift(42a,42a)*disque,
              patron6[] = shift(14a,14a)*disque^^shift(14a,70a)*disque^^shift(70a,14a)*disque^^shift(70a,70a)*disque^^shift(42a,70a)*disque^^shift(42a,14a)*disque;
    
        transform3 tX=shift((84a+h)*X), tY=shift((84a+h)*Y), tZ=shift((84a+h)*Z); 
    
        path3 facegauche[] =shift(0,-h,0)*path3(patron6,ZXplane),
              facedroite[] =path3(patron1,ZXplane),
              faceavant[] =path3(patron2,YZplane),
              facearriere[] =shift(-h,0,0)*path3(patron5,YZplane),   
              facehaut[] =path3(patron4,XYplane),      
              facebas[] =shift(0,0,-h)*path3(patron3,XYplane); 
    
        draw(O--4.2X ^^ O--4.2Y ^^ O--4.2Z);      
        draw(scale3(84a)*unitcube, surfacepen=white);
        draw(box(O, 84a*(X+Y+Z)), gray);
        draw(surface(facegauche),blue);
        draw(surface(tY*facedroite),blue);
        draw(surface(tZ*facehaut),blue);
        draw(surface(facebas),blue);
        draw(surface(facearriere),blue);
        draw(surface(tX*faceavant),blue);
    

    What should I do ?

     
  • Christian Schenk

    • Status: in-the-works --> closed
     
MongoDB Logo MongoDB