我正在使用 PSTricks 和一些 tikz 函数来准备一些草图。
这段代码在 Windows 7 上完美运行 MikTeX
\documentclass[]{scrartcl}
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{color}
\usepackage{tikz}
\usepackage{pstricks}
\newrgbcolor{colRM}{.7 .05 .2}
\begin{document}
\begin{center}
\begin{pspicture}(0,0)(17.0,10)
\def \xO {4.0}
\def \yO {1.7}
\rput[c](+{\xO+1.7,\yO-0.8}){ \textcolor{colRM}{ \small{ $\vec M$ } } }
%\psgrid(0,0)(0,-5)(17,10)
\end{pspicture}
\end{center}
\end{document}
但在 Ubuntu 12.04 上的 Kile 2.1.0 中不起作用,即 TeXLive。结果+
。missing number treated as zero
我尝试使用括号位置,如{\xO+1.7},{\yO-0.8}
或{\xO+1.7} {\yO-0.8}
,但不起作用。到目前为止,我的解决方法是\pgfmathsetmacro
在前面的行中使用并使用结果。虽然这种不兼容性有点令人沮丧,因为我在工作时有一台 Win7 电脑,在家只使用 Linux,但我想知道如何在 Kile 中做到这一点。
编辑根据 David Carlisle 的要求提供的文件列表
这是 MikTexPortable Windows 输出:
*File List*
scrartcl.cls 2015/02/07 v3.16 KOMA-Script document class (article)
scrkbase.sty 2015/02/07 v3.16 KOMA-Script package (KOMA-Script-dependent basics and keyval usage)
scrbase.sty 2015/02/07 v3.16 KOMA-Script package (KOMA-Script-independent basics and keyval usage)
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
scrlfile.sty 2015/02/07 v3.16 KOMA-Script package (loading files)
tocbasic.sty 2015/02/07 v3.16 KOMA-Script package (handling toc-files)
scrsize12pt.clo 2015/02/07 v3.16 KOMA-Script font size class option (12pt)
typearea.sty 2015/02/07 v3.16 KOMA-Script package (type area)
german.sty 1998/07/08 v2.5e Support for writing german texts (br)
amstext.sty 2000/06/29 v2.01
amsgen.sty 1999/11/30 v2.0
amsmath.sty 2013/01/14 v2.14 AMS math features
amsbsy.sty 1999/11/29 v1.2d
amsopn.sty 1999/12/14 v2.01 operator names
amsfonts.sty 2013/01/14 v3.01 Basic AMSFonts support
graphics.sty 2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
dvips.def 2014/10/14 v3.0j Driver-dependent file (DPC,SPQR)
float.sty 2001/11/08 v1.3d Float enhancements (AL)
epic.sty
eepic.sty
color.sty 1999/02/16
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
dvipsnam.def 2014/10/14 v3.0j Driver-dependent file (DPC,SPQR)
tikz.sty 2013/12/13 v3.0.0 (rcs-revision 1.142)
pgf.sty 2013/12/18 v3.0.0 (rcs-revision 1.14)
pgfrcs.sty 2013/12/20 v3.0.0 (rcs-revision 1.28)
everyshi.sty 2001/05/15 v3.00 EveryShipout Package (MS)
pgfrcs.code.tex
pgfcore.sty 2010/04/11 v3.0.0 (rcs-revision 1.7)
graphicx.sty 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
pgfsys.sty 2013/11/30 v3.0.0 (rcs-revision 1.47)
pgfsys.code.tex
pgfsyssoftpath.code.tex 2013/09/09 (rcs-revision 1.9)
pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pgfcore.code.tex
pgfcomp-version-0-65.sty 2007/07/03 v3.0.0 (rcs-revision 1.7)
pgfcomp-version-1-18.sty 2007/07/23 v3.0.0 (rcs-revision 1.1)
pgffor.sty 2013/12/13 v3.0.0 (rcs-revision 1.25)
pgfkeys.sty
pgfkeys.code.tex
pgfmath.sty
pgfmath.code.tex
pgffor.code.tex
tikz.code.tex
pstricks.sty 2013/12/12 v0.60 LaTeX wrapper for `PSTricks' (RN,HV)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
pstricks.tex 2014/10/25 v2.60 `PSTricks' (tvz,hv)
pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
xkeyval.sty 2014/12/03 v2.7a package option processing (HA)
xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
pst-fp.tex 2014/10/25 v2.60 `PST-fp' (hv)
pst-3dplot.sty 2010/01/01 package wrapper for pst-3dplot.tex (hv)
pst-3d.sty 2009/07/28 package wrapper for pst-3d.tex (hv)
pst-3d.tex 2010/02/14 v1.11 `PST-3d' (hv)
pst-plot.sty 2011/04/13 package wrapper for pst-plot.tex (hv)
pst-xkey.sty 2005/11/25 v1.6 package wrapper for pst-xkey.tex (HA)
multido.sty 2004/05/17 package wrapper for PSTricks `multido.tex', (HV/RN)
multido.tex 2010/05/14 v1.42 `multido' (tvz,hv)
pst-plot.tex 2014/08/23 1.70 `pst-plot' (tvz,hv)
pst-node.sty 2010/04/22 package wrapper for pst-node.tex
pst-node.tex 2014/08/04 1.35 `pst-node' (tvz,hv)
pst-3dplot.tex 2014/08/25 v2.01 `PST-3dplot' (hv)
fig2_base.eps Graphic file (type eps)
umsa.fd 2013/01/14 v3.01 AMS symbols A
umsb.fd 2013/01/14 v3.01 AMS symbols B
***********
这是 TeX Live Ubuntu 输出:
*File List*
scrartcl.cls 2009/07/24 v3.04a KOMA-Script document class (article)
scrkbase.sty 2009/07/24 v3.04a KOMA-Script package (KOMA-Script-dependent basics and keyval usage)
scrbase.sty 2009/07/24 v3.04a KOMA-Script package (KOMA-Script-independent basics and keyval usage)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
scrlfile.sty 2009/03/25 v3.03 KOMA-Script package (loading files)
tocbasic.sty 2009/06/08 v3.03b KOMA-Script package (handling toc-files)
scrsize12pt.clo 2009/07/24 v3.04a KOMA-Script font size class option (12pt)
typearea.sty 2009/07/24 v3.04a KOMA-Script package (type area)
german.sty 1998/07/08 v2.5e Support for writing german texts (br)
amstext.sty 2000/06/29 v2.01
amsgen.sty 1999/11/30 v2.0
amsmath.sty 2000/07/18 v2.13 AMS math features
amsbsy.sty 1999/11/29 v1.2d
amsopn.sty 1999/12/14 v2.01 operator names
amsfonts.sty 2009/06/22 v3.00 Basic AMSFonts support
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2009/08/28 v1.8 graphics configuration of TeX Live
dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
float.sty 2001/11/08 v1.3d Float enhancements (AL)
epic.sty
eepic.sty
color.sty 1999/02/16
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
dvipsnam.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
tikz.sty 2010/10/13 v2.10 (rcs-revision 1.76)
pgf.sty 2008/01/15 v2.10 (rcs-revision 1.12)
pgfrcs.sty 2010/10/25 v2.10 (rcs-revision 1.24)
everyshi.sty 2001/05/15 v3.00 EveryShipout Package (MS)
pgfrcs.code.tex
pgfcore.sty 2010/04/11 v2.10 (rcs-revision 1.7)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
pgfsys.sty 2010/06/30 v2.10 (rcs-revision 1.37)
pgfsys.code.tex
pgfsyssoftpath.code.tex 2008/07/18 (rcs-revision 1.7)
pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pgfcore.code.tex
pgfcomp-version-0-65.sty 2007/07/03 v2.10 (rcs-revision 1.7)
pgfcomp-version-1-18.sty 2007/07/23 v2.10 (rcs-revision 1.1)
pgffor.sty 2010/03/23 v2.10 (rcs-revision 1.18)
pgfkeys.sty
pgfkeys.code.tex
pgffor.code.tex
tikz.code.tex
pstricks.sty 2008/11/26 v0.40 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex 2009/05/19 v1.29 `PSTricks' (tvz,hv)
pst-3dplot.sty 2009/07/28 package wrapper for pst-3dplot.tex (hv)
pst-3dplot.tex 2009/10/06 v1.86 `PST-3dplot' (hv)
pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
xkeyval.sty 2008/08/13 v2.6a package option processing (HA)
xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)
fig2_base.eps Graphic file (type eps)
umsa.fd 2009/06/22 v3.00 AMS symbols A
umsb.fd 2009/06/22 v3.00 AMS symbols B
***********