
最後我決定轉PDF。我可以在沒有 EPS 包裝的情況下添加圖片,並使用 TikZ 進行繪圖 - 生活是美好的:o)
但我該如何使用gnuplot?為了保持一致性,我想使用tikz
終端,並且我希望能夠預覽我的圖表而不將它們包含在文件中。這
set term tikz standalone preamble '\usepackage[version=3]{mhchem}'
set output "test.tex"
plot x title '\ce{H2O}'
會製作一個article
可以單獨編譯的類別文檔,但不能包含在另一個文檔中。
一種解決方案是不是使用該standalone
選項,然後製作一個小腳本,將輸出包裝在standalone
班級。現在該文檔可以單獨編譯,並且可以包含在文檔中,但我無法指定額外的序言。 :o(
有人有聰明的解決方案嗎?
答案1
使用standalone
和gnuplottex
只能獲取圖片,但pgfplots
更可取,因為很難管理gnuplot
和之間標籤的字體latex
\documentclass{standalone}
\usepackage[]{gnuplottex}
\usepackage[version=3]{mhchem}
\begin{document}
\begin{gnuplot}
plot x title '\ce{H2O}'
\end{gnuplot}
\end{document}