2014-03-07 28 views
1

我目前正在開發一個處理信息的Java應用程序,並且該信息必須作爲圖形保存爲pdf文件。我得到了60張圖表作爲輸出,全部使用不同的標題。Gnuplot/Ghostscript創建內容列表

什麼是根據標題製作所有圖表內容表的簡單方法? 有沒有可以做到這一點的命令?還是我必須使用pdfmarks?

我不能在互聯網上找到這事,因爲如果我使用的內容的話表我剛剛得到的gnuplot內容表/ Ghostscript的本身......

在此先感謝

+0

的Gnuplot不能創建在PDF文件中的書籤。請參閱例如[將PDF與PDFTK合併爲書籤?](http://stackoverflow.com/questions/2969479/merge-pdfs-with-pdftk-with-bookmarks)開始。 – Christoph

回答

1

您可以使用Latex生成PDF,然後使用gnuplot中的epslatex終端生成數字。您可以編寫一個生成Latex文檔的腳本。

的gnuplot的腳本:

set term epslatex color size 3,2 font 6 
set output "figure1.eps" 
# 
set title 'Title of figure1' 
# 
plot sin(x) 
# 
exit 

這產生EPS文件名爲figure1.eps和一個名爲figure1.tex乳膠文件中嵌入的EPS。

的下面乳膠可以依次嵌入figure1.tex到文檔:

\documentclass{article} 

\usepackage{graphicx} 
\usepackage{color} 
\usepackage{amsmath} 
\usepackage{amsfonts} 
\usepackage[mathcal]{euscript} 

\begin{document} 

\listoffigures 

\begin{figure} 
\centering 
\include{figure1} 
\caption[Description of figure1 as it appears on the list of 
figures]{Caption of figure1.} 
\end{figure} 

\end{document} 

使用\listoffigures命令的數字列表將生成。在表出現之前,您可能需要運行Latex幾次。然後使用dvipdf導出爲PDF。結果應該是這樣的:

enter image description here