[OS X TeX] Every Other Tick in PSTrick

Maurino P. Bautista, Ph.D. maobautista at gmail.com
Thu Jun 11 16:14:45 CEST 2009


Thanks to Herb and Michael. Both suggestions work. In Herb's case, it  
worked even without the first line:

> %%!TEX TS-program = pdftricksmk

However, I prefer Michael's solution because it generates one less  
file. I look forward to the new package PSTOOL which supersedes the  
auto-pst-pdf package in order to process postscript commands with  
pdfLaTeX. I now have reasons for learning pstricks to do some of my  
future math plots!

Mao


On Jun 10, 2009, at 3:00 PM, <macosx-tex-request at email.esm.psu.edu> <macosx-tex-request at email.esm.psu.edu 
 > wrote:

> Send MacOSX-TeX mailing list submissions to
> 	macosx-tex at email.esm.psu.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://email.esm.psu.edu/mailman/listinfo/macosx-tex
> or, via email, send a message with subject or body 'help' to
> 	macosx-tex-request at email.esm.psu.edu
>
> You can reach the person managing the list at
> 	macosx-tex-owner at email.esm.psu.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of MacOSX-TeX digest..."
>
>
> Today's Topics:
>
>   1. Every Other Tick in PSTricks (Maurino P. Bautista, Ph.D.)
>   2. Re: Every Other Tick in PSTricks (Herbert Schulz)
>   3. Re: Every Other Tick in PSTricks (Michael Hoppe)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 9 Jun 2009 14:35:27 -0400
> From: "Maurino P. Bautista, Ph.D." <maobautista at gmail.com>
> Subject: [OS X TeX] Every Other Tick in PSTricks
> To: macosx-tex at email.esm.psu.edu
> Message-ID: <9640DBEC-8FD4-4E15-8EC7-0850AFA939AF at gmail.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> I have OS X 10.5.7, TeXShop 2.26, TeX Live 2008 with all the updates
> via TeX Live Utility Manager. If I typeset the code below using TeX
> and DVI, I get the right figure:
>
> \documentclass{minimal}
> \usepackage{pstricks-add}
>
> \listfiles
>
> \begin{document}
>
> \centering
>
> \begin{pspicture}(-1,-1)(6,6)
> \psaxes[showOriginTick=false,showorigin=false,Dx=2,Dy=2,subticks=2] 
> (6,6)
> \end{pspicture}
>
> \end{document}
>
> But if I typeset it using Pdftex, which is my default setting, I get
> the error message:
>
> ....
> [Loading MPS to PDF converter (version 2006.09.02).]
> )
> ! Undefined control sequence.
> <recently read> \c at lor@to at ps
>
> 1.12 \end
>                  {pspicture}
> ?
> .....
>
> I understand that the high level PostScript commands generated by
> pstricks are unknown to pdfTeX. A while back, I believe Herb wrote the
> following code that used to work for me but now generates no output
> and no error messages either:
>
> \documentclass{minimal}
>
> \usepackage{ifpdf}
> \ifpdf%
>   \usepackage{pdftricks}
>   \begin{psinputs}
>     \usepackage{pstricks}
> 	 \usepackage{pst-plot}
>   \end{psinputs}
> \else
>   \usepackage{pstricks}
>   \usepackage{pst-plot}
>   \newenvironment{pdfpic}{}{}
> \fi
>
> \begin{pdfpic}
>
> ....INSERT pspicture environment here....
>
> \end{pdfpic}
> \end{document}
>
> The idea I think is to detect if one is using pdfTeX and switch to
> pdftricks to allow pstricks commands to be used. Any ideas on how to
> fix the above code?
>
> Maurino P. Bautista, Ph.D.
> Professor of Mathematics
> maobautista at gmail.com
>
>
> On Jun 1, 2009, at 3:00 PM, <macosx-tex-request at email.esm.psu.edu> <macosx-tex-request at email.esm.psu.edu
>> wrote:
>
>> Message: 2
>> Date: Mon, 1 Jun 2009 08:16:17 -0700
>> From: David Arnold <dwarnold45 at suddenlink.net>
>> Subject: [OS X TeX] Every Other Tick in PSTricks
>> To: MacOSX-TeX <MacOSX-TeX at email.esm.psu.edu>
>> Message-ID: <AD89DDB2-BBC8-499D-80C1-1A0B5087ABB2 at suddenlink.net>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> All, Consider the following code:
>>
>> \documentclass{minimal}
>> \usepackage{pstricks-add}
>>
>> \listfiles
>>
>> \begin{document}
>>
>> \begin{pspicture}(-1,-1)(6,6)
>> \psaxes[showOriginTick=false,showorigin=false,Dx=2,Dy=2,subticks=2]
>> (6,6)
>> \end{pspicture}
>>
>> \end{document}
>>
>> When I run this in Texshop 2.20, I get this image;
>>
>> -------------- next part --------------
>> A non-text attachment was scrubbed...
>> Name: pastedGraphic.tiff
>> Type: image/tiff
>> Size: 6266 bytes
>> Desc: not available
>> Url : http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20090601/9383577a/pastedGraphic-0002.tiff
>> -------------- next part --------------
>>
>>
>> When I compile in the terminal with latex->dvips->ps2pdf, I get the
>> correct image which looks like this:
>>
>> -------------- next part --------------
>> A non-text attachment was scrubbed...
>> Name: pastedGraphic.tiff
>> Type: image/tiff
>> Size: 6298 bytes
>> Desc: not available
>> Url : http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20090601/9383577a/pastedGraphic-0003.tiff
>> -------------- next part --------------
>>
>>
>> Indeed, when I drag the first image from Texshop's previewer and drop
>> it on Acrobat, I also get the second image. Why isn't the first image
>> showing up properly in the Texshop previewer?
>>
>> David.
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Mon, 1 Jun 2009 10:36:52 -0500
>> From: Herbert Schulz <herbs at wideopenwest.com>
>> Subject: Re: [OS X TeX] Every Other Tick in PSTricks
>> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
>> Message-ID: <9DC3BA0D-DD69-48D7-8EA1-514F4465565B at wideopenwest.com>
>> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>>
>>
>> On Jun 1, 2009, at 10:16 AM, David Arnold wrote:
>>
>>> All, Consider the following code:
>>>
>>> \documentclass{minimal}
>>> \usepackage{pstricks-add}
>>>
>>> \listfiles
>>>
>>> \begin{document}
>>>
>>> \begin{pspicture}(-1,-1)(6,6)
>>> \psaxes[showOriginTick=false,showorigin=false,Dx=2,Dy=2,subticks=2]
>>> (6,6)
>>> \end{pspicture}
>>>
>>> \end{document}
>>>
>>> When I run this in Texshop 2.20, I get this image;
>>>
>>> <pastedGraphic.tiff>
>>>
>>> When I compile in the terminal with latex->dvips->ps2pdf, I get the
>>> correct image which looks like this:
>>>
>>> <pastedGraphic.tiff>
>>>
>>> Indeed, when I drag the first image from Texshop's previewer and
>>> drop it on Acrobat, I also get the second image. Why isn't the first
>>> image showing up properly in the Texshop previewer?
>>>
>>> David.
>>
>> Howdy,
>>
>> No problem here with OS X 10.5.7, TeXShop 2.26, MacTeX (TeX Live)  
>> 2008
>> with all updates via TeX Live Utilities (tlmgr).
>>
>> Good Luck,
>>
>> Herb Schulz
>> (herbs at wideopenwest dot com)
>>
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Mon, 1 Jun 2009 17:48:06 +0200
>> From: Daniel Becker <daniel.becker at uni-rostock.de>
>> Subject: Re: [OS X TeX] Every Other Tick in PSTricks
>> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
>> Message-ID: <2B48901B-3B88-476B-8535-A655813A38EB at uni-rostock.de>
>> Content-Type: text/plain; charset="US-ASCII"; format=flowed;  
>> delsp=yes
>>
>>
>> Am 01.06.2009 um 17:36 schrieb Herbert Schulz:
>>
>>> No problem here with OS X 10.5.7, TeXShop 2.26, MacTeX (TeX Live)
>>> 2008
>>> with all updates via TeX Live Utilities (tlmgr).
>>
>> Same here, same setup. The file list I get is:
>>
>> minimal.cls    2001/05/25 Standard LaTeX minimal class
>> pstricks-add.sty    2009/03/17 v. 0.13 package wrapper for pstricks-
>> add.tex (hv)
>> pstricks.sty    2008/11/26 v0.40 LaTeX wrapper for `PSTricks' (RN,HV)
>> pstricks.tex    2009/01/25 v1.27 `PSTricks' (tvz,hv)
>>  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
>>   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
>>   dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
>> pstricks-add.tex    2009/04/29 v3.31 `PSTricks-add' (hv)
>> pst-xkey.tex    2005/11/25 v1.6 PSTricks specialization of xkeyval
>> (HA)
>> xkeyval.sty    2008/08/13 v2.6a package option processing (HA)
>> xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)
>>
>> Daniel
>>
>>
>>
>> ------------------------------
>>
>> Message: 5
>> Date: Mon, 1 Jun 2009 10:59:10 -0500
>> From: Herbert Schulz <herbs at wideopenwest.com>
>> Subject: Re: [OS X TeX] Every Other Tick in PSTricks
>> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
>> Message-ID: <151C883A-E2D3-4B0B-A6DD-45C17DAE7419 at wideopenwest.com>
>> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>>
>>
>> On Jun 1, 2009, at 10:48 AM, Daniel Becker wrote:
>>
>>>
>>> Am 01.06.2009 um 17:36 schrieb Herbert Schulz:
>>>
>>>> No problem here with OS X 10.5.7, TeXShop 2.26, MacTeX (TeX Live)
>>>> 2008
>>>> with all updates via TeX Live Utilities (tlmgr).
>>>
>>> Same here, same setup. The file list I get is:
>>>
>>> minimal.cls    2001/05/25 Standard LaTeX minimal class
>>> pstricks-add.sty    2009/03/17 v. 0.13 package wrapper for pstricks-
>>> add.tex (hv)
>>> pstricks.sty    2008/11/26 v0.40 LaTeX wrapper for  
>>> `PSTricks' (RN,HV)
>>> pstricks.tex    2009/01/25 v1.27 `PSTricks' (tvz,hv)
>>> xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
>>> color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
>>> dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
>>> pstricks-add.tex    2009/04/29 v3.31 `PSTricks-add' (hv)
>>> pst-xkey.tex    2005/11/25 v1.6 PSTricks specialization of xkeyval
>>> (HA)
>>> xkeyval.sty    2008/08/13 v2.6a package option processing (HA)
>>> xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)
>>>
>>> Daniel
>>
>>
>> Howdy,
>>
>> I've got the exact same file list; all the same dates and versions.
>>
>> In your original post you said you were using TeXShop 2.20 while I'm
>> using 2.26.
>>
>> What happens when you open the pdf file in Preview? Those extra ticks
>> are quite thin and I wonder if some anti-aliasing differences between
>> out two system is making the extra ticks disappear.
>>
>> Good Luck,
>>
>> Herb Schulz
>> (herbs at wideopenwest dot com)
>>
>>
>>
>>
>>
>> ------------------------------
>>
>>
>> -------------------------- Helpful Info --------------------------
>> TeX FAQ: http://www.tex.ac.uk/faq
>> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
>> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>> List Archive: http://tug.org/pipermail/macostex-archives/
>> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
>>
>>
>>
>> End of MacOSX-TeX Digest, Vol 20, Issue 1
>> *****************************************
>
>
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 9 Jun 2009 15:41:30 -0500
> From: Herbert Schulz <herbs at wideopenwest.com>
> Subject: Re: [OS X TeX] Every Other Tick in PSTricks
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <6CE9BCC7-E58C-429A-A095-5513340DF765 at wideopenwest.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
> On Jun 9, 2009, at 1:35 PM, Maurino P. Bautista, Ph.D. wrote:
>
>> I have OS X 10.5.7, TeXShop 2.26, TeX Live 2008 with all the updates
>> via TeX Live Utility Manager. If I typeset the code below using TeX
>> and DVI, I get the right figure:
>>
>> \documentclass{minimal}
>> \usepackage{pstricks-add}
>>
>> \listfiles
>>
>> \begin{document}
>>
>> \centering
>>
>> \begin{pspicture}(-1,-1)(6,6)
>> \psaxes[showOriginTick=false,showorigin=false,Dx=2,Dy=2,subticks=2]
>> (6,6)
>> \end{pspicture}
>>
>> \end{document}
>>
>> But if I typeset it using Pdftex, which is my default setting, I get
>> the error message:
>>
>> ....
>> [Loading MPS to PDF converter (version 2006.09.02).]
>> )
>> ! Undefined control sequence.
>> <recently read> \c at lor@to at ps
>>
>> 1.12 \end
>>                {pspicture}
>> ?
>> .....
>>
>> I understand that the high level PostScript commands generated by
>> pstricks are unknown to pdfTeX. A while back, I believe Herb wrote
>> the following code that used to work for me but now generates no
>> output and no error messages either:
>>
>> \documentclass{minimal}
>>
>> \usepackage{ifpdf}
>> \ifpdf%
>> \usepackage{pdftricks}
>> \begin{psinputs}
>>   \usepackage{pstricks}
>> 	 \usepackage{pst-plot}
>> \end{psinputs}
>> \else
>> \usepackage{pstricks}
>> \usepackage{pst-plot}
>> \newenvironment{pdfpic}{}{}
>> \fi
>>
>> \begin{pdfpic}
>>
>> ....INSERT pspicture environment here....
>>
>> \end{pdfpic}
>> \end{document}
>>
>> The idea I think is to detect if one is using pdfTeX and switch to
>> pdftricks to allow pstricks commands to be used. Any ideas on how to
>> fix the above code?
>>
>> Maurino P. Bautista, Ph.D.
>> Professor of Mathematics
>> maobautista at gmail.com
>
>
> Howdy,
>
> This works for me:
>
> %%!TEX TS-program = pdftricksmk
> \documentclass{minimal}
>
> \usepackage{ifpdf}
> \ifpdf%
>  \usepackage{pdftricks}
>  \begin{psinputs}
>    \usepackage{pstricks}
>    \usepackage{pst-plot}
>    \usepackage{pstricks-add} % <- added this line!
>  \end{psinputs}
> \else
>  \usepackage{pstricks}
>  \usepackage{pst-plot}
>  \usepackage{pstricks-add} % <- added this line!
>  \newenvironment{pdfpic}{}{}
> \fi
>
> \begin{document} % <- why did I have to add this?
> \centering
> \begin{pdfpic}
> \begin{pspicture}(-1,-1)(6,6)
> \psaxes[showOriginTick=false,showorigin=false,Dx=2,Dy=2,subticks=2] 
> (6,6)
> \end{pspicture}
> \end{pdfpic}
> \end{document}
>
> By the way, I think it was someone else that made the suggestion. I
> tend to force what ever processing I need by use of the %%!TEX line
> rather than \ifpdf, etc.: in this case I'm using the pdftricksmk
> engine in TeXShop which uses latexmk and pdflatex to do the necessary
> processing when using the pdftricks package.
>
> Good Luck,
>
> Herb Schulz
> (herbs at wideopenwest dot com)
>
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 10 Jun 2009 20:24:44 +0200
> From: Michael Hoppe <mh at michael-hoppe.de>
> Subject: Re: [OS X TeX] Every Other Tick in PSTricks
> To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu>
> Message-ID: <433EB669-1C6E-4F1C-8948-B079813FF789 at michael-hoppe.de>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
> Am 09.06.2009 um 20:35 schrieb Maurino P. Bautista, Ph.D.:
>
>> I have OS X 10.5.7, TeXShop 2.26, TeX Live 2008 with all the updates
>> via TeX Live Utility Manager. If I typeset the code below using TeX
>> and DVI, I get the right figure:
>>
>> \documentclass{minimal}
>> \usepackage{pstricks-add}
>>
>> \listfiles
>>
>> \begin{document}
>>
>> \centering
>>
>> \begin{pspicture}(-1,-1)(6,6)
>> \psaxes[showOriginTick=false,showorigin=false,Dx=2,Dy=2,subticks=2]
>> (6,6)
>> \end{pspicture}
>>
>> \end{document}
>
> \documentclass{minimal}
> \usepackage{auto-pst-pdf}
> \usepackage{pstricks-add}
>
> \listfiles
>
> \begin{document}
>
> \centering
>
> \begin{pspicture}(-1,-1)(6,6)
> \psaxes[showOriginTick=false,showorigin=false,Dx=2,Dy=2,subticks=2] 
> (6,6)
> \end{pspicture}
>
> \end{document}
>
> Michael
>
>
> ------------------------------
>
>
> -------------------------- Helpful Info --------------------------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
>
>
>
> End of MacOSX-TeX Digest, Vol 20, Issue 7
> *****************************************

Maurino P. Bautista, Ph.D.
Professor of Mathematics
maobautista at gmail.com






More information about the macostex-archives mailing list