Hello LyX Users: Question about asymptote package within a LyX document.

Enrique Comer comer at cemati.org
Wed Apr 26 04:09:32 UTC 2023


Hello LyX Users:
I just read the article by Justin Domke with link: 
https://justindomke.wordpress.com/2017/05/24/the-second-and-third-best-features-of-lyx-you-arent-using/.



My question is:

►How could we call the asymptote package from within a LyX document?.




For example: From Justin Domke, we can write:


\begin{tikzpicture}
\draw[red] (0,0) -- (0,1);
\draw[green] (0,1) -- (1,1);
\draw[red] (1,1) -- (1,0);
\draw[blue] (1,0) -- (0,0);
\end{tikzpicture}
and obtain the corresponding figure.
How could we prepare LyX to be able to evaluate, for example:


begin{asy}size(0,100);import geometry;triangle t=triangle(b=3,alpha=90,c=4);dot((0,0));draw(t);draw(rotate(90)*t,red);draw(shift((-4,0))*t,blue);draw(reflect((0,0),(1,0))*t,green);draw(slant(2)*t,magenta);
\end{asy}
and obtain the figure? (note: the example code is from the gallery in link: https://asymptote.sourceforge.io/gallery/triangle.asy )






►I already tested the previous asymptote code from a LyX document, with the LaTeX preamble including: \usepackage[inline]{asymptote}, but the result was the generation of PDF without errors, but also without the expected figure.





Thank you very much in advance for any pointer to answer this question.


Congratulations for supporting the use of the great editor LyX.Best regards,Enrique Comer

|  | Libre de virus.www.avast.com |

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20230426/fb147f46/attachment.html>


More information about the lyx-users mailing list