GeneralPSTricks + auto-pst-pdf and TeXnicCenter

General information and discussion about TeXnicCenter
Enedrox
Posts: 8
Joined: Mon Mar 07, 2011 6:23 am

PSTricks + auto-pst-pdf and TeXnicCenter

Post by Enedrox »

I have tried searching the forums and most of the comments relating to PSTricks and pdf simply state that PSTricks does not work with pdflatex. However, on the PSTricks website, they explain
If you are using packages which works only with pdflatex or want to insert png- or jpg-images, then use the package auto-pst-pdf and you can run pdflatex with PSTricks related code.
Now, as to my problem (which is probably quite simple). When I try and compile my file, which includes a .tex file generated by InkScape's export with PSTricks feature, I get this notice:

Code: Select all

File `L_notes-pics.pdf' not found.
Use the following commands to create it:
-------------------------------------------------
latex L_notes.tex
dvips -o L_notes-pics.ps L_notes.dvi
ps2pdf L_notes-pics.ps
-------------------------------------------------
My main file is called "L_notes.tex", and what I would like to know, is whether it would be possible to create a new output profile in Texniccenter which would execute these functions automatically.

Thanks!

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 + auto-pst-pdf and TeXnicCenter

Post by localghost »

Probably you just need to enable shell escape (for MiKTeX --enable-write18) as seen in the attachment.


Thorsten
Attachments
TXC2a3 Profiles dialogue window with the settings for the compiler engine.
TXC2a3 Profiles dialogue window with the settings for the compiler engine.
TXC2alpha3-Profiles.png (49.16 KiB) Viewed 12255 times
Enedrox
Posts: 8
Joined: Mon Mar 07, 2011 6:23 am

Re: PSTricks + auto-pst-pdf and TeXnicCenter

Post by Enedrox »

I guess I probably should've mentioned that "--enable-write18" was already added to the arguments, yet I still get this error.
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

Re: PSTricks + auto-pst-pdf and TeXnicCenter

Post by latexhelp1 »

What is the difference between all of these latex => pdf options (like with mod)? I'm so confused. I cannot figure out how to make the pstricks I'm writing actually display although it compiles, and I've read everything on the web that I could find :(
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

PSTricks + auto-pst-pdf and TeXnicCenter

Post by localghost »

latexhelp1 wrote:What is the difference between all of these latex => pdf options (like with mod)? I'm so confused. I cannot figure out how to make the pstricks I'm writing actually display although it compiles, and I've read everything on the web that I could find :(
Don't pay too many attention to it. These are just some output profiles I modified for my own needs.
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

Re: PSTricks + auto-pst-pdf and TeXnicCenter

Post by latexhelp1 »

So, are you saying that I should copy the settings under the mod? Exactly like that? Are there any settings under the other two sections: viewer, postprocessor?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

PSTricks + auto-pst-pdf and TeXnicCenter

Post by localghost »

latexhelp1 wrote:So, are you saying that I should copy the settings under the mod? Exactly like that? Are there any settings under the other two sections: viewer, postprocessor?
Take those settings, enter them into the profile and compile. No settings necessary in the other tabs.
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

PSTricks + auto-pst-pdf and TeXnicCenter

Post by latexhelp1 »

What is happening is that the pstricks component of the program comes up in a separate file than the other part of the latex code. That is, in the following code (which I borrowed from one of these forums to get started), I get one file that looks like normal beamer output only with the text item 1 and item 1. The other file contains the pstricks flow chart where it should be, albeit in an incredibly tiny font.

I call the file test. I get test.pdf with the beamer part and test-autopp.pdf with the pstricks flow chart.

Code: Select all

    \documentclass{beamer}

    \usepackage{pstricks}
    \usepackage{pst-tree}
    \usepackage{auto-pst-pdf}
    \beamerdefaultoverlayspecification{<+->}
    \setbeamercovered{transparent=25}

    \begin{document}

    \begin{frame}
    \frametitle{Sentence}
    \begin{itemize}
    \item item 1
    \item item 2
    \end{itemize}

    \onslide<+->
    \begin{center}
        \psset{nodesep=3pt,levelsep=8mm}
        \pstree{\TR{S}}{%
            \pstree{\TR{NP}}{%
                \pstree{\TR{A}}{%
                    \TR{Small} 
                }
                \pstree{\TR{N}}{%
                    \TR{John} 
                }
            }
            \pstree{\TR{VP}}{%
                \pstree{\TR{VP}}{%
                    \pstree{\TR{V}}{%
                        \TR{came}
                    }
                }
                \pstree{\TR{ADV}}{%
                    \TR{home}
                }
            }
        }
    \end{center}
    \end{frame}

    \end{document}
Last edited by Stefan Kottwitz on Sun Jun 12, 2011 9:05 pm, edited 1 time in total.
latexhelp1
Posts: 141
Joined: Sun Jun 12, 2011 6:30 am

Re: PSTricks + auto-pst-pdf and TeXnicCenter

Post by latexhelp1 »

Moreover, I cannot get the program to compile with the pdf (mod) setting. I can only get it to compile with the autopdf, albeit in 2 separate files.

I am not sure if I am reading it correctly. This is what I'm seeing if I try to use the pdf mod with: "%tm.idx" -o "%tm.ind"

pdflatex.exe: invalid command-line option
pdflatex.exe: data: unknown option
Input index file Text.idx not found.
Usage: C:\Program Files\MiKTeX 2.8\miktex\bin\makeindex.exe [-ilqrcgLT] [-s sty] [-o ind] [-t log] [-p num] [idxO idx1 ...]
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

PSTricks + auto-pst-pdf and TeXnicCenter

Post by CrazyHorse »

latexhelp1 wrote:Moreover, I cannot get the program to compile with the pdf (mod) setting. I can only get it to compile with the autopdf, albeit in 2 separate files.

I am not sure if I am reading it correctly. This is what I'm seeing if I try to use the pdf mod with: "%tm.idx" -o "%tm.ind"

pdflatex.exe: invalid command-line option
pdflatex.exe: data: unknown option
Input index file Text.idx not found.
Usage: C:\Program Files\MiKTeX 2.8\miktex\bin\makeindex.exe [-ilqrcgLT] [-s sty] [-o ind] [-t log] [-p num] [idxO idx1 ...]
that example makes only sense without auto-pst-pdf and the sequence

latex->dvips->ps2pdf

or alternetively running

xelatex file

which is the easiest way to get the \setbeamercovered working ...

Herbert
Post Reply