Graphics, Figures & Tablesasymptote | Problem to load Module

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
daniel2718
Posts: 4
Joined: Tue Apr 10, 2012 11:32 pm

asymptote | Problem to load Module

Post by daniel2718 »

I've tried the search option, search engine and read the relevant sections of a couple manuals. I use TexMakerX, and I'm trying to use Asymptote within LaTeX - no generating images and adding them later.

I'm very new to LaTeX, so please bear with me. Here's the latex code:

Code: Select all

\documentclass[10pt]{article}
\usepackage{graphicx}
\usepackage{asymptote}

\begin{document}

\begin{figure}
\centering
\begin{asy}
size (3cm);
draw (unitcircle);
\end{asy}
\caption{This is a test.  Let's see if it works...}
\label{fig:1}
\end{figure}
\end{document}
And here's the output of the log file after "quick build". Note the warning in line 124.

Thanks a bunch
Attachments
asymptote-test.log
The resulting log.
(6.2 KiB) Downloaded 342 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

asymptote | Problem to load Module

Post by Stefan Kottwitz »

Hi Daniel,

welcome to the board!

The document is correct. I guess you did not run the Asymptote. You can read about this in the Asymptote manual, in 7 LaTeX usage. After you compiled with LaTeX, run Asymptote at the command prompt:

Code: Select all

asy asymptote-test-1.asy
then run LaTeX again to include the result. Probably you can configure this in Texmaker too.

I got, with your code:
asymptote.png
asymptote.png (3.88 KiB) Viewed 3265 times
Stefan
LaTeX.org admin
daniel2718
Posts: 4
Joined: Tue Apr 10, 2012 11:32 pm

Re: asymptote | Problem to load Module

Post by daniel2718 »

I'll try again when I'm not swamped with homework. But I'll say that TexMakerX has the built-in option to run PDFLaTeX->Asymptote->PDFLaTeX->View output.

Furthermore, if I choose to run asymptote from TexMakerX (i.e., without using "quick build"), then it gives the same error.

Maybe it's just TexMakerX that's not quite handling Asymptote as it should... anyway, thanks for the reply.
Post Reply