Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am working on a textbook, with a looming deadline, so I admit I did not do an exhaustive search for a solution to this situation. I was hoping someone would see this and say, "This is a duplicate of..." and direct me there.

I just upgraded to MacTex 2011, and when I compile the textbook documents, the console always pops up with...

"LaTex Error: You have run the document with pdflatex, but PSTricks requires..."

Ok...we don't load the PSTricks package at all, and before the upgrade this error wasn't showing up at all.

I should say that if I simply hit "Return" the compiler happily forges ahead and compiles the documents just fine.

Anyone know what the deal is? Thanks!

Update: Sorry for the delay. Work has been a little crazy. I tracked down the culprit, but I don't know why the error is occuring in the MacTex 2011. Here is the MWE:

\documentclass{report}
\usepackage{boites,boites_exemples}
\begin{document}
Filler Text Goes Here
\end{document}

To be honest, I didn't add this package in, my co-author did, so he must need the functionality. The full list of packages hasn't changed much over the past year, so it isn't that this was added and then the break-down occurred.

share|improve this question
1  
run the document with xelatex or have alook at tug.org/PSTricks/main.cgi?file=pdf/pdfoutput –  Herbert Dec 19 '11 at 21:57
3  
A minimal working example would help here. We don't know what documentclass, other packages, or anything else about your document at the moment. –  Mike Renfro Dec 19 '11 at 21:58
    
I'll see if I can upload an MWE later tonight. It's using the report documentclass. I was hoping I'd stumbled on to a known issue with MacTex 2011 and PSTricks. –  HTG Dec 19 '11 at 22:11
    
@Herbert the url you gave me seems to be focused on helping people who want pdf while they use PSTricks. I'm not using it. My co-author (who has not upgraded to MacTex 2011) is not getting this error. –  HTG Dec 19 '11 at 22:25
    
@Herbert xelatex did work. How odd... –  HTG Dec 19 '11 at 22:28
show 5 more comments

2 Answers

up vote 5 down vote accepted

Line 82 of boites_examples.sty is:

 \RequirePackage{pstricks}

So your document definitely does load PSTricks and therfore requires compilation with latex+dvips or with XeLaTeX as Herbert suggests.

As to the reason for the apparent difference in MacTeX versions, there are a couple of possibilities. This is pure speculation on my part:

  • The earlier version of the source had the line % !TEX TS-program = latex in it, and TeXShop was automatically using latex+dvips
  • TeXShop preferences used to be set to latex+dvips instead of pdflatex

(Assuming you are using TeXShop to edit).

share|improve this answer
    
I've tried all the proposed fixes I can find, but none seem to work. At least I know why the error is happening now. Thanks! –  HTG Dec 23 '11 at 23:00
    
I'm not sure what you mean by "proposed fixes". To avoid the error (if you are using TeXShop or TeXworks) add the comment line in the first bullet point of my answer to your source, and the file will compile correctly. –  Alan Munn Dec 23 '11 at 23:03
    
Add it where? I've tried adding it to 1) the headers file (both before and after the \documentclass line), 2) the main source file (both before and after the \begin{document}, and 3) the source code for the chapter. There was still there every time. –  HTG Dec 26 '11 at 0:20
    
@HTG The comment line needs to be at the very beginning of your source file (before the \documentclass line if that's your first line; earlier if you have a lot of commented lines at the top). If you are using multiple files with \include you only need it in the main source file. If you are using TeXShop, go to Macros -> Program and select latex from the list of engines and TeXShop will insert the line in the correct place for you. –  Alan Munn Dec 26 '11 at 2:22
    
Now this is interesting. When I tried your suggestion on the MWE I posted it worked. When I tried the same thing with the full text, it didn't. I trashed the aux files and ran it again (twice) but that didn't help. –  HTG Dec 26 '11 at 13:22
show 3 more comments

In Latexian, this problem is solved by setting the file type for .tex files to either "LaTeX (DVI)" or "XeTeX".

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.