[OS X TeX] Re: [pstricks] MacTEX install problems

Luis Sequeira lfsequeira at gmail.com
Sat Mar 30 17:12:58 CET 2013


> 	I "successfully" installed MacTEX-2012 and tried to run the examples supplied with the package. Some worked. None of the pstricks or foreign language examples worked. My main is to use "pstricks" and "pst-func."
> 
> 	I fear some is wrong with the installation. I cannot find any files described in "What has been installed" pdf.
> 
> 	I previously installed TexLive prior to installing MacTEX-2012. My guess that there is installation error.
> 
> 	Should I thrash TexLIVE and TexShop and try to install MacTEX-2012 again?
> 
> 
> 

I assume you are using TeXShop to typeset your documents.
You need to tell TeXShop which TeX program it should use to typeset.
The default is pdflatex, but that does not work well with pstricks, because pstricks requires postscript support.
You could change the default, but there is a better way. 

In the following, I will assume the traditional path for pstricks documents, which is to use latex, dvips, and ps2pdf to generate your output.
Nontraditional paths, using either pdflatex, lualatex or xelatex, are possible, but all involve some trickery to make pstricks work.

TeXShop allows you to enter some particular comments at the start of a file. Since they are comments (starting with the '%' sign), they are ignored by TeX;
but TeXShop uses them to decide what program to call.

The easy way to do put the cursor at the beginning of the file and use the Macros->Program menu command. From the list that appears, choose 'latex'.
TeXShop will enter the following into your source file:

% !TEX TS-program = latex

When present, TeXShop will use latex+dvips+ps2pdf for that particular document, regardless of the default you had set.

For foreign characters the situation is similar. TeX does not know about, since it was create in the '70s.
You have to set the encoding and to use the appropriate package.
The default is Mac Roman, but nowadays the right choice is Unicode. You should change the default encoding in TeXShop preferences.
Also, there is a similar command to help TeXShop decide which encoding to choose. Go to Macros->Encoding and choose UTF-8 Unicode.
This will enter the following into your source:

% !TEX encoding = UTF-8 Unicode


Then in your code, use 

\usepackage[utf8x]{inputenc}

to tell latex how to deal with non-ascii characters.

Luis Sequeira





More information about the macostex-archives mailing list