From 0916eb097b7ca548095cc29df8deddee5594fd3d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 3 Nov 2011 18:18:09 +0000 Subject: pstricks 1.09 (31oct11) git-svn-id: svn://tug.org/texlive/trunk@24476 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/dvips/pstricks/pst-algparser.pro | 34 +++++++++++++++++----- Master/texmf-dist/dvips/pstricks/pstricks.pro | 14 +++++---- 2 files changed, 34 insertions(+), 14 deletions(-) (limited to 'Master/texmf-dist/dvips/pstricks') diff --git a/Master/texmf-dist/dvips/pstricks/pst-algparser.pro b/Master/texmf-dist/dvips/pstricks/pst-algparser.pro index c9009a9f623..1d5fb04c661 100644 --- a/Master/texmf-dist/dvips/pstricks/pst-algparser.pro +++ b/Master/texmf-dist/dvips/pstricks/pst-algparser.pro @@ -1,7 +1,7 @@ -% $Id: pst-algparser.pro 532 2011-07-09 13:02:57Z herbert $ +% $Id: pst-algparser.pro 594 2011-10-31 18:13:18Z herbert $ %% %% PostScript prologue for PSTricks algorithm parser -%% Version 0.03, 2011/06/03 +%% Version 0.04, 2011/10/21 %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives @@ -13,11 +13,14 @@ % /tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin % -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 +% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.13 +% +% 09/2011 DR factorial with ! added +% % E->T|E+T % T->FS|T*FS % FS -> F | +FS | -FS -% F->P|F^SF +% F->P|F^SF|P! % P->(E)|literal % literal->number|var|var[E]|func(params) % params->E|E,param @@ -82,12 +85,16 @@ ifelse AnalyzePostHook } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P +%% F->P|F^P|P! %% STR index /AnalyzeFactor { AnalyzePreHook AnalyzePower IsEndingFactor { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } + { { dup 33 eq%% is there a ! DR 09/2011 + { pop 1 add NextNonBlankChar pop EvalFactorial } + { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower } + ifelse + IsEndingFactor { pop exit } if } loop } ifelse AnalyzePostHook } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -227,6 +234,10 @@ end /ExpressionVector ExpressionVector aload length dup 5 add -1 roll pop /exp cvx exch 1 add array astore def } def +/EvalFactorial {% DR 09/2011 + /ExpressionVector ExpressionVector aload length + /fact cvx exch 1 add array astore def +} def /EvalLiteral {% ReadLiteral dup 40 eq%%% there is an open par -> function call @@ -492,6 +503,13 @@ end %tx@CoreAnalyzerDict mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% No derivative for factorial ! only cst => null derivative +/EvalFactorial {% DR 09/2011 + 4 index (0) eq + { (0) mark 8 -2 roll cleartomark 2 index 7 index dup 4 index exch sub getinterval exch 6 2 roll } + { DERIVATIVE_ENGINE_ERROR_no_variable_in_factorial } ifelse +} def +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% str -> true/false /IsStrNumber {% true exch @@ -507,7 +525,7 @@ end %tx@CoreAnalyzerDict ReadLiteral dup 40 eq%%% there is an open par -> function call { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } + { DERIVATIVE_ENGINE_ERROR_vector_not_yet_implemented } { pop EvalVariable } ifelse } ifelse @@ -567,7 +585,7 @@ end %tx@CoreAnalyzerDict { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if PostCommonFunc } def /EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if + PreCommonFunc { DERIVATIVE_ENGINE_ERROR_no_variable_expression_in_Fact } if PostCommonFunc } def /EvalFunc_sh {% PreCommonFunc diff --git a/Master/texmf-dist/dvips/pstricks/pstricks.pro b/Master/texmf-dist/dvips/pstricks/pstricks.pro index 7f7f985e95f..a91ca474cff 100644 --- a/Master/texmf-dist/dvips/pstricks/pstricks.pro +++ b/Master/texmf-dist/dvips/pstricks/pstricks.pro @@ -1,7 +1,7 @@ -% $Id: pstricks.pro 532 2011-07-09 13:02:57Z herbert $ +% $Id: pstricks.pro 594 2011-10-31 18:13:18Z herbert $ % %% PostScript prologue for pstricks.tex. -%% Version 1.08, 2011/07/09 +%% Version 1.09, 2011/10/31 %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives @@ -375,25 +375,27 @@ tx@Dict begin } def % /LineToYAxis { + /Ox ED % Save the x origin value NArray % all x-y pairs on stack n { 2 copy moveto % go to current point - 0 exch Lineto % line to y-axis + Ox exch Lineto % line to y-axis pop % delete old x-value } repeat } def % /LineToXAxis{ + /Oy ED % Save the y origin value NArray % all x-y pairs on stack n 0 eq not { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - CP 2 copy moveto pop 0 Lineto - n { 2 copy moveto pop 0 Lineto } repeat + CP 2 copy moveto pop Oy Lineto + n { 2 copy moveto pop Oy Lineto } repeat CP 4 2 roll ArrowB - 2 copy moveto pop 0 + 2 copy moveto pop Oy L pop pop } if } def -- cgit v1.2.3