Document ClassesProblems with pstricks :S

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
Davmate
Posts: 3
Joined: Sun Dec 16, 2007 8:05 pm

Problems with pstricks :S

Post by Davmate »

Hi everybody. My problem is this:

I use MiKTeX as the implementation for LaTex and it works through TeXnicCenter. So, when installing I can use this packages:
Pstricks
pdftricks
pdfTeX
pdfLaTeX
and I've installed too Ghoscript and GSview. So, By the instruction of book I've consulted, it says that a instruction in order to chech out that installation was succesfull is:

Code: Select all

\documentclass{article}
\usepackage{pst-all}
\usepackage{pstcol}
\begin{document}
\begin{center}
\psset{unit=3.5cm,linecolor=lightgray}
\begin{pspicture}(-1.5,-1)(1.5,0)
\pstextpath[c]{\pscurve(-1.41,0)(-1,-1)(0,0)(1,-1)(1.41,0)
{\color{blue}\large Esta frase sinuosa y peculiar est\'a escrita a lo largo de la curva $y=x^4-2x^2$}
\end{pspicture}
\end{center}
\end{document}
I've tried and it doesn't work 8O . It says there are 30 mistakes and I can't make it run :cry: . I know that a reason is because of the pdfTeX and pdfLaTeX which are not compatible to pstricks and as I've read it is saved by pdftricks but I can't make it work, and I do need that package or someone similar as good as pstricks, as soon as possible. I'd appreciate so much if you can help me, it's really important ;) .,

Thanks in advanced =)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Problems with pstricks :S

Post by localghost »

As you have experienced the incompatibility between pdflatex and pstricks by yourself, I don't have to explain that. But I can offer you an alternative called pst-pdf. So change your example at a few points to make it work.

Code: Select all

\documentclass{article}
\usepackage{pst-pdf,pst-text,pstricks-add}

\begin{document}
  \begin{center}
  \psset{linecolor=lightgray}
  \begin{pspicture}[showgrid=true](-5,-3)(5,3)
    \pstextpath[c]{\pscurve(-5,0)(-2.5,-2)(0,2)(2.5,-2)(5,0)}
    {\color{blue}\large Esta frase sinuosa y peculiar est\'a escrita a lo largo de la curva $y=x^4-2x^2$}
    \end{pspicture}
  \end{center}
\end{document}
But that's only the half way to get the result in PDF. The pst-pdf package needs some more processing to get all things right. This can be done by a special build profile I generated some time ago for a similar problem in a German forum. Details about the processing of a document can be read in the documentation of the package. I called the profile "LaTeX => pst-pdf => PDF". You can find it in the attachment. Note that you have to adapt the paths to all required binaries. The build profile was created on a German system. So, be very careful in your path adaptation. Otherwise the profile won't work. To import the profile, unzip the archive and go to the "Profiles" dialog (Alt+F7) in TeXnicCenter.

If you are very new in using such graphics packages, you could take a look at the pgf/tikz package. But as far as I know, it doesn't provide the feature of writing text on a path. On the other side it creates both PS and PDF output.


Best regards an welcome on Board
Thorsten
Attachments
latex--pst-pdf--pdf.zip
The build profile "LaTeX => pst-pdf => PDF" to use PSTricks with pdflatex in TeXnicCenter. Path adaptation required.
(853 Bytes) Downloaded 839 times
Last edited by localghost on Tue Feb 19, 2008 10:36 pm, edited 1 time in total.
Davmate
Posts: 3
Joined: Sun Dec 16, 2007 8:05 pm

Re: Problems with pstricks :S

Post by Davmate »

Hallo!!! :D You're really kind!! I'm going to tell you what I have done: I've downloaded pst-pdf package and I've intalled it as usual and using MiKTeX I've used "refresh now" to make it work. Now, I've understood by your instructions that I have to define a new profile "LaTeX--pst-pdf--pdf" using latex--pst-pdf--pdf attachment you have send me. But...in order to be honest...I have no idea of how define it :oops: I speak spanish, english and french, but that's worst than chinese!! :cry: If you can help me a little more, you'll save a life!!! I'll be thankfull absolutely!!!

Thanks for everything in advanced!! tschüss!!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Problems with pstricks :S

Post by localghost »

Davmate wrote: […] Now, I've understood by your instructions that I have to define a new profile "LaTeX--pst-pdf--pdf" using latex--pst-pdf--pdf attachment you have send me. But...in order to be honest...I have no idea of how define it […]

You have nothing to define by yourself. I did the definition already. All you have to do is just to import that profile in TeXnicCenter. We will do that now step by step.
  1. Unzip the archive from the attachment above. As result you will get a file with the ending TCO.
  2. Start TeXnicCenter and go to the menu Build -> Define Output Profiles or press Alt+F7.
  3. You will see a dialogue window as shown in the pictures I put into the attachment. Just do a click on "Import" and navigate to the directory with the unpacked profile.
  4. Adapt the paths to all required binaries. Be very careful in doing that. Otherwise this profile won't work.
For further information about processing with pst-pdf refer to its documentation. Note that processing with this profile will take a little bit more time caused by the additional steps.
Attachments
(La)TeX tab of the build profile "LaTeX => pst-pdf => PDF"
(La)TeX tab of the build profile "LaTeX => pst-pdf => PDF"
profile01.png (17.72 KiB) Viewed 10856 times
Postprocessor tab of the build profile "LaTeX => pst-pdf => PDF"
Postprocessor tab of the build profile "LaTeX => pst-pdf => PDF"
profile02.png (13.2 KiB) Viewed 10854 times
Viewer tab of the build profile "LaTeX => pst-pdf => PDF"
Viewer tab of the build profile "LaTeX => pst-pdf => PDF"
profile03.png (17.66 KiB) Viewed 10847 times
Last edited by localghost on Tue Feb 19, 2008 10:35 pm, edited 2 times in total.
Davmate
Posts: 3
Joined: Sun Dec 16, 2007 8:05 pm

Re: Problems with pstricks :S

Post by Davmate »

THANK YOU!!! I'l make it as soon as possible. I thank you for your generosity. Have a nice day!!

From Bogotá: David
Post Reply