【问题标题】:Gnuplot / Ghostscript create a table of contentGnuplot / Ghostscript 创建目录
【发布时间】:2014-04-10 10:54:25
【问题描述】:

我目前正在开发一个处理信息的 java 应用程序,该信息必须以图形形式保存在 pdf 文件中。我得到了大约 60 个图表作为输出,所有图表都有不同的标题。

根据标题从所有图表中制作目录的简单方法是什么? 有没有可以做到这一点的命令?还是我必须使用 pdfmarks?

我在互联网上找不到任何关于此的内容,因为如果我使用单词目录,我只会得到 gnuplot/ghostscript 本身的目录...

提前致谢

【问题讨论】:

标签: gnuplot ghostscript


【解决方案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

这会生成一个名为 figure1.eps 的 EPS 文件和一个名为 figure1.tex 的 Latex 文件,其中嵌入了 EPS。

以下 Latex 可以依次将 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。结果应如下所示:

【讨论】:

    猜你喜欢
    • 2014-03-03
    • 1970-01-01
    • 1970-01-01
    • 2015-02-21
    • 1970-01-01
    • 1970-01-01
    • 2012-09-13
    • 1970-01-01
    相关资源
    最近更新 更多