LaTeX forum ⇒ Document ClassesProblems with pstricks :S

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

Problems with pstricks :S

Postby Davmate » Mon Dec 17, 2007 3:59 am

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:

  1. \documentclass{article}
  2. \usepackage{pst-all}
  3. \usepackage{pstcol}
  4. \begin{document}
  5. \begin{center}
  6. \psset{unit=3.5cm,linecolor=lightgray}
  7. \begin{pspicture}(-1.5,-1)(1.5,0)
  8. \pstextpath[c]{\pscurve(-1.41,0)(-1,-1)(0,0)(1,-1)(1.41,0)
  9. {\color{blue}\large Esta frase sinuosa y peculiar est\'a escrita a lo largo de la curva $y=x^4-2x^2$}
  10. \end{pspicture}
  11. \end{center}
  12. \end{document}


I've tried and it doesn't work Shocked . It says there are 30 mistakes and I can't make it run Crying or Very sad . 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 Wink .,

Thanks in advanced =)

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Mon Dec 17, 2007 10:17 am

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.
  1. \documentclass{article}
  2. \usepackage{pst-pdf,pst-text,pstricks-add}
  3.  
  4. \begin{document}
  5. \begin{center}
  6. \psset{linecolor=lightgray}
  7. \begin{pspicture}[showgrid=true](-5,-3)(5,3)
  8. \pstextpath[c]{\pscurve(-5,0)(-2.5,-2)(0,2)(2.5,-2)(5,0)}
  9. {\color{blue}\large Esta frase sinuosa y peculiar est\'a escrita a lo largo de la curva $y=x^4-2x^2$}
  10. \end{pspicture}
  11. \end{center}
  12. \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 663 times
Last edited by localghost on Tue Feb 19, 2008 10:36 pm, edited 1 time in total.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Davmate
Posts: 3
Joined: Sun Dec 16, 2007 8:05 pm

Postby Davmate » Mon Dec 17, 2007 8:27 pm

Hallo!!! Very Happy 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 Embarassed I speak spanish, english and french, but that's worst than chinese!! Crying or Very sad 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: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Tue Dec 18, 2007 9:27 pm

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
profile01.png
(La)TeX tab of the build profile "LaTeX => pst-pdf => PDF"
profile01.png (17.72 KiB) Viewed 7798 times
profile02.png
Postprocessor tab of the build profile "LaTeX => pst-pdf => PDF"
profile02.png (13.2 KiB) Viewed 7796 times
profile03.png
Viewer tab of the build profile "LaTeX => pst-pdf => PDF"
profile03.png (17.66 KiB) Viewed 7789 times
Last edited by localghost on Tue Feb 19, 2008 10:35 pm, edited 2 times in total.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Davmate
Posts: 3
Joined: Sun Dec 16, 2007 8:05 pm

Postby Davmate » Wed Dec 19, 2007 4:35 am

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

From Bogotá: David


Return to “Document Classes”

Who is online

Users browsing this forum: No registered users and 4 guests