Re: Problem with PSTricks using MikTex 2.9
Jean Hare <[email protected]>
| Newsgroups | gmane.comp.tex.miktex |
|---|---|
| Organization | LKB-ENS-UPMC-CNRS |
| Message-ID | <[email protected]> |
Hello Bruce,
Thank you for this detailed report. I don't use PSTricks (i prefer Tikz)
nor Windows 10 and no longer use WinEdt (but used it for 10 years).
Nevertheless the error messages you get suggest two kinds of problems :
1) WinEdt config :
Your WindEdt config is broken and is set to use a weird combination of
MiKTeX tools and those of PCTeX.
In this case, as the config edition is a rather elaborated task, the
best solution would be to completly uninstall WinEdt and all its
settings (including those stored in Application Data in yours user
folder) and reinstall it.
2) PATH problem:
Your Winedt likely use short commands like latex <file> or dvips
<file> instead of fully qualifyed
C:\PROGRA~2\MiKTeX 2.9\miktex\bin\latex.exe <file> or so.
This is not a problem if you have a single tex distribution on your
computer and the path
C:\PROGRA~2\MiKTeX 2.9\miktex\bin in your PATH environment variable.
but could lead to strange result in the present case.
a) The best solution would be to edit your PATH to put MiKTeX's path
_before_ PCTeX one.
This seteing can be done by using Commuter>Properties>Advanced>
Environment variables.
b) If you want to continue to be able to use PCTeX without trouble,
there is a workaround :
AFAIK, winedt can also be set to use custom latex.bat and others
(*.bat) installed in its directory,
and then the path could be locally set by using the command :
set path= C:\PROGRA~2\MiKTeX 2.9\miktex\bin;%path% (notice the
semicolon)
before the call to latex.exe
By the way,
- if you prefer to directly use PSPSTricks _and_ pdflatex have a look
to the specific package :
http://tex.stackexchange.com/questions/8413/how-to-use-pstricks-in-pdflatex
- if you experience compile/convert problems with Adone Reader which
blocks the recreation of the opened file
you could easily switch to SumatraPDF as explained on
http://william.famille-blum.org/software/sumatra/
Regards,
Jean
Le 05/11/2016 à 01:04, Bruce Allison a écrit :
> Hello,
> Thanks for all for the good suggestions regarding getting my pstricks
> commands to compile in WinEdt 6/MikTex 2.9 (under Windows 10) and
> produce a pdf file. (See earlier posts for the exact commands). Here
> is an update on the success of the various suggestions:
>
> Suggestion 1. Compile using the sequence latex, dvips, ps2pdf from
> the menu in WinEdt.
> Result: Latex works (now that I have changed the dvi rendering method)
> and produces a correct dvi file. Then dvips produces an error
> message (Cannot run C:\Program~2\PCTex\PCTexv6\pctex6.exe
> “My_path\Test_diagram.ps”), but also a ps file. Finally, ps2pdf
> produces an error message (Cannot run “C:\Program Files
> (x86)\Adobe\Reader 9.0\Reader\AcroRd32” “My_path\Test_diagram.pdf”),
> but also a correct pdf file. The same thing happens when I compile my
> full article (which contains 30 more complex pstricks diagrams). So,
> if I am not bothered by the error messages, all appears to be is well.
>
> Suggestion 2: Add two lines at the beginning of the file (see Jerzy’s
> post), and compile using xelatex.
> Result: This doesn’t work for me. MikTex reports that “Sorry, but
> xelatex did not succeed” and that “XeLatex failed to product a pdf
> file”. The last line in the log file is “\pst@toks=\toks25”.
>
> Suggestion 3: Rewrite the code using tikx instead of pstricks (see
> Ulrike’s post), and compile using pdflatex.
> Result: Pdflatex produces an error message (the same as the 2nd one
> written under Suggestion 1), but also a correct pdf file. So, again
> except for error message, all appears to be well.
>
> Nevertheless, the error messages bother me. Since the above methods
> work for others, I think now that the problem may be in my
> installation of Tex software on my computer. For example, I also have
> PCTex installed on my system, which might explain somehow the error
> message produced by dvips. I will try doing a new installation of
> WinEdt/MikTex) on my laptop (without PCTex installed), and see if that
> helps.
>
> However, if you see anything that I am missing, please let me know.
> Bruce
>
>
> On 2016-11-02 10:27 AM, Ulrike Fischer wrote:
>> Am Tue, 1 Nov 2016 23:08:34 -0600 schrieb Bruce Allison:
>>
>>> However, I still need to obtain a pdf file, and nothing I have tried
>>> has
>>> worked in WinEdt/MikTex (e.g. pdflatex or dvi2pdf).
>> postscript needs a postscript interpreter.
>>
>> So you need to run
>>
>> latex
>> dvips
>> ps2pdf
>>
>> All three tools have menu entries in winedt.
>>
>> The alternative is xelatex.
>>
>> Or you drop pstricks and use tikz instead, then you can compile with
>> pdflatex directly:
>>
>> \documentclass{article}
>> \usepackage{tikz}
>> \begin{document}
>> \begin{tikzpicture}
>> \draw(0,0)--(4,0);
>> \draw(2,0)--(2,1);
>> \end{tikzpicture}
>> \end{document}
>>
>>
>
>
--
Jean Hare
Professeur Université Pierre et Marie Curie
* Laboratoire Kastler Brossel - ENS-UPMC-CdF-CNRS
24 rue Lhomond 75005 Paris - Bureau GH121
Tel/Fax : +33 1 4432 3423 / 3434
* Ex-Dir-Adjoint et Webmaster de l'EDPIF https://www.edpif.org
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Q: How can I leave the mailing list?
A: See http://docs.miktex.org/faq/support.html#leavingml