gnuplot epslatex 终端中的 Latex 表格输入使边框消失

标签 latex gnuplot eps

假设我有文件table.tex

\begin{tabular}{|c|c|}
\hline
1 & 2 \\ \hline
3 & 4 \\ \hline
\end{tabular}

这基本上是一个包含一些数字的 2 x 2 表格。

我可以像这样编译它,并看到表格任意一侧的边框

\documentclass{article}
\begin{document}
\input{table.tex}
\end{document}

现在我有以下 gnuplot 脚本(使用 4.6.2 和 4.6.5 进行测试)

set terminal epslatex standalone solid
set output "out.tex"
set label '\input{table.tex}' at 1,1
plot x

然后我得到以下信息 Sample output

换句话说,我的边界消失了。我该如何解决这个问题?

最佳答案

这是minimal文档类的限制,该文档类由epslatex终端在独立模式下使用。以下工作正常:

主文件out-main.tex:

\documentclass{standalone}
\usepackage{graphicx}
\begin{document}
\input{out}
\end{document}

和 gnuplot 脚本

set terminal epslatex solid

set output "out.tex"
set label at 1,1 '\begin{tabular}{|c|c|} \
\hline \
1 & 2 \\ \hline \
3 & 4 \\ \hline \
\end{tabular}'

plot x
set output
system("latex out-main && dvips out-main && ps2pdf out-main.ps")

给出

enter image description here

关于gnuplot epslatex 终端中的 Latex 表格输入使边框消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25747868/

相关文章:

latex - 在 latex 中并排标记表格

automation - 如何平滑 GNUplot 中的每个绘图?

gnuplot - 如何在 gnuplot 中绘制蜘蛛图?

Gnuplot拟合错误: Singular matrix in Givens()

pdf - 如何使用 Ghostscript 设置 PDF 页面的物理大小?

latex - 在 sphinx 中创建一个与 `make latexpdf` 一起使用的角色(字体颜色)

latex - 让 LaTeX 中的代码看起来*漂亮*

pdf - 包含的 LaTeX 数字不在 dvi 中显示,但在 pdf 中显示

latex - 在 LaTeX 中设置作者或地址字符串变量

pdf - 将 eps 图像转换为 pdf 时如何避免灰色轮廓伪影?