[pstricks] TR: Works except in style file

Patrice MEGRET Patrice.MEGRET at umons.ac.be
Tue Apr 10 09:29:26 CEST 2018


Dear Herbert,

Forget about this mail, I found my mistake : In my full style I have defined AlpDecay, BmDecay, .... and I was reusing the same code \def\setTextColor#1#2#3#4\@nil{\definecolor{pmAlpDecay}#4}, \def\setTextColor#1#2#3#4\@nil{\definecolor{pmBmDecay}#4} ...  to set the text color of each decay. Now I defined  a pmDecayColor used by any of the decay modes and this works perfectly.

Best regards,
Patrice



%% the following commands work like \pcline with the optional argument [] and arrows {}


\def\setTextColor#1#2#3#4\@nil{\definecolor{pmDecayColor}#4}

% \pmAlpDecay[opt]{arrows}(A,Z){text} draws alpha decay line from (A,Z)
% #1 = A
% #2 = Z
% #3 = text
\def\pmAlpDecay{\pst at object{pmAlpDecay}}
\def\pmAlpDecay at i{\pst at getarrows{\pmAlpDecay at ii}}
\def\pmAlpDecay at ii(#1,#2)#3{%
        \psset{linecolor=black}%
        \begin at OpenObj%
        \expandafter\setTextColor\pslinecolor\@nil%
        \pcline(! #1 #2 sub #2)(! #1 #2 sub 2 sub  #2 2 sub)%
        \naput{\textcolor{pmDecayColor}{#3}}%
        \end at OpenObj%
}


% \pmBmDecay[opt]{arrows}(A,Z){text} draws beta minus decay line from (A,Z)
% #1 = A
% #2 = Z
% #3 = text
\def\pmBmDecay{\pst at object{pmBmDecay}}
\def\pmBmDecay at i{\pst at getarrows{\pmBmDecay at ii}}
\def\pmBmDecay at ii(#1,#2)#3{%
        \psset{linecolor=black}%
        \begin at OpenObj%
        \expandafter\setTextColor\pslinecolor\@nil%
        \pcline(! #1 #2 sub #2)(! #1 #2 sub 1 sub #2 1 add)%
        \nbput{\textcolor{pmDecayColor}{#3}}%
        \end at OpenObj%
}


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20180410/0dcf0d1d/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001.txt
URL: <http://tug.org/pipermail/pstricks/attachments/20180410/0dcf0d1d/attachment-0001.txt>


More information about the PSTricks mailing list