[OS X TeX] TexShop diagramming package

Daniel Becker daniel.becker at uni-rostock.de
Sun Aug 26 07:50:45 CEST 2007


Am 26.08.2007 um 05:28 schrieb Joe Chan:

> I'm looking into some packages that I can use with TexShop to  
> generate simple block diagrams. After I looked around, there seems  
> to be a package called PStricks. But then I also read that it's not  
> compatible with TexShop before is generates PostScript. Any  
> suggestions?

you can use pstricks with texshop as long as you choose "Tex +  
Ghostscript" as the typesetting routine. or you can use pdftricks  
(for using pstricks with pdftex).

ask google a bit more. a starting point might be also

http://tug.org/PSTricks/

A working example that you can typeset with pdftex is:

\documentclass[11pt]{article}
%LANGUAGE; FONTS
\usepackage[T1]{fontenc} %hyphenation with european languages, HQ-fonts
\usepackage[latin1]{inputenc} %encoding
\usepackage{textcomp}%for symbols in TS1 encoding
%\usepackage{helvet} \renewcommand{\familydefault}{\sfdefault} % 
[scaled=0.92]
%DIMENSIONS
%\usepackage{times,txfonts} %times f\"ur mathe: txfonts
%\usepackage{palatino, pxfonts} % For Palatino text & math fonts      
alt:,mathpazo
%\usepackage{utopia,eulervm,courier}
%\usepackage{eulervm}
\usepackage{utopia,fourier,courier}% For Utopia & Courier text fonts,  
with Fourier math font
\usepackage[a4paper,left=0in,right=0in,top=1in,bottom=0in]{geometry}%
\usepackage{ifpdf}
\ifpdf%
        \usepackage{pdftricks}

        \begin{psinputs}
            \usepackage{pstricks}
            \usepackage{pstricks-add}
            \usepackage{pst-plot}
            \usepackage{pst-text,pst-node,pst-tree}
        \end{psinputs}
\else
        \usepackage{pstricks}
        \usepackage{pstricks-add}
        \usepackage{pst-plot}
        \usepackage{pst-text,pst-node,pst-tree}

\fi

\begin{document}


Hallo - das wird ein Bild, gemalt mit ps-tricks-Befehlen, das  
Ergebnis wird ein pdf-Bild....

\begin{pdfdisplay}
% Das folgende ist etwas dubios - auf jeden Fall wird ein maximal  
großes Bild vorbereitet, mit Koordinatensystem
\begin{pspicture}(-1,-1)(10,16)
% Entfernt man am Ende das Koordinatensystem, enthält das  
resultierende pdf-Bild nur den Inhalt
\psgrid[subgriddiv=1,griddots=10,gridlabels=10pt](-2,-2)(14,20)
%Die beiden nächsten Elemente sollen den Rand des pdf-Bildes  
bestimmen und deshalb entsprechend  dem grid positioniert werden
%DIESE BEIDEN PUNKTE BESCHNEIDEN DAS PDF-BILD
\put(-1,-1){\makebox(0,0)[cc]{.}}
\put(10,16){\makebox(0,0)[cc]{$.$}}
%zeichnet ein Koordinatensystem ein
\psaxes[labels=none,ticks=none,linewidth=0.2mm,Dx=10,Dy=10]{->}(0,0) 
(12,19)
%Text
\put(1,19){\makebox(0,0)[cc]{Hallo}}
%Linie
\psline[showpoints=false,linestyle=dashed,dash=2mm 2mm]{-}(1,3)(10,7.5)
\end{pspicture}


\end{pdfdisplay}



\end{document} 
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list