![使用带有 beamer 的 pstricks 未定义颜色模型](https://linux22.com/image/269695/%E4%BD%BF%E7%94%A8%E5%B8%A6%E6%9C%89%20beamer%20%E7%9A%84%20pstricks%20%E6%9C%AA%E5%AE%9A%E4%B9%89%E9%A2%9C%E8%89%B2%E6%A8%A1%E5%9E%8B.png)
我正在尝试将 pstricks 与 beamer 一起使用。但是每次我都收到一条错误消息
包 xcolor 错误未定义颜色模型
我已经在 Google 上搜索过并尝试了不同的解决方案,但都没有奏效!
\documentclass[10pt,final]{beamer}
\usepackage{wasysym,graphicx,pgfpages}
\usepackage{amssymb,amsmath,amstext}
\usepackage{amsfonts}
\usepackage{palatino}
\usepackage{ragged2e}
\usepackage{pstricks}
\usepackage{setspace}
\let\oldframetitle\frametitle
\renewcommand{\frametitle}[1]{
\oldframetitle{#1}\setstretch{1.5}}
\usetheme{Berlin}
\usecolortheme{seahorse}
\useoutertheme{miniframes}
\useinnertheme{circles}
\setbeamertemplate{blocks}[rounded][shadow=true]
\begin{document}
\begin{frame}{pstricks}
*I was trying to copy paste a pstrick format diagram from jpicedt here.*
\end{frame}
\end{document}
答案1
你正在使用 pstricks 包加载 xcolor 包。你必须给 xcolor 一些参数。因此,尝试两种可能的解决方案,而不是\usepackage{pstricks}
\usepackage[dvipsnames,svgnames]{pstricks}
或者
\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage{pstricks}
更多信息,但抱歉是德语 http://www.mrunix.de/forums/showthread.php?t=58721
答案2
使用前\documentclass{...}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}
您的示例\listfiles
在第一行给出了一个(在日志文件末尾列出的内容):
*File List*
beamer.cls 2013/01/04 3.26 A class for typesetting presentations (rcs-revi
sion e81e0c94bcc6)
beamerbasercs.sty 2013/01/04 (rcs-revision 9a97a4eee358)
beamerbasemodes.sty 2012/04/15 (rcs-revision cc6557182d97)
beamerbasedecode.sty 2010/05/01 (rcs-revision efa082c6111d)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
beamerbaseoptions.sty 2010/04/27 (rcs-revision 982469101dd6)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
geometry.sty 2010/09/12 v5.6 Page Geometry
ifvtex.sty 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
pgfcore.sty 2010/04/11 v2.10-cvs (rcs-revision 1.7)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
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 2010/04/23 v1.9 graphics configuration of TeX Live
dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
pgfsys.sty 2010/06/30 v2.10-cvs (rcs-revision 1.37)
pgfrcs.sty 2010/11/07 v2.10-cvs (rcs-revision 1.25)
everyshi.sty 2001/05/15 v3.00 EveryShipout Package (MS)
pgfrcs.code.tex
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
xxcolor.sty 2003/10/24 ver 0.1
hyperref.sty 2012/11/06 v6.83m Hypertext links for LaTeX
hobsub-hyperref.sty 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO)
hobsub.sty 2012/05/28 v1.13 Construct package bundles (HO)
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
intcalc.sty 2007/09/27 v1.1 Expandable calculations with integers (HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty 2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
bigintcalc.sty 2012/04/08 v1.3 Expandable calculations on big integers (HO)
bitset.sty 2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty 2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty 2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
hopatch.sty 2012/05/28 v1.2 Wrapper for package hooks (HO)
xcolor-patch.sty 2011/01/30 xcolor patch
atveryend.sty 2011/06/30 v1.8 Hooks at the very end of document (HO)
atbegshi.sty 2011/10/05 v1.16 At begin shipout hook (HO)
refcount.sty 2011/10/16 v3.4 Data extraction from label references (HO)
hycolor.sty 2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
auxhook.sty 2011/03/04 v1.3 Hooks for auxiliary files (HO)
kvoptions.sty 2011/06/30 v3.11 Key value format for package options (HO)
pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
url.sty 2006/04/12 ver 3.3 Verb mode for urls, etc.
hdvips.def 2012/11/06 v6.83m Hyperref driver for dvips
pdfmark.def 2012/11/06 v6.83m Hyperref definitions for pdfmark specials
rerunfilecheck.sty 2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
beamerbaserequires.sty 2010/05/01 (rcs-revision efa082c6111d)
beamerbasecompatibility.sty 2012/05/01 (rcs-revision 67c48b3b652d)
beamerbasefont.sty 2012/09/19 (rcs-revision 733629cd0c6c)
amssymb.sty 2013/01/14 v3.01 AMS font symbols
amsfonts.sty 2013/01/14 v3.01 Basic AMSFonts support
beamerbasetranslator.sty 2010/06/11 (rcs-revision 85fd1cc7fc42)
translator.sty 2010/06/12 ver 1.10
translator-language-mappings.tex
beamerbasemisc.sty 2012/02/24 (rcs-revision 2ff5461be705)
beamerbasetwoscreens.sty 2010/05/01 (rcs-revision efa082c6111d)
beamerbaseoverlay.sty 2012/11/11 (rcs-revision 6afbc49b1109)
beamerbasetitle.sty 2010/09/21 (rcs-revision f0446ed0b6ae)
beamerbasesection.sty 2013/01/04 (rcs-revision 54309ceef997)
beamerbaseframe.sty 2012/12/26 (rcs-revision 1443917db2cf)
beamerbaseverbatim.sty 2012/08/30 (rcs-revision dfdb135076b3)
beamerbaseframesize.sty 2011/09/12 (rcs-revision 70f9d8411e54)
beamerbaseframecomponents.sty 2012/09/13 (rcs-revision dcd846607320)
beamerbasecolor.sty 2010/06/06 (rcs-revision d1a9b48be06d)
beamerbasenotes.sty 2012/12/19 (rcs-revision 1686da3db3c9)
beamerbasetoc.sty 2012/10/02 (rcs-revision 5ed0f4010e8a)
beamerbasetemplates.sty 2010/05/01 (rcs-revision efa082c6111d)
beamerbaseauxtemplates.sty 2012/05/01 (rcs-revision 67c48b3b652d)
beamerbaseboxes.sty 2012/05/13 (rcs-revision 56972908a390)
beamerbaselocalstructure.sty 2012/11/13 (rcs-revision ddfba79dac19)
enumerate.sty 1999/03/05 v3.00 enumerate extensions (DPC)
beamerbasenavigation.sty 2012/04/03 (rcs-revision 42a0f21a412d)
beamerbasetheorems.sty 2010/06/06 (rcs-revision 7e7cc5e53e9d)
amsmath.sty 2013/01/14 v2.14 AMS math features
amstext.sty 2000/06/29 v2.01
amsgen.sty 1999/11/30 v2.0
amsbsy.sty 1999/11/29 v1.2d
amsopn.sty 1999/12/14 v2.01 operator names
amsthm.sty 2004/08/06 v2.20
beamerbasethemes.sty 2010/05/01 (rcs-revision efa082c6111d)
beamerthemedefault.sty 2010/06/17 (rcs-revision d02a7cf4d8ae)
beamerfontthemedefault.sty 2012/12/19 (rcs-revision 1686da3db3c9)
beamercolorthemedefault.sty 2012/12/19 (rcs-revision 1686da3db3c9)
beamerinnerthemedefault.sty 2012/05/01 (rcs-revision 67c48b3b652d)
beamerouterthemedefault.sty 2012/12/19 (rcs-revision 1686da3db3c9)
wasysym.sty 2003/10/30 v2.0 Wasy-2 symbol support package
pgfpages.sty 2011/01/05 ver 0.02
calc.sty 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
palatino.sty 2005/04/12 PSNFSS-v9.2a (SPQR)
ragged2e.sty 2009/05/21 v2.1 ragged2e Package (MS)
everysel.sty 2011/10/28 v1.2 EverySelectfont Package (MS)
pstricks.sty 2013/05/22 v0.57 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex 2013/05/12 v2.43 `PSTricks' (tvz,hv)
pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
xkeyval.sty 2012/10/14 v2.6b package option processing (HA)
xkeyval.tex 2012/10/14 v2.6b key=value parser (HA)
pst-fp.tex 2013/05/12 v2.43 `PST-fp' (hv)
pstricks.pro 2012/10/16 v. 1.15, PostScript prologue file (hv)
pst-algparser.pro 2011/10/31 v. 0.04, PostScript prologue file (hv)
pst-tools.pro 2012/01/01 v. 0.02, PostScript prologue file (hv)
pst-dots.pro 2006/12/19 v. 2.00, PostScript prologue file (hv)
setspace.sty 2011/12/19 v6.7a set line spacing
beamerthemeBerlin.sty
beamerouterthememiniframes.sty
beamercolorthemewhale.sty
beamercolorthemeorchid.sty
beamerinnerthemerectangles.sty
beamercolorthemeseahorse.sty
beamerinnerthemecircles.sty
ot1phv.fd 2001/06/04 scalable font definitions for OT1/phv.
nameref.sty 2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty 2010/12/03 v1.4 Cleanup title references (HO)
test.out
test.out
translator-basic-dictionary-English.dict
translator-bibliography-dictionary-English.dict
translator-environment-dictionary-English.dict
translator-months-dictionary-English.dict
translator-numbers-dictionary-English.dict
translator-theorem-dictionary-English.dict
***********