This was to reproduce a bug I'd been having with Asymptote, but was actually me not passing the correct arguments. You need to explicitly pass -tex xelatex
or whatever TeX engine you're using, and this example has been updated to do that in the Makefile.
Last active
July 28, 2020 22:45
-
-
Save jbaum98/1053899bf05711b9bb77a06bf62452bb to your computer and use it in GitHub Desktop.
Asymptote bug reproduce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size(4 inch); | |
draw(unitcircle); | |
label("$A = \pi r^2$"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub asy {return system("asy \"$_[0]\"");} | |
add_cus_dep("asy","eps",0,"asy"); | |
add_cus_dep("asy","pdf",0,"asy"); | |
add_cus_dep("asy","tex",0,"asy"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%.pdf: %.tex | |
latexmk --xelatex $< | |
test_external.pdf: circle.tex circle_0.eps circle.pre | |
circle.tex circle_0.eps circle.pre: circle.asy | |
asy -inlinetex -tex xelatex $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[12pt]{article} | |
\usepackage[inline]{asymptote} | |
\begin{document} | |
\newcommand{\area}[1]{\pi #1^2} | |
\begin{asy} | |
size(4 inch); | |
label("$A = \area{r}$"); | |
draw(unitcircle); | |
\end{asy} | |
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[12pt]{article} | |
\usepackage{asymptote} | |
\input circle.pre | |
\begin{document} | |
\input circle.tex | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment