[OS X TeX] [pstricks] MacTEX install problems

Don Green Dragon fergdc at Shaw.ca
Fri Aug 2 20:05:03 EDT 2013


Hi Luis,

> <<snip>>
> I assume you are using TeXShop to typeset your documents.

Yes.

Your advice below makes me wonder if I should make some fundamental changes in the basic template that I have developed over the last year of so. It works well but there are a couple of lines therein that I've never really understood and wonder now if they should be changed.

Normally, I use a master/root file as the basic source file with auxiliary source files in subdirectories of the master/root directory. In my template I have NEITHER of the lines

% !TEX TS-program = latex
% !TEX encoding = UTF-8 Unicode

however I do have the two lines

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

The second line is included because it allows me to use the guillemets characters and certain other symbols, but I've never really understood why the first line is there. Note that the first line above is NOT what you recommend below, namely 

\usepackage[utf8x]{inputenc}

Should I be using the version you suggest? What would the difference be?



> 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.


In  TextShop -> Preferences... -> Encoding

the default "Western(Mac OS Roman)" is still in effect. I'm leery of changing that to one of

 	Unicode (UTF-8)  or  Unicode (UTF-16)

but I conclude that you are recommending such a change! If I were to select one of the above, then I wonder what TeXShop does when opening an 'old' .tex file that was created using the "Western(Mac OS Roman)" option.



> 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


Thank you for your explanations which I found both interesting and embarrassing!  :-)


Don Green Dragon
fergdc at Shaw.ca





More information about the MacOSX-TeX mailing list