Document ClassesTeXnicCenter using PSTricks package

Information and discussion about specific document classes and how to create your own document classes.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

TeXnicCenter using PSTricks package

Post by localghost »

I can't comprehend your problem. Your code works fine for me. Add a command in the very first line of your code and post the list of used files from the LOG file here.

Code: Select all

\listfiles
\documentclass[12pt]{article}
\usepackage{pstricks}

\begin{document}
  \psset{unit=1mm}
  \pscircle(0,0){10}
\end{document}
Seems that something is corrupted in your LateX system. Try to reinstall it, but don't forget to choose the option "Tidy up thoroughly" when removing MiKTeX. Use the current Basic MiKTeX Installer or MiKTeX Net Installer (both Version 2.6.2742).
Last edited by localghost on Thu Aug 30, 2007 8:19 pm, edited 1 time in total.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
laurenmalone
Posts: 4
Joined: Tue Aug 28, 2007 4:11 pm

Re: TeXnicCenter using PSTricks package

Post by laurenmalone »

For some reason you cannot get PS output when compiling from Latex directly to PDF. I am using PS tricks as well, was using Texnic Center, and had to switch to Winedt to avoid this problem. There you can compile first from DVI to PS, then from PS to PDF. This resolved the problem for me.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

TeXnicCenter using PSTricks package

Post by localghost »

laurenmalone wrote: For some reason you cannot get PS output when compiling from Latex directly to PDF. I am using PS tricks as well, was using Texnic Center, and had to switch to Winedt to avoid this problem. There you can compile first from DVI to PS, then from PS to PDF. This resolved the problem for me.

That can also be done with TeXnicCenter using the "LaTeX => PS => PDF" build profile. If it is not generated automatically, you can get from here.

The reason for PSTricks (Postscript Tricks) not being usable with pdflatex is that PSTricks uses postscript commands to generate the graphics elements, which can not be understood by pdflatex.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
User avatar
Bama Gambler
Posts: 13
Joined: Wed Aug 29, 2007 10:58 pm

TeXnicCenter using PSTricks package

Post by Bama Gambler »

localghost wrote: I can't comprehend your problem. Your code works fine for me. Add a command in the very first line of your code and post the list of used files from the LOG file here.

Code: Select all

\listfiles
\documentclass[12pt]{article}
\usepackage{pstricks}

\begin{document}
  \psset{unit=1mm}
  \pscircle(0,0){10}
\end{document}
Seems that something is corrupted in your LateX system. Try to reinstall it, but don't forget to choose the option "Tidy up thoroughly" when removing MiKTeX. Use the current Basic MiKTeX Installer or MiKTeX Net Installer (both Version 2.6.2742).
*File List*
article.cls 2005/09/16 v1.4f Standard LaTeX document class
size12.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
pstricks.sty 2006/08/10 v0.32 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

TeXnicCenter using PSTricks package

Post by localghost »

Nothing unusual. Must be a system failure. I suggest to reinstall as described above.


Supplement:
I noticed something strange in your log file.

Code: Select all

This is pdfTeX, Version 3.141592-1.40.4 (MiKTeX 2.6) (preloaded format=pdflatex 2007.7.13)  30 AUG 2007 13:27
In my log file, this first line looks a little bit different.

Code: Select all

This is pdfTeX, Version 3.141592-1.40.4 (MiKTeX 2.6)
I don't know where the additional text in the brackets comes from.


Supplement II:
I once more read your log file, but this time more carefully. And I noticed another possible source of error.

Code: Select all

"C:\Documents and Settings\Compaq_Administrator\My Documents\LaTeX\test.tex"
Avoid characters like "_" in your file paths. This is reserved for subscript in math mode. I'm not sure if this will solve your problem.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
User avatar
Bama Gambler
Posts: 13
Joined: Wed Aug 29, 2007 10:58 pm

TeXnicCenter using PSTricks package

Post by Bama Gambler »

localghost wrote: "C:\Documents and Settings\Compaq_Administrator\My Documents\LaTeX\test.tex"[/code]
Avoid characters like "_" in your file paths. This is reserved for subscript in math mode. I'm not sure if this will solve your problem.
DING! DING! We have a winner.

I'm confused why this doesn't cause problems with other TeX files. Only when I try to use pstricks. Oh well. Thanks for all your help!! :mrgreen:
yateleybob
Posts: 9
Joined: Mon Jul 09, 2007 1:46 pm

Re: TeXnicCenter using PSTricks package

Post by yateleybob »

I cannot get your test file to compile at the command line using TeXLive 2007 (March 2007) version of all packages.

I have no trouble at all using pstricks with TeXNicCenter and going via PS. This is logical as other postings have indicated because pstricks is designed for use with PS. Conversion after (LaTeX=>PS=>PDF) is more robust.

Since changing output profiles is so easy in TXC, I wonder why is it so important to have pstricks working with pdflatex?

========
BTW On another matter, MikTeX's decision to install under Program Files (a path with a space) by default was probably not very good and ought to be fixed.
yateleybob
Posts: 9
Joined: Mon Jul 09, 2007 1:46 pm

Re: TeXnicCenter using PSTricks package

Post by yateleybob »

Have now RTFM which I should have done to begin with; I now understand the error message that I was getting. The pdftricks package is a hack, an elegant hack, but still a hack. Maybe if I enable shell escapes I'll be able to compile a simple test.

Perhaps the MikTeX build has shell escapes enabled by default; TeXLive doesn't and as shell escapes may be a security risk on some platforms, enabling them should be done with care.

As the route via PS is there I still can't see the point of pdftricks. You can have pdf output with pstricks pictures easily enough.
jjt3
Posts: 9
Joined: Fri Jan 26, 2007 3:04 pm

Re: TeXnicCenter using PSTricks package

Post by jjt3 »

dvi does not support specials that are associated with pstricks.

Is your build profile include `pdflatex'. If so then there is your error; you need to compile the tex file to a dvi file, then convert it to a ps using dvips, and then convert that to a pdf file in GSview, or using ps2pdf14.bat which should be in . . . \bin\win32\

John
Post Reply