2010-05-16 57 views

回答

9

使用graphicx包(包括在大多數LaTeX的分佈),它可以讓你:

\includegraphics[width=3in]{foo.png} 

an example page讓你開始。

15

如果您使用pdflatex(直接編譯爲pdf),則可以使用graphicx包使用\includegraphics命令。如果您的圖像被稱爲foo.png,則可以在文檔中添加以下命令。

\includegraphics{foo} 

但是,如果您有latex工作(彙編成DVI第一),你不能使用「PNG」文件作爲圖像(任何包)。您必須先將圖像轉換爲「eps」。如果您的圖像名爲foo.png,那麼您可以使用任何圖形軟件將其轉換爲foo.eps,然後使用以下命令來包含圖像。

\includegraphics{foo} 

這裏是寬度規範一個完整的例子:

\documentclass{article} 
\usepackage{graphicx} 

\begin{document} 
Here is my image. 
\includegraphics[width=\textwidth]{foo} 
\end{document} 
2
我不使用pdflatex

。在Ubuntu上,我使用imagemagick附帶的convert命令將.png轉換爲.eps,然後使用includegraphics