GeneralPSTricks with PDF Output in TeXnicCenter

General information and discussion about TeXnicCenter
Post Reply
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

PSTricks with PDF Output in TeXnicCenter

Post by latexhelp1 »

In plain english, step-by-step, how do you do this in TeXnic Center? I have read every pstricks website I can find, and I cannot find any clear directions on how to implement this in a language that I can understand.

However, I did manage to understand some directions somewhere for auto-pst-pdf => pdf, which does compile the file at hand. However, it just doesn't display any of the pstricks. That is, the text displays, just no pstricks. :( Now, I'm not married to auto-pst-pdf => pdf; I just want any method that I can implement in plain english.

I use the following packages:

Code: Select all

    \documentclass{beamer}

    \usepackage{pstricks}
    \usepackage{pst-tree}
    \usepackage{auto-pst-pdf}
    \beamerdefaultoverlayspecification{<+->}
    \setbeamercovered{transparent=25}
My alt-F7 profile reads:
Latex Path -
C:\Program Files\MiKTeX 2.8\miktex\bin\pdflatex.exe
--src -interaction=nonstopmode -max-print-line=120 --enable-write18 "%Wm"

Postprocessor -
(blank)

Viewer path-
C:\PROGRAM FILES\ADOBE\ACROBAT 9.0\ACROBAT\ACROBAT.EXE


Please let me know whether there is any further information about my computer I should provide! I really appreciate any help you can provide. :)

Thank you so much!! :) :) :)
Last edited by localghost on Sun Jun 12, 2011 6:16 pm, edited 2 times in total.

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

PSTricks with PDF Output in TeXnicCenter

Post by localghost »

latexhelp1 wrote:[…] I have read every pstricks website I can find, and I cannot find any clear directions on how to implement this in a language that I can understand. […]
Actually the PSTricks project page is quite clear in this regard [1]. There are several suggestions for obtaining PDF output with PSTricks.
latexhelp1 wrote:[…] However, I did manage to understand some directions somewhere for auto-pst-pdf => pdf, which does compile the file at hand. However, it just doesn't display any of the pstricks. That is, the text displays, just no pstricks. :( Now, I'm not married to auto-pst-pdf => pdf; I just want any method that I can implement in plain english. […]
The pst-pdf manual should give you valuable hints. Further more a forum search should yield appropriate results. I remember that we have discussed several similar problem here.

The main part is to activate shell escape for the compiler. On MiKTeX this is done with '--enable-write18' as additional command line parameter (see attachment). For testing purpose try this example from the pstricks-add manual.

Code: Select all

\documentclass{minimal}
\usepackage{pstricks-add}
\usepackage{auto-pst-pdf}

\begin{document}
  \psset{unit=1.5}
  \begin{pspicture}(-3,-3)(3,3)
    \psChart[%
      userColor={red!30,green!30,blue!40,gray,cyan!50,magenta!60,cyan},
      chartSep=30pt,
      shadow=true,
      shadowsize=5pt
    ]{34.5,17.2,20.7,15.5,5.2,6.9}{6}{2}
    \psset{nodesepA=5pt,nodesepB=-10pt}
    \ncline{psChartO1}{psChart1}\nput{0}{psChartO1}{1000 (34.5\%)}
    \ncline{psChartO2}{psChart2}\nput{150}{psChartO2}{500 (17.2\%)}
    \ncline{psChartO3}{psChart3}\nput{-90}{psChartO3}{600 (20.7\%)}
    \ncline{psChartO4}{psChart4}\nput{0}{psChartO4}{450 (15.5\%)}
    \ncline{psChartO5}{psChart5}\nput{0}{psChartO5}{150 (5.2\%)}
    \ncline{psChartO6}{psChart6}\nput{0}{psChartO6}{200 (6.9\%)}
    \bfseries%
    \rput(psChartI1){Taxes}\rput(psChartI2){Rent}\rput(psChartI3){Bills}
    \rput(psChartI4){Car}\rput(psChartI5){Gas}\rput(psChartI6){Food}
  \end{pspicture}
\end{document}
This works for me with the compiler settings in TeXnicCenter (TXC) as seen in the attachment. You can also try to run XeLaTeX on the code. The PDFLaTeX method will need Ghostscript installed. It will be used in the background for some conversion jobs.

[1] /PSTricks/pdf/pfdoutput


Best regards and welcome to the board
Thorsten
Attachments
Command line options for the compiler in TXC.
Command line options for the compiler in TXC.
TXC2alpha3-Compiler-CommandLine.png (49.62 KiB) Viewed 8737 times
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

Re: PSTricks with PDF Output in TeXnicCenter

Post by latexhelp1 »

Thank you thank you thank you! I have read the boards and the websites a 100 times -- I promise! And now I think ghostview is my problem! I downloaded it version 9 something from the wisconsin website, but I cannot find the .exe in the zip file. I don't know what to do, can I cannot find any plain english directions that walk me through the rest. Do you have any suggestions?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

PSTricks with PDF Output in TeXnicCenter

Post by localghost »

latexhelp1 wrote:Thank you thank you thank you! I have read the boards and the websites a 100 times -- I promise! And now I think ghostview is my problem! I downloaded it version 9 something from the wisconsin website, but I cannot find the .exe in the zip file. I don't know what to do, can I cannot find any plain english directions that walk me through the rest. Do you have any suggestions?
The page behind the link to Ghostscript in my last reply provides Windows installers as executables. So I can't comprehend the problem.
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

Re: PSTricks with PDF Output in TeXnicCenter

Post by latexhelp1 »

Hi, thank you so much for responding back!

I do not understand what you mean by "the page behind."
I did find this link though: http://downloads.ghostscript.com/public/

I have no idea what to download from there.
Should I download: gs902w64.exe? Anything else??

I'm sorry. I just mean step by step by step, I am not at all following the pstricks information. I promise I'm really good at latex and beamer otherwise!!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

PSTricks with PDF Output in TeXnicCenter

Post by localghost »

latexhelp1 wrote:[…] I do not understand what you mean by "the page behind."
I did find this link though: http://downloads.ghostscript.com/public/ […]
Obviously you have found the page I meant.
latexhelp1 wrote:[…] I have no idea what to download from there.
Should I download: gs902w64.exe? Anything else?? […]
How would I know? I don't know your OS (that's a short form for operating system). There should also be an installer for a 32bit Wind0ws OS.
latexhelp1 wrote:[…] I'm sorry. I just mean step by step by step, I am not at all following the pstricks information. […]
Where is the problem in doing a simple software installation? Sorry, but I'm not here to teach you how to handle your OS. And if you didn't notice yet, Wind0ws is not my primary OS.
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

Re: PSTricks with PDF Output in TeXnicCenter

Post by latexhelp1 »

I'm sorry for all of my questions, I'm just being pedantic because I still cannot get my output to work. As I mentioned, it compiles in 2 separate files: the normal beamer stuff in one fie and the pstricks in another. I am concerned it is because I am not downloading the right stuff from GS. I just want to confirm whether I need anything else, in addition to that .exe. There were a whole lot of other files on that link, most of which were not an .exe but instead a .zip. I just wanted to diagnose what could possibly be the problem, whether it is an issue with the GS that I've downloaded, the usepackages that I'm using or how I'm compiling (e.g., autops).

I would very much appreciate any help you could provide. I believe I'm already attached my code. I just don't know what to do.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: PSTricks with PDF Output in TeXnicCenter

Post by localghost »

You should start with compiling the sample code I provided earlier. So you can test if something is wrong in your setup. If my example doesn't work for you, this is an evidence for an erroneous setup of your editor. Hence we will continue to work on this first. We can only solve one problem after the other. But at the moment we don't know for sure were the problem really is. We have to proceed systematically.

So, take my example, compile it and in case of errors attach the log file to your next post by uploading it to the forum server. This would allow a first diagnose of what might go wrong.

Let's hope that in the meantime you have managed to install Ghostscript correctly. The only interesting files on that page for you are the executables (*.exe). Don't pay any attention to the others.
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

Re: PSTricks with PDF Output in TeXnicCenter

Post by latexhelp1 »

Thank you so much for posting the sample code. I am really sorry. I did not understand your intention was for me to use it. I am very sorry.

I have run it twice:
1. I first use latex => pdf (mod):
C:\Program Files\MiKTeX 2.8\miktex\bin\pdflatex.exe
-synctex=-1 --enable-write18 -interaction=nonstopmode -max-print-

C:\Program Files\MiKTeX 2.8\miktex\bin\makeindex.exe
"%tm.idx" -o "%tm.ind"

When I do that, the program will not at all compile. It says:

pdflatex.exe: Invalid command-line option
pdflatex.exe: Data: unknown option
Input index file Test.idx not found.

2. HOWEVER, if I run it with the auto-pst-pdf, I get 2 errors, and I get 2 log files. I am attaching them both.
My setting is :
Latex compiler
C:\Program Files\MiKTeX 2.8\miktex\bin\pdflatex.exe
--src -interaction=nonstopmode -max-print-line=120 --enable-write18 "%Wm"

Makeindex-
C:\Program Files\MiKTeX 2.8\miktex\bin\makeindex.exe
-s personal.ist -g "%bm"


I very much appreciate your help.

P.S. Please ignore the following comment if it is a distraction or tangent. I have read about setting up latex->dvips->ps2pdf or xelatex. However, I did not understand what I read. I thus set up the auto-pst-pdf when the pdf (mod) that was recommended was not working.
Attachments
Test-autopp.log
(10.16 KiB) Downloaded 289 times
Test.log
(11.28 KiB) Downloaded 439 times
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

Re: PSTricks with PDF Output in TeXnicCenter

Post by latexhelp1 »

I have managed to fix the problem. I am wondering if you have sample beamer code that I could also try out?
Post Reply