[問題] 請問有關 Asymptote 的安裝
Windows 7 (64位元), MiKTeX 2.9, Texmaker
----------------------------------------------
目前的狀態為
已安裝 Gsview 與 Ghostscript
已從 Asymptote 的網站下載 asymptote-2.23-setup 並安裝完成
在 Texmaker 中的"設定 Texmaker"內有 Asymptote 的部分, 將路徑照安裝目錄填入
參考了 http://ppt.cc/M~qO 中 Using Asymptote in LaTeX 部分的步驟
(諸如複製 asymptote、asycolors、ocg 等 .sty 檔至在 MiKTeX 目錄下新建的
asymptote 資料夾, 並在 MiKTeX 的 Settings 中執行 Refresh FNDB )
以及 http://ppt.cc/pw6O 中第二章的第五頁
在 C:\Documents and Settings\(使用者名稱)\.asy 內建立 config.asy 文件
(其中 dir="d:\asymptote"; 的意義不太明白, 但還是照著做)
接著點擊桌面上 Asymptote 圖示, 執行以下內容
Welcome to Asymptote version 2.08 (to view the manual, type help)
> size(200);
> import three;
> draw(unitsphere,red);
> erase();
> draw(unitcircle,blue);
>
執行結果均 OK, 紅色球與藍色圓均有出現.
----------------------------------------------
問題部分
參考了 http://ppt.cc/M~qO 中 Using Asymptote in LaTeX 部分
由 Texmaker 建立一文件
\documentclass{article}
\usepackage{graphicx} %我只有 {graphicx}, 無選項 [pdftex]
\usepackage{asymptote}
\begin{document}
Hello.
I like to make pics with Asymptote like this one:
\begin{figure}[h]
\begin{asy}
include graph;
size(1inch);
filldraw(circle((0,0),1),yellow,black);
fill(circle((-.3,.4),.1),black);
fill(circle((.3,.4),.1),black);
draw(arc((0,0),.5,-140,-40));
\end{asy} %已確定前面無空格
\end{figure}
\par It makes me happy,
since I can still type my normal LaTeX stuff around it:
\(\int_0^{\pi}{\sin{x}}\,dx=2\)
\end{document}
其編譯出來的結果無法出現如網頁上的黃色笑臉圖.
請問各位先進, 是否在設置 Asymptote 過程中有哪個環節疏漏了? 感謝!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.70.165.241
推
07/17 06:24, , 1F
07/17 06:24, 1F
感謝這位先進的建議, 但仍無法跑出圖形.
而按照網頁上使用 \usepackage[pdftex]{graphicx} 後, 就出現了 error
"Package pdftex.def Error: Option `pdftex' requires pdfTeX"
而到 MiKTeX 的 Package Manager 找有關 pdftex 的套件時, 發現所列的所有套件早已
安裝好.
這部分上網查詢後有人說就是要用 "pdftex" 來編輯文件? ( http://ppt.cc/Fk0~ )
還請各位前輩指點. 謝謝!
※ 編輯: fancap 來自: 61.70.165.241 (07/17 08:58)
※ 編輯: fancap 來自: 61.70.165.241 (07/17 09:48)
討論串 (同標題文章)
LaTeX 近期熱門文章
PTT數位生活區 即時熱門文章