! Undefined control sequence.
<recently read> \c@lor@to@ps
l.120 \pstree{\XX{Hierarchy}}
This uses pstricks to build a tree diagram. Note that \XX is defined
by:
\newcommand{\XX}[1]{%
\Tr{\psframebox{\rule{0pt}{9pt}#1}}}
Any clues? Are the packages implemented differently in these two
distributions?
Thanks very much!
-pd
Howdy,
You re probably trying to compile using pdflatex rather than ``TeX +
Ghostscript''. Pdflatex doesn't support pstricks (directly).
If you're using TeXShop put the line
%%!TEX TS-program = latex
as the first line in the file; that tells TeXShop to use ``TeX +
Ghostscript'' (latex->dvips->ps2pdf) without changing the default or
having to reset it for that file.
Good Luck,
Herb Schulz
NB: by the way, the "TeX+Ghostscript" option is also to be found in the
"Typeset" menu (it acts then on the current file, unless the above
"%%!TEX" line says otherwise), and can be definitely set in the
TeXShop's preferences.
Well, that was apparently part of the problem, but now I get a
different error, again only wwith MacTeX. MikTeX has no complaints.
(./pstricks.tex
'PSTricks' v97 patch 9 <1998/01/07> (tvz)
(/usr/local/texlive/2007/texmf-dist/tex/generic/pstricks/
pstricks.con))
(/usr/local/texlive/2007/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2007/texmf/tex/latex/config/colog.cfg)
!LaTeX Error: Missing \begin{document}
See the LaTeX manual or LaTeX Companion for explanation.
Type H<return> for immediate help.
...
l.1440 white,1/1,1,1/0,0,1/0,0,0,0}
Typing H just tells me I'm in trouble, and to try typing <return>,
which gives me
!Undefined control sequence.
<recently read>\@@drv
Any clues?
Thanks very much!
-pd
Try and discard the aux file, before compiling again.
HTH,
Franck Pastor
if that log extract is to be believed, the .aux file hasn't been read
so that's not the problem.
however, i'm a but unsure about
/usr/local/texlive/2007/texmf/tex/latex/config/colog.cfg -- is it
something special to macs?
really, we need the preamble to peter's document, at least.
peter, take a look at
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=askquestion
about the sorts of information we need.
fwiw, i can't find a line 1440 in xcolor.sty, which is what the log
claims it's reading at the time of the error.
--
Robin Fairbairns, Cambridge
I think that was supposed to be color.cfg. I confess that I had to re-
type the log file extract, as I couldn't seem to cut and paste from
the TeXShop console window. Everytime I selected some text, it
immediately disappeared from the window.
Below is a shortened, stripped down version of the LaTeX document. I
haven't tested this version on Windows yet, but this is based on the
document that compiled with no problems on Windows/MikTeX, but fails
on the Mac/MacTeX. Since I renamed this file to latex-fails.tex,
there's no conflict with any existing .aux file.
Thanks,
-pd
%%!TEX TS-program = latex
\documentclass[11pt]{book}
\usepackage{sfheaders}
\usepackage{palatino}
\usepackage{lscape}
\usepackage{fancyhdr}
\usepackage{pstricks,pst-node,pst-tree}
\pagestyle{plain}
\setlength{\oddsidemargin}{0in}% Sets the oddside left margin to 1"
\setlength{\evensidemargin}{0in}% Sets the evenside left margin to 1"
% Using oddside margin also sets
% evenside margin when not using
% twocolumn.sty (and probably other
% cases)
\setlength{\textwidth}{6.5in}% Obvious
\setlength{\textheight}{9.0in}% Obvious
\setlength{\topmargin}{0in}% Sets the top margin to 1"
\setlength{\headheight}{0in}% Size of header
\setlength{\headsep}{0in}% Distance between header & text
\setlength{\parskip}{2ex plus 4pt minus 2pt}% Allows the paragraph
skip to
% stretch, avoiding underfull vboxes
\setlength{\parindent}{0pt}
\renewcommand{\baselinestretch}{1.0}% Sets the stretch of the
baselineskip
\newcommand{\bold}[1]{{\bfseries #1}}
\newcommand{\ital}[1]{{\itshape #1}}
\newcommand{\code}[1]{{\ttfamily #1}}
\newcommand{\Code}[1]{{\ttfamily\bfseries #1}}
\newcommand{\CODE}[1]{{\ttfamily\bfseries\itshape #1}}
\newenvironment{note}[1][NOTE]{\begin{quote}\centerline{#1}}
{\end{quote}}
\newenvironment{Poem}[1][T.B.D.]{\section*{#1}\begin{verse}\obeycr}
{\end{verse}}
\newenvironment{poem}{\begin{verse}\obeycr}{\end{verse}}
\newenvironment{chorus}[1][Chorus:]%
{\begin{quote}\setlength{\oddsidemargin}{.5in}
\setlength{\evensidemargin}{.5in}\itshape{\bfseries{#1}\\}}%
{\setlength{\oddsidemargin}{0in}\setlength{\evensidemargin}{0in}
\end{quote}}
\newenvironment{changemargin}[2]{%
\begin{list}{}{%
\setlength{\topsep}{0pt}%
\setlength{\leftmargin}{#1}%
\setlength{\rightmargin}{#2}%
\setlength{\listparindent}{\parindent}%
\setlength{\itemindent}{\parindent}%
\setlength{\parsep}{\parskip}%
}%
\item[]}{\end{list}}
\newcommand{\XX}[1]{%
\Tr{\psframebox{\rule{0pt}{9pt}#1}}}
\renewcommand{\psedge}{\ncangle}
\title{{\sffamily\bfseries Title:\\Subtitle}}
\author{Peter Davis\\%
p...@pfdstudio.com}
\begin{document}
\maketitle
\pagestyle{fancy}
\lhead{Title: Subtitle}
\lfoot{Peter Davis}
\cfoot{\thepage}
\rfoot{\today}
\section*{First Section}
\begin{poem}
Line one.
Line two.
Line three.
Line four.
\end{poem}
%\pagebreak
\begin{landscape}
\section*{Second Section}
\begin{poem}
Line one.
Line two.
Line three.
Line four.
\end{poem}
\psset{angleB=90,angleA=-90,levelsep=48pt,armB=14pt}
\pstree{\XX{Level 1}}
{
\pstree{\XX{Level 2a}}
{
\pstree{\XX{Level 3a}}
{
\XX{Level 4a}
\XX{Level 4b}
}
\pstree{\XX{Level 3b}}
{
\XX{Level 4c}
\XX{Level 4d}
}
}
\pstree{\XX{Level 2b}}
{
\pstree{\XX{Level 3c}}
{
\XX{Level 4e}
\XX{Level 4f}
}
\pstree{\XX{Level 3d}}
{
\XX{Level 4g}
\XX{Level 4h}
}
}
}
\begin{poem}
Line 1
Line 2
Line 3
Line 4
\end{poem}
\end{landscape}
%\pagebreak
\section*{Section Three}
\begin{poem}
Line one
Line two
Line three
Line four
\end{poem}
\end{document}
In the future if that happens you can always open the .log file in a
normal window and copy-and-paste as usual, thus sidestepping whatever
problems the console window might cause.
> Below is a shortened, stripped down version of the LaTeX document. I
> haven't tested this version on Windows yet, but this is based on the
> document that compiled with no problems on Windows/MikTeX, but fails
> on the Mac/MacTeX. Since I renamed this file to latex-fails.tex,
> there's no conflict with any existing .aux file.
I don't currently have a Mac available and thus cannot reproduce your
problem myself. However, I do suggest you add the \listfiles command to
your preamble and re-run the document on both machines. This command
will insert a list of all the files your document uses, along with
version numbers and dates. Then you can compare the results from both
machines and see if you have one or more outdated packages somewhere.
There have been quite a few updates in pstricks and related packages
recently, and depending on the mix of file versions you have some
strange errors are liable to pop up.
Alan
Howdy,
I don't have the sfheaders package but, after commenting that line out
the file seems to compile fine. There are some problems with headers but
it compiles and works. Oh... I'm using MacTeX.
As a side comment I believe you should use the mathpazo package instead
of the palatino package.
Could you strip down the file further and let use see your console
output. If you're using TeXShop you CAN copy the console window, just
click in the widow first and then select. The suggestion of using
\listfiles might be handy too.
Good Luck,
Herb Schulz
Thanks again, all! Here's an even more stripped down version,
followed by the console
%%!TEX TS-program = latex
\documentclass[11pt]{book}
%\usepackage{sfheaders}
%\usepackage{palatino}
\usepackage{mathpazo}
\usepackage{lscape}
\usepackage{fancyhdr}
\usepackage{pstricks,pst-node,pst-tree}
\listfiles
\pagestyle{plain}
\newcommand{\XX}[1]{%
\Tr{\psframebox{\rule{0pt}{9pt}#1}}}
\renewcommand{\psedge}{\ncangle}
\title{{\sffamily\bfseries Title:\\Subtitle}}
\author{Peter Davis\\%
p...@pfdstudio.com}
\begin{document}
\maketitle
\pagestyle{fancy}
\lhead{Title: Subtitle}
\lfoot{Peter Davis}
\cfoot{\thepage}
\rfoot{\today}
\section*{First Section}
Some text.
\section*{Second Section}
Some more text.
\section*{Section Three}
Some final text on this page.
\end{document}
### This is /usr/texbin/simpdftex, Version 20070507
### /usr/texbin/latex latex-fails.tex
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
%&-line parsing enabled.
entering extended mode
(./latex-fails.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax,
dumylang, noh
yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak,
german, ng
erman, danish, esperanto, spanish, catalan, galician, estonian, farsi,
finnish,
french, greek, monogreek, ancientgreek, croatian, hungarian,
interlingua, ibyc
us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk,
polish, por
tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian,
swedish,
turkish, ukenglish, ukrainian, loaded.
(/usr/local/texlive/2007/texmf-dist/tex/latex/base/book.cls
Document Class: book 2005/09/16 v1.4f Standard LaTeX document class
(/usr/local/texlive/2007/texmf-dist/tex/latex/base/bk11.clo))
(/usr/local/texlive/2007/texmf-dist/tex/latex/psnfss/mathpazo.sty)
(/usr/local/texlive/2007/texmf-dist/tex/latex/graphics/lscape.sty
(/usr/local/texlive/2007/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2007/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2007/texmf/tex/latex/config/graphics.cfg)
(/usr/local/texlive/2007/texmf-dist/tex/latex/graphics/dvips.def)))
(/usr/local/texlive/2007/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
(/usr/local/texlive/2007/texmf-dist/tex/latex/pstricks/pstricks.sty
(./pstricks.tex
`PSTricks' v97 patch 9 <1998/01/07> (tvz)
(/usr/local/texlive/2007/texmf-dist/tex/generic/pstricks/
pstricks.con))
(/usr/local/texlive/2007/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2007/texmf/tex/latex/config/color.cfg)
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1440 white,1/1,1,1/0,0,1/0,0,0,0}
?
without access to a mac, it's difficult to guess what's going on
here. it may be that one needs access to _your_ mac...
this is indeed the end of (nearly) the last command in current xcolor.
(my earlier remark about the line number was wrong -- i was
absent-mindedly looking at an old tetex system.)
however, running current xcolor.sty fresh from the archive doesn't
produce the error, and indeed i can't see what might be causing it, in
the source. so i'm forced to imagine that there's something corrupt
in your copy of xcolor.sty (or just possibly your color.cfg, but i
don't see what might cause it, just now).
could you
(a) copy xcolor.dtx and xcolor.ins from (e.g.)
http://www.tex.ac.uk/tex-archive/macros/latex/contrib/xcolor/
into a scratch directory
(b) run "latex xcolor.ins" in that directory
(c) compare the resulting xcolor.sty with with
/usr/local/texlive/2007/texmf-dist/tex/latex/xcolor/xcolor.sty already
on your system
(d) report the results.
this will either point an accusatory finger at something, or eliminate
this line of enquiry.
--
Robin Fairbairns, Cambridge
This code works fine here, and I use MacTeX too (its latest "dev"
version, to be found at
http://www.tug.org/mactex/morepackages.html
But I may have found something interesting in the output of your console
> (/usr/local/texlive/2007/texmf-dist/tex/latex/pstricks/pstricks.sty
> (./pstricks.tex
> `PSTricks' v97 patch 9 <1998/01/07> (tvz)
> (/usr/local/texlive/2007/texmf-dist/tex/generic/pstricks/
> pstricks.con))
Here my console output is not the same. I've got:
....
(/Users/fp/Library/texmf/tex/latex/pstricks/pstricks.tex
`PSTricks' v1.16 <2008/01/01> (tvz)
(/usr/local/texlive/2007/texmf-dist/tex/generic/pstricks/pstricks.con))
....
It seems that your version of pstricks is "very" old (1998). Do you
have some old packages in your personal texmf directory
(/Users/<your-shortname>/Library/texmf)?
Sorry, I forgot I use myself a recent version of pstricks, installed in
my personal texmf tree. For this try I took it away, and now MacTeX
uses its own pstricks package. It works fine once again nevertheless,
and on the console the following appears:
(/usr/local/texlive/2007/texmf-dist/tex/latex/pstricks/pstricks.sty
(/usr/local/texlive/2007/texmf-dist/tex/generic/pstricks/pstricks.tex
`PSTricks' v1.15a <2006/12/22> (tvz)
(/usr/local/texlive/2007/texmf-dist/tex/generic/pstricks/pstricks.con))
Your pstricks package is not to be found in your texmf tree, after all,
since I can read in your console:
(/usr/local/texlive/2007/texmf-dist/tex/latex/pstricks/pstricks.sty
But what does this line mean then ?
(./pstricks.tex
`PSTricks' v97 patch 9 <1998/01/07> (tvz)
Do you have a very old file "pstricks.tex somewhere? In your working
directory?
All I did was install the complete MacTeX package (from http://www.tug.org/mactex/)
on a Mac that's a few months old, and which had no previous
installation of TeX (unless Apple pre-installs one). So whatever
pstricks.sty I'm using is the one included in this package. I will
try updating that and seeing if that clears up the problem.
Thanks!
-pd
The problem seems not to be related to pstricks.sty, but to
pstricks.tex. For some reason, you installation uses a very ancient
version of this one. Maybe could you track this file in your
installation and see where it is?
Thou has hit it! For some reason, I had a ca. 1999 copy of
pstricks.tex in the directory in which the LaTeX file itself was.
Renaming that fixed the problem.
Thank you!
-pd