[pstricks] Tick labels and math mode

Alan Ristow ristow at ece.gatech.edu
Tue Aug 3 22:08:58 CEST 2004


On Mon, 02 Aug 2004 08:46:07 +0200, Herbert Voss
<Herbert.Voss at alumni.TU-Berlin.DE> wrote:

>Alan Ristow wrote:
>
>> Sorry, I should have thought to mention in my original post that I was
>> using a pstricks-add beta....
>
>then you have to redefine the \pshlabel and \psvlabel from this package.

Of course. After taking another look, I scrapped my code from the first
post in this thread and redefined \pshlabel and \psvlabel by simply
putting the argument in math mode wherever it was used (code below). Any
chance this will become the default behavior of pstricks-add, or are you
reluctant to do that? Perhaps this change has some implications that I
have not yet encountered....

Alan


\def\pshlabel#1{%
  \edef\@xyDecimals{\psk at xDecimals}%
  \psk at xLabel%
  \ifnum\psk at ticks<\tw@ % ticks=all|x
    \ifx\psk at xlogBase\@empty
      \expandafter\@LabelComma$#1$..\@nil\psk at xlabelFactor%
    \else%

{\psk at xLabel\psk at xlogBase\textsuperscript{\expandafter\@stripDecimals$#1$..\@nil}}
    \fi%
  \fi%
}
\def\psvlabel#1{%
  \edef\@xyDecimals{\psk at yDecimals}%
  \psk at yLabel%
  \ifodd\psk at ticks  % ticks=all||y (0,2)
  \else \ifx\psk at ylogBase\@empty
      \expandafter\@LabelComma$#1$..\@nil\psk at ylabelFactor%
    \else%

{\psk at yLabel\psk at ylogBase\textsuperscript{\expandafter\@stripDecimals$#1$..\@nil}}
    \fi%
  \fi%
}%




More information about the PSTricks mailing list