【问题标题】:Latex tabular input in epslatex terminal of gnuplot makes border disappeargnuplot epslatex 终端中的乳胶表格输入使边框消失
【发布时间】:2014-09-09 14:59:43
【问题描述】:

假设我有文件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

然后我得到以下信息

也就是说,我的边界消失了。我该如何解决?

【问题讨论】:

  • 接近投票者:这是gnuplot 问题,而不是latex 问题。因此,在我看来,这里比在 tex.SE 上更合适。

标签: latex gnuplot eps


【解决方案1】:

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

主文件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")

给予

【讨论】:

  • 这种方法的唯一缺点是,在我的情况下,生成的 eps 文件现在具有不同的字体大小。知道这是从哪里来的吗?
  • 我的set terminal epslatex 行中有font "" 8
  • 所有font 选项,但standalone font ... 组合被epslatex 终端忽略。要更改字体大小,您必须相应地更改 out-main.tex 文件。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-07-18
  • 2023-02-09
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多