From aa11c46b08336e3b16a46b7b7099b45bc4757478 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 25 Jan 2009 16:12:54 +0000 Subject: pstricks-add 3.18 (23jan09) git-svn-id: svn://tug.org/texlive/trunk@11967 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/pstricks-add/Changes | 8 +- .../doc/generic/pstricks-add/pstricks-add-doc.pdf | Bin 1973570 -> 1981930 bytes .../doc/generic/pstricks-add/pstricks-add-doc.tex | 310 ++++++++++++--------- 3 files changed, 187 insertions(+), 131 deletions(-) (limited to 'Master/texmf-dist/doc/generic') diff --git a/Master/texmf-dist/doc/generic/pstricks-add/Changes b/Master/texmf-dist/doc/generic/pstricks-add/Changes index b99c503a31e..4dba0f8bacc 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/Changes +++ b/Master/texmf-dist/doc/generic/pstricks-add/Changes @@ -1,4 +1,4 @@ -%% $Id: Changes 75 2009-01-17 22:01:38Z herbert $ +%% $Id: Changes 83 2009-01-23 19:59:51Z herbert $ %% pstricks-add.pro ----------- v 0.21 2008-10-13 - add bubblesort macro @@ -34,7 +34,11 @@ pstricks-add.sty ----------- (hv) pstricks-add.tex ----------- (Dominik Rodriguez/hv) - v 3.16 2009-01-17 - add optional argument for \psplot ans \parametricplot + v 3.18 2009-01-23 - add optional argument for \psplot and \parametricplot + for additional PostScript settings + - add macro \psGetSlope + - add \psForeach (without grouping its contents) + v 3.17 2009-01-17 - add optional argument for \psplot ans \parametricplot for additional PostScript settings v 3.16 2008-12-22 - make showorigin also valid for the ticks v 3.15 2008-12-12 - fixed bug with \psgraph and the optional labels diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf index 51b5d07c68d..f006870f903 100644 Binary files a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf and b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf differ diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex index 5d2279355a3..2f8fef61632 100644 --- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex +++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex @@ -1,18 +1,16 @@ -%% $Id: pstricks-add-doc.tex 75 2009-01-17 22:01:38Z herbert $ +%% $Id: pstricks-add-doc.tex 81 2009-01-21 11:26:09Z herbert $ \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings headexclude,footexclude,oneside]{pst-doc} \listfiles \input{pstricks-add-doc.dat} -\usepackage[latin9]{inputenc} +\usepackage[utf8]{inputenc} \usepackage{pst-eucl,pst-fun,multirow} \usepackage{pstricks-add} \usepackage{pifont} \let\pstricksaddFV\fileversion % -\let\CMD\Lcs -% \newcommand{\pstEllipse}[5][]{% \psset{#1} \parametricplot{#4}{#5}{#2\space t cos mul #3\space t sin mul}% @@ -37,14 +35,14 @@ \fboxsep=0pt \fcolorbox{DarkBlue}{DarkBlue}{\textcolor{white}{\bfseries\strut##1}}% }} -\renewcommand\OFF{% - \xdef\lst@alloverstyle##1{##1}% -} +\renewcommand\OFF{\xdef\lst@alloverstyle##1{##1}} \define@key[psset]{}{PSfont}[Times-Roman]{\def\psk@PSfont{/#1 }} \define@key[psset]{}{valuewidth}[10]{\pst@getint{#1}\psk@valuewidth } \define@key[psset]{}{fontscale}[10]{\pst@checknum{#1}\psk@fontscale } \define@key[psset]{}{decimals}[-1]{\pst@getint{#1}\psk@decimals } \psset{PSfont=Times-Roman,fontscale=10,valuewidth=10,decimals=-1} +\define@key[psset]{}{xShift}[0]{\def\psk@xShift{#1 }} +\psset{xShift=0} % \def\psPrintValue{\pst@object{psPrintValue}} \def\psPrintValue@i#1{% @@ -52,7 +50,7 @@ \addto@pscode{ gsave \psk@PSfont findfont \psk@fontscale scalefont setfont #1 \psk@decimals -1 gt { 10 \psk@decimals exp dup 3 1 roll mul cvi exch div } if - \psk@valuewidth string cvs 0 0 moveto show grestore + \psk@valuewidth string cvs \psk@xShift 0 moveto show grestore }% \end@SpecialObj% } @@ -89,7 +87,7 @@ \renewcommand*\l@subsubsection{\bprot@dottedtocline{3}{3.8em}{4.5em}} \renewcommand*\l@paragraph{\bprot@dottedtocline{4}{7.0em}{5em}} \makeatother -\lstset{escapechar=§} +\lstset{escapechar=§} \begin{document} @@ -154,6 +152,7 @@ Jens-Uwe Morawski; Tobias N\"ahring; Rolf Niepraschk; Alan Ristow; +Christine R\"omer; Arnaud Schmittbuhl; Timothy Van Zandt \end{abstract} @@ -307,11 +306,25 @@ throughout, e.g. \verb+\let\modulo\pst@mod+. \makeatother \end{LTXexample} -\clearpage +%-------------------------------------------------------------------------------------- +\subsection{\nxLcs{psGetSlope}} +%-------------------------------------------------------------------------------------- + +\begin{BDef} +\Lcs{psGetSlope}\Largr{\Coord1}\Largr{\Coord2}\Lcs{\Larga{macro}} +\end{BDef} + +\begin{LTXexample}[width=2cm] +\psGetSlope(-2,1)(3,1)\SlopeVal \SlopeVal\\ +\psGetSlope(-2,1)(-3,-1)\SlopeVal \SlopeVal\\ +\psGetSlope(-2,0)(3,-1)\SlopeVal \SlopeVal\\ +\psGetSlope(-2111,-12)(3,1)\SlopeVal \SlopeVal +\end{LTXexample} + %-------------------------------------------------------------------------------------- \section{Dashed Lines} %-------------------------------------------------------------------------------------- -Tobias Nähring has implemented an enhanced feature for dashed +Tobias Nähring has implemented an enhanced feature for dashed lines. The number of arguments is no longer limited. \begin{BDef} @@ -331,6 +344,8 @@ lines. The number of arguments is no longer limited. \end{pspicture} \end{LTXexample} +\clearpage + %-------------------------------------------------------------------------------------- \section{\nxLcs{rmultiput}: a multiple \nxLcs{rput}} %-------------------------------------------------------------------------------------- @@ -357,11 +372,11 @@ point to the next. This is possible with \Lcs{rmultiput}: \clearpage %-------------------------------------------------------------------------------------- -\section{\CMD{psrotate}: Rotating objects} +\section{\nxLcs{psrotate}: Rotating objects} %-------------------------------------------------------------------------------------- -\CMD{rput} also has an optional argument for rotating objects, but -it always depends on the \CMD{rput} coordinates. With -\CMD{psrotate} the rotating center can be placed anywhere. The +\Lcs{rput} also has an optional argument for rotating objects, but +it always depends on the \Lcs{rput} coordinates. With +\Lcs{psrotate} the rotating center can be placed anywhere. The rotation is done with \verb+\pscustom+, all optional arguments are only valid if they are part of the \verb+\pscustom+ macro. @@ -412,7 +427,7 @@ only valid if they are part of the \verb+\pscustom+ macro. \psrotate(0,1){\iA}{\majorette\psdot[linecolor=red](0,1)\psdot[linecolor=green](0,2)}}} \parametricplot[linecolor=red]{0}{2}{% trajectoire du milieu V0 Alpha cos mul t mul -9.81 2 div t dup mul mul V0 Alpha sin mul t mul add 1 add} - \parametricplot[linecolor=green,plotpoints=360]{0}{2}{% d'une extrĂ©mitĂ© + \parametricplot[linecolor=green,plotpoints=360]{0}{2}{% d'une extremite V0 Alpha cos mul t mul 800 t mul sin sub % x(t) -9.81 2 div t dup mul mul V0 Alpha sin mul t mul add 1 add 800 t mul cos add }%y(t) \end{pspicture} @@ -1326,7 +1341,6 @@ All examples are printed with \verb|\psset{arrowscale=2,linecolor=red}|. \end{pspicture} \end{LTXexample} -\clearpage %-------------------------------------------------------------------------------------- \subsubsection{\nxLcs{pspolygon}} %-------------------------------------------------------------------------------------- @@ -1404,6 +1418,7 @@ All examples are printed with \verb|\psset{arrowscale=2,linecolor=red}|. \end{pspicture} \end{LTXexample} + \resetOptions \begin{LTXexample}[width=4.5cm] \begin{pspicture}(4,3) @@ -1421,6 +1436,7 @@ All examples are printed with \verb|\psset{arrowscale=2,linecolor=red}|. \end{pspicture} \end{LTXexample} + \resetOptions \begin{LTXexample}[width=4.5cm] \begin{pspicture}(4,3) @@ -1917,7 +1933,7 @@ be seen with Acroread 7 or later. The syntax is easy: %-------------------------------------------------------------------------------------- %-------------------------------------------------------------------------------------- -\section{Relative nodes with \CMD{psGetNodeCenter}} +\section{Relative nodes with \nxLcs{psGetNodeCenter}} %-------------------------------------------------------------------------------------- The command \Lcs{psGetNodeCenter}\Largb{node} makes sense only at the PostScript level. It defines the two variables \Larg{node.x} @@ -2034,7 +2050,7 @@ a zero length: %-------------------------------------------------------------------------------------- -\section{\CMD{ncdiagg} and \CMD{pcdiagg}} +\section{\nxLcs{ncdiagg} and \nxLcs{pcdiagg}} %-------------------------------------------------------------------------------------- This is nearly the same as \Lcs{ncdiag} except that \Lkeyword{armB}=0 and the \Lkeyword{angleB} value is computed by the @@ -2116,7 +2132,7 @@ e.g.: if $20$ is wrong then take $-160$, which differs by $180$. \end{LTXexample} %-------------------------------------------------------------------------------------- -\section{\CMD{ncbarr}} +\section{\nxLcs{ncbarr}} %-------------------------------------------------------------------------------------- This has the same behaviour as \verb+ncbar+, but has 5 segments and all are horizontal ones. This is the reason why \verb+angleA+ @@ -2147,7 +2163,7 @@ to the distance of the two nodes. \end{LTXexample} %-------------------------------------------------------------------------------------- -\section{\CMD{psRelNode} and \CMD{psDefPSPNodes}} +\section{\nxLcs{psRelNode} and \nxLcs{psDefPSPNodes}} %-------------------------------------------------------------------------------------- With these macros it is possible to put a node relative to a given line or given \verb+pspicture+-environment. In the frist case the parameters are @@ -2216,7 +2232,7 @@ and can be modified in the same way. %-------------------------------------------------------------------------------------- -\section{\CMD{psRelLine}} +\section{\nxLcs{psRelLine}} %-------------------------------------------------------------------------------------- With this macro it is possible to plot lines relative to a given one. Parameter are the angle and the length factor: @@ -2329,8 +2345,8 @@ options \verb+trueAngle+ and \verb+angle+. \pnode(0,.1){A1} \pnode(1,.31){A1} { \psset{linewidth=.02,linestyle=dashed,linecolor=gray}% \pcline(DST1)(DST2) % <- Druckseitentangente - \pcline(A2)(A1) % <- Anstr"omrichtung - \lput*{:U}{\small Anstr"omrichtung $v_{\infty}$} }% + \pcline(A2)(A1) % <- Anstr\"omrichtung + \lput*{:U}{\small Anstr\"omrichtung $v_{\infty}$} }% \psIntersectionPoint(A1)(A2)(DST1)(DST2){Hk} \pscurve(Hk)(.4,.38)(Vk)(.36,.33)(.5,.32)(Hk) \psParallelLine[linecolor=red!75!green,arrows=->,arrowscale=2](Vk)(Hk)(D){.1}{FtE} @@ -2379,7 +2395,7 @@ options \verb+trueAngle+ and \verb+angle+. %-------------------------------------------------------------------------------------- -\section{\CMD{psParallelLine}} +\section{\nxLcs{psParallelLine}} %-------------------------------------------------------------------------------------- With this macro it is possible to plot lines relative to a given one, which is parallel. There is no special parameter here. @@ -2414,7 +2430,7 @@ of the special PostScript characters. %-------------------------------------------------------------------------------------- -\section{\CMD{psIntersectionPoint}} +\section{\nxLcs{psIntersectionPoint}} %-------------------------------------------------------------------------------------- This macro calculates the intersection point of two lines, given by the four coordinates. There is no special parameter here. @@ -2441,9 +2457,9 @@ There is no special parameter here. \clearpage %-------------------------------------------------------------------------------------- -\section{\CMD{psLNode} and \CMD{psLCNode}} +\section{\nxLcs{psLNode} and \nxLcs{psLCNode}} %-------------------------------------------------------------------------------------- -\CMD{psLNode} interpolates the Line $\overline{AB}$ by the given value and sets a node at this +\Lcs{psLNode} interpolates the Line $\overline{AB}$ by the given value and sets a node at this point. The syntax is % \begin{lstlisting}[style=syntax] @@ -2466,7 +2482,7 @@ point. The syntax is \bigskip -The \CMD{psLCNode} macro builds the linear combination of the two given +The \Lcs{psLCNode} macro builds the linear combination of the two given vectors and stores the end of the new vector as a node. All vectors start at $(0,0)$, so a \verb+\rput+ maybe appropriate. The syntax is @@ -2494,13 +2510,13 @@ The syntax is \clearpage %-------------------------------------------------------------------------------------- -\section{\CMD{nlput} and \CMD{psLDNode}} +\section{\nxLcs{nlput} and \nxLcs{psLDNode}} %-------------------------------------------------------------------------------------- -\CMD{ncput} allows you to set a label relative to the first node -of the last node connection. With \CMD{nlput} this can be done +\Lcs{ncput} allows you to set a label relative to the first node +of the last node connection. With \Lcs{nlput} this can be done absolute to a given node. The syntax is different to the other node connection macros. It uses internally the macro -\CMD{psLDNode} which places a node absolute to two given points, +\Lcs{psLDNode} which places a node absolute to two given points, starting from the first one. \begin{lstlisting}[style=syntax] @@ -2572,8 +2588,8 @@ usual way. Only the additional value \texttt{inner} is valid for \verb+trigLabels+ option, the macros \verb+\pshlabel+ and \verb+\psvlabel+ shouldn't be redefined, because the package does it itself internally in these cases. However, if you need a -redefinition, then do it for \CMD{pst@@hlabel} and -\CMD{pst@@vlabel} with +redefinition, then do it for \Lcs{pst@@hlabel} and +\Lcs{pst@@vlabel} with \begin{lstlisting}[style=syntax] \makeatletter @@ -2587,7 +2603,7 @@ redefinition, then do it for \CMD{pst@@hlabel} and \ttfamily \rowcolors{1}{blue!20}{red!30} \begin{longtable}{lll} -\caption{All new parameters for \texttt{pst-plot}}\\[-5pt] +\caption{All new parameters for \texttt{pst-plot}}\\ \rowcolor{white}\textrm{\bfseries Name} & \textrm{\bfseries Type} & \textrm{\bfseries Default}\\\hline \endfirsthead \rowcolor{white}\textrm{\bfseries Name} & \textrm{\bfseries Type} & \textrm{\bfseries Default}\\\hline @@ -2901,7 +2917,7 @@ behaviour. \begin{LTXexample}[pos=t] \psset{xunit=10cm,yunit=0.01cm,labelFontSize=\scriptstyle} -\begin{pspicture}(-0.3,-150)(1.5,550.0) +\begin{pspicture}(-0.1,-150)(1.5,550.0) \psaxes[Dx=0.25,Dy=100,ticksize=-4pt 0,comma=true,xDecimals=3,yDecimals=1]{->}% (0,0)(0,-100)(1.4,520)[\textbf{Amp\`ere},-90][\textbf{Voltage},0] \end{pspicture} @@ -2909,22 +2925,23 @@ behaviour. \resetOptions +\clearpage %-------------------------------------------------------------------------------------- \subsection{\texttt{trigLabels} and \texttt{trigLabelBase} -- axis with trigonmetrical units} %-------------------------------------------------------------------------------------- -With the option \verb+trigLabels=true+ the labels on the x axis -are trigonometrical ones. The option \verb+trigLabelBase+ set the +With the option \Lkeyword{trigLabels}=\true\ the labels on the x axis +are trigonometrical ones. The option \Lkeyword{trigLabelBase} set the denominator of fraction. The default value of 0 is the same as no fraction. The following constants are defined in the package: \begin{lstlisting}[style=syntax] -\def§\ON§\psPiFour§\OFF§{12.566371} -\def§\ON§\psPiTwo§\OFF§{6.283185} -\def§\ON§\psPi§\OFF§{3.14159265} -\def§\ON§\psPiH§\OFF§{1.570796327} +\def§\ON§\psPiFour§\OFF§{12.566371} +\def§\ON§\psPiTwo§\OFF§{6.283185} +\def§\ON§\psPi§\OFF§{3.14159265} +\def§\ON§\psPiH§\OFF§{1.570796327} \newdimen\pstRadUnit \newdimen\pstRadUnitInv -§\ON§\pstRadUnit§\OFF§=1.047198cm % this is pi/3 -§\ON§\pstRadUnitInv§\OFF§=0.95493cm % this is 3/pi +§\ON§\pstRadUnit§\OFF§=1.047198cm % this is pi/3 +§\ON§\pstRadUnitInv§\OFF§=0.95493cm % this is 3/pi \end{lstlisting} @@ -2943,13 +2960,13 @@ decimal ticks to trigonometrical ones makes no real sense, because every 1 xunit (1cm) is a tick and the last one is at 6cm. \clearpage -\begin{minipage}{0.4\fullWidth} +\begin{minipage}{0.45\fullWidth} \begin{pspicture}[trigLabels=true](-0.5,-1.25)(6.5,1.25)% \pnode(5,0){A}% \psaxes{->}(0,0)(-0.5,-1.25)(\psPiTwo,1.25)% \end{pspicture} \end{minipage}% -\begin{minipage}{0.6\fullWidth} +\begin{minipage}{0.55\fullWidth} \begin{lstlisting} \begin{pspicture}(-0.5,-1.25)(6.5,1.25)% \pnode(5,0){A}% @@ -2958,48 +2975,46 @@ every 1 xunit (1cm) is a tick and the last one is at 6cm. \end{lstlisting} \end{minipage} -\begin{minipage}{0.4\fullWidth} +\begin{minipage}{0.45\fullWidth} \begin{pspicture}(-0.5,-1.25)(6.5,1.25)% \psaxes[trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(\psPiTwo,1.25) \end{pspicture} \end{minipage}% -\begin{minipage}{0.6\fullWidth} +\begin{minipage}{0.55\fullWidth} \begin{lstlisting} \begin{pspicture}(-0.5,-1.25)(6.5,1.25)% - \psaxes[§\ON§trigLabelBase=3§\OFF§]{->}(0,0)(-0.5,-1.25)(\psPiTwo,1.25) + \psaxes[§\ON§trigLabelBase=3§\OFF§]{->}(0,0)(-0.5,-1.25)(\psPiTwo,1.25) \end{pspicture} \end{lstlisting} \end{minipage} - - Modifying the ticks to have the last one exactly at the end is possible with a different dx value ($\frac{\pi}{3}\approx 1.047$): -\begin{minipage}{0.4\fullWidth} +\begin{minipage}{0.45\fullWidth} \begin{pspicture}(-0.5,-1.25)(6.5,1.25)\pnode(\psPiTwo,0){C}% \psaxes[dx=\pstRadUnit]{->}(0,0)(-0.5,-1.25)(\psPiTwo,1.25) \end{pspicture}% \end{minipage}% -\begin{minipage}{0.6\fullWidth} +\begin{minipage}{0.55\fullWidth} \begin{lstlisting} \begin{pspicture}(-0.5,-1.25)(6.5,1.25)\pnode(\psPiTwo,0){C}% - \psaxes[§\ON§dx=\pstRadUnit§\OFF§]{->}(0,0)(-0.5,-1.25)(\psPiTwo,1.25) + \psaxes[§\ON§dx=\pstRadUnit§\OFF§]{->}(0,0)(-0.5,-1.25)(\psPiTwo,1.25) \end{pspicture}% \end{lstlisting} \end{minipage} -\begin{minipage}{0.4\fullWidth} +\begin{minipage}{0.45\fullWidth} \begin{pspicture}(-0.5,-1.25)(6.5,1.25)\pnode(5,0){B}% \psaxes[dx=\pstRadUnit,trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(\psPiTwo,1.25) \end{pspicture}% \end{minipage}% -\begin{minipage}{0.6\fullWidth} +\begin{minipage}{0.55\fullWidth} \begin{lstlisting} \begin{pspicture}(-0.5,-1.25)(6.5,1.25)\pnode(5,0){B}% - \psaxes[dx=\pstRadUnit,§\ON§trigLabelBase=3§\OFF§] {->}(0,0)(-0.5,-1.25)(\psPiTwo,1.25) + \psaxes[dx=\pstRadUnit,§\ON§trigLabelBase=3§\OFF§] {->}(0,0)(-0.5,-1.25)(\psPiTwo,1.25) \end{pspicture}% \end{lstlisting} \end{minipage} @@ -3007,19 +3022,19 @@ possible with a different dx value ($\frac{\pi}{3}\approx 1.047$): \ncline[linestyle=dashed,linewidth=0.4pt]{A}{B} Set everything globally in radian units. Now 6 units on the -$x$-axis are $6\pi$. Using \verb+trigLabelBase=3+ reduces this +$x$-axis are $6\pi$. Using \Lkeyword{trigLabelBase}=3 reduces this value to $2\pi$, a.s.o. \bigskip -\begin{minipage}{0.4\fullWidth} +\begin{minipage}{0.45\fullWidth} \psset{xunit=\pstRadUnit}% \begin{pspicture}(-0.5,-1.25)(6.5,1.25)\pnode(6,0){D}% \psaxes{->}(0,0)(-0.5,-1.25)(6.5,1.25)% \end{pspicture}% \end{minipage}% -\begin{minipage}{0.6\fullWidth} +\begin{minipage}{0.55\fullWidth} \begin{lstlisting} -\psset{§\ON§xunit=\pstRadUnit§\OFF§}% +\psset{§\ON§xunit=\pstRadUnit§\OFF§}% \begin{pspicture}(-0.5,-1.25)(6.5,1.25)\pnode(6,0){D}% \psaxes{->}(0,0)(-0.5,-1.25)(6.5,1.25)% \end{pspicture}% @@ -3028,49 +3043,49 @@ value to $2\pi$, a.s.o. \ncline[linestyle=dashed,linewidth=0.4pt]{C}{D} -\begin{minipage}{0.4\fullWidth} +\begin{minipage}{0.45\fullWidth} \psset{xunit=\pstRadUnit}% \begin{pspicture}(-0.5,-1.25)(6.5,1.25) \psaxes[trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(6.5,1.25) \end{pspicture}% \end{minipage}% -\begin{minipage}{0.6\fullWidth} +\begin{minipage}{0.55\fullWidth} \begin{lstlisting} -\psset{§\ON§xunit=\pstRadUnit§\OFF§}% +\psset{§\ON§xunit=\pstRadUnit§\OFF§}% \begin{pspicture}(-0.5,-1.25)(6.5,1.25) - \psaxes[§\ON§trigLabelBase=3§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25) + \psaxes[§\ON§trigLabelBase=3§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25) \end{pspicture}% \end{lstlisting} \end{minipage} -\begin{minipage}{0.4\fullWidth} +\begin{minipage}{0.45\fullWidth} \psset{xunit=\pstRadUnit}% \begin{pspicture}(-0.5,-1.25)(6.5,1.25) \psaxes[trigLabelBase=4]{->}(0,0)(-0.5,-1.25)(6.5,1.25) \end{pspicture}% \end{minipage}% -\begin{minipage}{0.6\fullWidth} +\begin{minipage}{0.55\fullWidth} \begin{lstlisting} -\psset{§\ON§xunit=\pstRadUnit§\OFF§}% +\psset{§\ON§xunit=\pstRadUnit§\OFF§}% \begin{pspicture}(-0.5,-1.25)(6.5,1.25) - \psaxes[§\ON§trigLabelBase=4§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25) + \psaxes[§\ON§trigLabelBase=4§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25) \end{pspicture}% \end{lstlisting} \end{minipage} -\begin{minipage}{0.4\fullWidth} +\begin{minipage}{0.45\fullWidth} \psset{xunit=\pstRadUnit}% \begin{pspicture}(-0.5,-1.25)(6.5,1.25) \psaxes[trigLabelBase=6]{->}(0,0)(-0.5,-1.25)(6.5,1.25) \end{pspicture}% \end{minipage}% -\begin{minipage}{0.6\fullWidth} +\begin{minipage}{0.55\fullWidth} \begin{lstlisting} -\psset{§\ON§xunit=\pstRadUnit§\OFF§}% +\psset{§\ON§xunit=\pstRadUnit§\OFF§}% \begin{pspicture}(-0.5,-1.25)(6.5,1.25) - \psaxes[§\ON§trigLabelBase=6§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25) + \psaxes[§\ON§trigLabelBase=6§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25) \end{pspicture}% \end{lstlisting} \end{minipage} @@ -3083,73 +3098,73 @@ for \Lkeyword{trigLabelBase}, it has to be done by the user. The first example sets the unit locally for the \Lcs{psplot} back to 1cm, which is needed, because we use this unit on the PostScript side. -\begin{minipage}{0.4\fullWidth} +\begin{minipage}{0.45\fullWidth} \psset{xunit=\pstRadUnit}% -\begin{pspicture}(-0.5,-1.25)(6.5,1.25) +\begin{pspicture}(-0.4,-1.25)(6.5,1.25) \psaxes[trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(6.5,1.25) \psplot[xunit=1cm,linecolor=red,linewidth=1.5pt]{0}{\psPiTwo}{x RadtoDeg sin} \end{pspicture} \end{minipage}% -\begin{minipage}{0.6\fullWidth} +\begin{minipage}{0.55\fullWidth} \begin{lstlisting} \psset{xunit=\pstRadUnit}% \begin{pspicture}(-0.5,-1.25)(6.5,1.25) \psaxes[trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(6.5,1.25) - \psplot[§\ON§xunit=1cm§\OFF§,linecolor=red,linewidth=1.5pt]{0}{§\ON§\psPiTwo§\OFF§}{x RadtoDeg sin} + \psplot[§\ON§xunit=1cm§\OFF§,linecolor=red,linewidth=1.5pt]{0}{§\ON§\psPiTwo§\OFF§}{x RadtoDeg sin} \end{pspicture} \end{lstlisting} \end{minipage} -\begin{minipage}{0.4\fullWidth} +\begin{minipage}{0.45\fullWidth} \psset{xunit=\pstRadUnit}% -\begin{pspicture}(-0.5,-1.25)(6.5,1.25) +\begin{pspicture}(-0.4,-1.25)(6.5,1.25) \psaxes[trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(6.5,1.25) \psplot[linecolor=red,linewidth=1.5pt]{0}{6}{x Pi 3 div mul RadtoDeg sin} \end{pspicture} \end{minipage}% -\begin{minipage}{0.6\fullWidth} +\begin{minipage}{0.55\fullWidth} \begin{lstlisting} \psset{xunit=\pstRadUnit}% \begin{pspicture}(-0.5,-1.25)(6.5,1.25) \psaxes[trigLabelBase=3]{->}(0,0)(-0.5,-1.25)(6.5,1.25) - \psplot[linecolor=red,linewidth=1.5pt]{0}{6}{x §\ON§Pi 3 div mul §\OFF§RadtoDeg sin} + \psplot[linecolor=red,linewidth=1.5pt]{0}{6}{x §\ON§Pi 3 div mul §\OFF§RadtoDeg sin} \end{pspicture} \end{lstlisting} \end{minipage} -\begin{minipage}{0.4\fullWidth} +\begin{minipage}{0.45\fullWidth} \psset{xunit=\pstRadUnit}% -\begin{pspicture}(-0.5,-1.25)(6.5,1.25) +\begin{pspicture}(-0.4,-1.25)(6.5,1.25) \psaxes[dx=1.5]{->}(0,0)(-0.5,-1.25)(6.5,1.25) \psplot[xunit=.5cm,linecolor=red,linewidth=1.5pt]{0}{\psPiFour}{x RadtoDeg sin} \end{pspicture} \end{minipage}% -\begin{minipage}{0.6\fullWidth} +\begin{minipage}{0.55\fullWidth} \begin{lstlisting} \psset{xunit=\pstRadUnit}% \begin{pspicture}(-0.5,-1.25)(6.5,1.25) - \psaxes[§\ON§dx=1.5§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25) - \psplot[§\ON§xunit=0.5cm§\OFF§,linecolor=red,linewidth=1.5pt]{0}{§\ON§\psPiFour§\OFF§}{x RadtoDeg sin} + \psaxes[§\ON§dx=1.5§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25) + \psplot[§\ON§xunit=0.5cm§\OFF§,linecolor=red,linewidth=1.5pt]{0}{§\ON§\psPiFour§\OFF§}{x RadtoDeg sin} \end{pspicture} \end{lstlisting} \end{minipage} -\begin{minipage}{0.4\fullWidth} +\begin{minipage}{0.45\fullWidth} \psset{xunit=\pstRadUnit}% -\begin{pspicture}(-0.5,-1.25)(6.5,1.25) +\begin{pspicture}(-0.4,-1.25)(6.5,1.25) \psaxes[dx=0.75,trigLabelBase=2]{->}(0,0)(-0.5,-1.25)(6.5,1.25) \psplot[xunit=.5cm,linecolor=red,linewidth=1.5pt]{0}{\psPiFour}{x RadtoDeg sin} \end{pspicture} \end{minipage}% -\begin{minipage}{0.6\fullWidth} +\begin{minipage}{0.55\fullWidth} \begin{lstlisting} \psset{xunit=\pstRadUnit}% \begin{pspicture}(-0.5,-1.25)(6.5,1.25) - \psaxes[§\ON§dx=0.75§\OFF§,§\ON§trigLabelBase=2§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25) - \psplot[§\ON§xunit=0.5cm§\OFF§,linecolor=red,linewidth=1.5pt]{0}{\psPiFour}{x RadtoDeg sin} + \psaxes[§\ON§dx=0.75§\OFF§,§\ON§trigLabelBase=2§\OFF§]{->}(0,0)(-0.5,-1.25)(6.5,1.25) + \psplot[§\ON§xunit=0.5cm§\OFF§,linecolor=red,linewidth=1.5pt]{0}{\psPiFour}{x RadtoDeg sin} \end{pspicture} \end{lstlisting} \end{minipage} @@ -3157,8 +3172,8 @@ which is needed, because we use this unit on the PostScript side. It is also possible to set the $x$ unit and $dx$ value to get the labels right. But this needs some more understanding as to how it -really works. A \verb+xunit=1.570796327+ sets the unit to $\pi/2$ -and a \verb+dx=0.666667+ then puts at every $2/3$ of the unit a +really works. A \Lkeyword{xunit}=1.570796327 sets the unit to $\pi/2$ +and a \Lkeyword{dx}=0.666667 then puts at every $2/3$ of the unit a tick mark and a label. The length of the $x$-axis is 6.4 units which is $6.4\cdot 1.570796327cm\approx 10cm$. The function then is plotted from $0$ to $3\pi=9.424777961$. @@ -3169,15 +3184,15 @@ is plotted from $0$ to $3\pi=9.424777961$. \begin{center} \psset{unit=1cm} \begin{pspicture}(-0.5,-1.25)(10,1.25) - \psaxes[xunit=1.570796327,showorigin=false,trigLabelBase=3,dx=0.666667]{->}(0,0)(-0.5,-1.25)(6.4,1.25) + \psaxes[xunit=\psPiH,showorigin=false,trigLabelBase=3,dx=0.666667]{->}(0,0)(-0.5,-1.25)(6.4,1.25) \psplot[linecolor=red,linewidth=1.5pt]{0}{9.424777961}{% x RadtoDeg dup sin exch 1.1 mul cos add} \end{pspicture} \end{center} \begin{lstlisting} \begin{pspicture}(-0.5,-1.25)(10,1.25) - \psaxes[§\ON§xunit=1.570796327§\OFF§,§\ON§trigLabelBase=3§\OFF§,§\ON§dx=0.666667§\OFF§]{->}(0,0)(-0.5,-1.25)(6.4,1.25) - \psplot[linecolor=red,linewidth=1.5pt]{0}{§\ON§9.424777961§\OFF§}{% + \psaxes[§\ON§xunit=\psPiH§\OFF§,§\ON§trigLabelBase=3§\OFF§,§\ON§dx=0.666667§\OFF§]{->}(0,0)(-0.5,-1.25)(6.4,1.25) + \psplot[linecolor=red,linewidth=1.5pt]{0}{§\ON§9.424777961§\OFF§}{% x RadtoDeg dup sin exch 1.1 mul cos add} \end{pspicture} \end{lstlisting} @@ -3191,8 +3206,8 @@ is plotted from $0$ to $3\pi=9.424777961$. \end{pspicture} \end{center} \begin{lstlisting} -\psset{§\ON§unit=1cm§\OFF§} - \psplot[§\ON§xunit=0.25§\OFF§,§\ON§plotpoints=500§\OFF§,linecolor=red,linewidth=1.5pt]{0}{37.70}{% +\psset{§\ON§unit=1cm§\OFF§} + \psplot[§\ON§xunit=0.25§\OFF§,§\ON§plotpoints=500§\OFF§,linecolor=red,linewidth=1.5pt]{0}{37.70}{% x RadtoDeg dup sin exch 1.1 mul cos add} \end{pspicture} \end{lstlisting} @@ -3207,12 +3222,12 @@ is plotted from $0$ to $3\pi=9.424777961$. \end{pspicture} \end{center} \begin{lstlisting} -\psset{§\ON§unit=1cm§\OFF§} +\psset{§\ON§unit=1cm§\OFF§} \begin{pspicture}(-0.5,-1.25)(10,1.25) - \psplot[§\ON§xunit=0.0625§\OFF§,linecolor=red,linewidth=1.5pt,% - §\ON§plotpoints=5000§\OFF§]{0}{150.80}% + \psplot[§\ON§xunit=0.0625§\OFF§,linecolor=red,linewidth=1.5pt,% + §\ON§plotpoints=5000§\OFF§]{0}{150.80}% {x RadtoDeg dup sin exch 1.1 mul cos add} - \psaxes[§\ON§xunit=\psPi§\OFF§,§\ON§dx=0.5§\OFF§,§\ON§Dx=8§\OFF§]{->}(0,0)(-0.25,-1.25)(3.2,1.25) + \psaxes[§\ON§xunit=\psPi§\OFF§,§\ON§dx=0.5§\OFF§,§\ON§Dx=8§\OFF§]{->}(0,0)(-0.25,-1.25)(3.2,1.25) \end{pspicture} \end{lstlisting} @@ -3226,7 +3241,7 @@ is plotted from $0$ to $3\pi=9.424777961$. \end{center} \begin{lstlisting} \begin{pspicture}(-7,-1.5)(7,1.5) - \psaxes[trigLabels=true,§\ON§xunit=\psPi§\OFF§]{->}(0,0)(-2.2,-1.5)(2.2,1.5) + \psaxes[trigLabels=true,§\ON§xunit=\psPi§\OFF§]{->}(0,0)(-2.2,-1.5)(2.2,1.5) \psplot[linecolor=red,linewidth=1.5pt]{-7}{7}{x RadtoDeg sin} \end{pspicture} \end{lstlisting} @@ -3598,7 +3613,7 @@ with an drawing interval of $1.001\ldots 6$. \begin{LTXexample}[width=7cm] \begin{pspicture}(-0.5,-3.5)(6.5,1.5) \psplot[linewidth=2pt,plotpoints=100,linecolor=red]% - {1.04}{6}{x ln ln}[ /ln {log 0.4343 div} def ] % log(x) + {1.04}{6}[ /ln {log 0.4343 div} def ]{x ln ln} % log(x) \psaxes[ylogBase=e,Oy=-3]{->}(0,-3)(6.5,1.5) \uput[-90](6.5,-3){x} \uput[0](0,1.5){y} @@ -4218,8 +4233,11 @@ in the usual way as known from \LPack{pst-plot}. \psset{unit=1cm} + +\clearpage + %------------------------------------------------------------------------------------ -\subsection{New options for \CMD{readdata}} +\subsection{New options for \nxLcs{readdata}} %------------------------------------------------------------------------------------ @@ -4244,7 +4262,7 @@ the following data file has two text lines which shall be ignored by the \Lcs{re \begin{LTXexample}[width=4cm] \begin{filecontents*}{pstricks-add-data9.data} -some nonsense in this line ���time forcex forcey +some nonsense in this line ---time forcex forcey 0 0.2 1 1 2 4 @@ -4306,6 +4324,7 @@ multiplied, e.g. \Lcs{readdata} with \Lkeyword{nStep}=5 and When both, \verb|x/yStart/End| are defined then the values are also compared with both values. +\clearpage %-------------------------------------------------------------------------------------- \subsubsection{Example for \texttt{nStep/xStep}} @@ -4347,6 +4366,7 @@ of all records with the plotstyle option \Lkeyval{curve}. \end{pspicture} \end{LTXexample} +\clearpage %-------------------------------------------------------------------------------------- \subsubsection{Example for \texttt{nEnd/xEnd}} @@ -4384,6 +4404,7 @@ of all records with the plotstyle option \Lkeyval{curve}. \end{pspicture} \end{LTXexample} +\clearpage %-------------------------------------------------------------------------------------- @@ -4581,7 +4602,7 @@ best all data records. \readdata{\data}{LSM.data} \begin{psgraph}[arrows=->](0,0)(0,0)(8,8){.5\textwidth}{!} \listplot[plotstyle=dots]{\data} - \listplot[§\ON§plotstyle§\OFF§=§\ON§LSM§\OFF§,linecolor=red]{\data} + \listplot[§\ON§plotstyle§\OFF§=§\ON§LSM§\OFF§,linecolor=red]{\data} \end{psgraph} \end{lstlisting} @@ -4612,7 +4633,7 @@ They are preset with an empty value \verb+{}+. \psset{lly=-1.75cm} \begin{psgraph}[arrows=->](0,0)(0,0)(8,8){.5\textwidth}{!} \listplot[plotstyle=dots]{\data} - \listplot[§\ON§PstDebug§\OFF§=1,plotstyle=§\ON§LSM§\OFF§,§\ON§xStart§\OFF§=-0.5,§\ON§xEnd§\OFF§=8.5,linecolor=red]{\data} + \listplot[§\ON§PstDebug§\OFF§=1,plotstyle=§\ON§LSM§\OFF§,§\ON§xStart§\OFF§=-0.5,§\ON§xEnd§\OFF§=8.5,linecolor=red]{\data} \end{psgraph} \end{lstlisting} @@ -4654,11 +4675,11 @@ we subtract 0.003 from all x-values and then scale them with 0.003001651 2.259240127 \end{filecontents*} \readdata{\data}{LSM.data} -§\ON§\pstScalePoints§\OFF§(10000,1){ 0.003 sub }{} +§\ON§\pstScalePoints§\OFF§(10000,1){ 0.003 sub }{} \psset{lly=-1.75cm} \psgraph[arrows=->,Ox=0.0030,Dx=0.0001,dx=\psxunit](0,0)(3.2,3){10cm}{5cm} \listplot[showpoints=true,linewidth=1pt,linecolor=blue]{\data} - \listplot[PstDebug=1,plotstyle=§\ON§LSM§\OFF§,linewidth=0.1pt,linestyle=dashed,% + \listplot[PstDebug=1,plotstyle=§\ON§LSM§\OFF§,linewidth=0.1pt,linestyle=dashed,% xStart=-0.25,xEnd=3.3]{\data} \endpsgraph \end{lstlisting} @@ -4741,7 +4762,7 @@ x sin dup mul x cos dup mul add sqrt \resetOptions %-------------------------------------------------------------------------------------- -\section{\CMD{pstScalePoints}} +\section{\nxLcs{pstScalePoints}} %-------------------------------------------------------------------------------------- The syntax is \begin{BDef} @@ -4920,11 +4941,11 @@ as for the x-axis. \readdata{\data}{demo1.data} \pstScalePoints(1,0.000001){}{}% (x,y){additional x operator}{y op} \psset{llx=-1cm,lly=-1cm} -§\ON§\begin{psgraph}§\OFF§[axesstyle=frame,xticksize=0 759,yticksize=0 25,% +§\ON§\begin{psgraph}§\OFF§[axesstyle=frame,xticksize=0 759,yticksize=0 25,% subticks=0,ylabelFactor=\cdot 10^6, Dx=5,dy=100\psyunit,Dy=100](0,0)(25,750){10cm}{6cm} % parameters \listplot[linecolor=red,linewidth=2pt,showpoints=true]{\data} -§\ON§\end{psgraph}§\OFF§ +§\ON§\end{psgraph}§\OFF§ \end{lstlisting} %----------------------------------------------------------------------------- @@ -4939,7 +4960,7 @@ In the following example, the y unit gets the same value as the one for the x-ax \begin{lstlisting} \psset{llx=-1cm,lly=-0.5cm,ury=0.5cm} -\begin{psgraph}(0,0)(5,3){6cm}§\ON§{!}§\OFF§ % x-y-axis with same unit +\begin{psgraph}(0,0)(5,3){6cm}§\ON§{!}§\OFF§ % x-y-axis with same unit \psplot[linecolor=red,linewidth=1pt]{0}{5}{x dup mul 10 div} \end{psgraph} \end{lstlisting} @@ -4959,11 +4980,11 @@ In the following example, the y unit gets the same value as the one for the x-ax \begin{lstlisting} \readdata{\data}{demo1.data} -\psset{§\ON§xAxisLabel§\OFF§=x-Axis,§\ON§yAxisLabel§\OFF§=y-Axis,llx=-.5cm,lly=-1cm,ury=0.5cm, - §\ON§xAxisLabelPos§\OFF§={c,-1},§\ON§yAxisLabelPos§\OFF§={-7,c}} +\psset{§\ON§xAxisLabel§\OFF§=x-Axis,§\ON§yAxisLabel§\OFF§=y-Axis,llx=-.5cm,lly=-1cm,ury=0.5cm, + §\ON§xAxisLabelPos§\OFF§={c,-1},§\ON§yAxisLabelPos§\OFF§={-7,c}} \pstScalePoints(1,0.00000001){}{} \begin{psgraph}[axesstyle=frame,xticksize=0 7.5,yticksize=0 25,subticksize=1, - §\ON§ylabelFactor§\OFF§=\cdot 10^8,Dx=5,Dy=1,xsubticks=2](0,0)(25,7.5){5.5cm}{5cm} + §\ON§ylabelFactor§\OFF§=\cdot 10^8,Dx=5,Dy=1,xsubticks=2](0,0)(25,7.5){5.5cm}{5cm} \listplot[linecolor=red, linewidth=2pt, showpoints=true]{\data} \end{psgraph} \end{lstlisting} @@ -4995,7 +5016,7 @@ In the following example, the y unit gets the same value as the one for the x-ax \readdata{\data}{demo1.data} \pstScalePoints(1,0.2){}{log} \psset{lly=-0.75cm} -\psgraph[§\ON§ylogBase§\OFF§=10,Dx=5,Dy=1,subticks=5](0,0)(25,2){12cm}{4cm} +\psgraph[§\ON§ylogBase§\OFF§=10,Dx=5,Dy=1,subticks=5](0,0)(25,2){12cm}{4cm} \listplot[linecolor=red, linewidth=2pt, showpoints=true]{\data} \endpsgraph \end{lstlisting} @@ -5041,8 +5062,8 @@ In the following example, the y unit gets the same value as the one for the x-ax \readdata{\data}{demo2.data}% \readdata{\dataII}{demo3.data}% \pstScalePoints(1,1){1989 sub}{} -\psset{llx=-0.5cm,lly=-1cm, §\ON§xAxisLabel§\OFF§=Year,§\ON§yAxisLabel§\OFF§=Whatever,% - §\ON§xAxisLabelPos§\OFF§={c,-0.4in},§\ON§yAxisLabelPos§\OFF§={-0.4in,c}} +\psset{llx=-0.5cm,lly=-1cm, §\ON§xAxisLabel§\OFF§=Year,§\ON§yAxisLabel§\OFF§=Whatever,% + §\ON§xAxisLabelPos§\OFF§={c,-0.4in},§\ON§yAxisLabelPos§\OFF§={-0.4in,c}} \psgraph[axesstyle=frame,Dx=2,Ox=1989,subticks=2](0,0)(12,6){4in}{2in}% \listplot[linecolor=red,linewidth=2pt]{\data} \listplot[linecolor=blue,linewidth=2pt]{\dataII} @@ -5356,7 +5377,7 @@ radian unit! \psset{linecolor=red, arrows=<->, arrowscale=2} \multido{\n=-7+1}{8}{\psplotTangent{\n}{1}{\F}} \psset{linecolor=magenta, arrows=<->, arrowscale=2}% - \multido{\n=0+1}{8}{\psplotTangent[linecolor=blue, §\ON§Derive=\Fp§\OFF§]{\n}{1}{\F}} + \multido{\n=0+1}{8}{\psplotTangent[linecolor=blue, §\ON§Derive=\Fp§\OFF§]{\n}{1}{\F}} \end{pspicture} \end{lstlisting} @@ -5381,7 +5402,7 @@ radian unit! \psplot[linewidth=1.5pt,algebraic,plotpoints=500]{-7.5}{7.5}{\Falg} \multido{\n=-7+1}{8}{\psplotTangent[linecolor=red,arrows=<->,arrowscale=2,algebraic]{\n}{1}{\Falg}} \multido{\n=0+1}{8}{\psplotTangent[linecolor=magenta,% - arrows=<->,arrowscale=2,algebraic,§\ON§Derive={\Fpalg}§\OFF§]{\n}{1}{\Falg}} + arrows=<->,arrowscale=2,algebraic,§\ON§Derive={\Fpalg}§\OFF§]{\n}{1}{\Falg}} \end{pspicture} \end{lstlisting} @@ -7261,16 +7282,20 @@ is the first plotted line ($y=1$). With the option \egroup %-------------------------------------------------------------------------------------- -\section{\nxLcs{psforeach}} +\section{\nxLcs{psforeach} and \nxLcs{psForeach}} %-------------------------------------------------------------------------------------- -The macro \Lcs{psforeach} allows a loop with an individual -increment. +The macro \Lcs{psforeach} allows a loop with an individual increment. \begin{BDef} -\Lcs{psforeach}\Largb{variable}\Largb{value list}\Largb{action} +\Lcs{psforeach}\Largb{variable}\Largb{value list}\Largb{action}\\ +\Lcs{psForeach}\Largb{variable}\Largb{value list}\Largb{action} \end{BDef} +With \Lcs{psforeach} the \Larg{action} is done inside a group and for \Lcs{psForeach} not. +This maybe useful when using the macro to create tabular cells, which are +alread grouped itself. + \begin{LTXexample} \begin{pspicture}[showgrid=true](5,5) \psforeach{\nA}{0, 1, 1.5, 3, 5}{% @@ -7278,9 +7303,36 @@ increment. \end{pspicture} \end{LTXexample} +\begin{LTXexample}[pos=t] +%\usepackage{pst-func} +\makeatletter +\newcommand*\InitToks{\toks@={}} +\newcommand\AddToks[1]{\toks@=\expandafter{\the\toks@ #1}} +\newcommand*\PrintToks{\the\toks@} +\newcommand*{\makeTable}[4][5mm]{% + \begingroup + \InitToks% + \AddToks{\begin{tabular}{|*{#2}{>{\RaggedLeft}p{#1}|}@{}l@{}}\cline{1-#2}} + \psForeach{\iA}{#3}{\expandafter\AddToks\expandafter{\iA & }} + \AddToks{\\\cline{1-#2}}% + \psForeach{\iA}{#3}{\expandafter\AddToks\expandafter{\expandafter% + \psPrintValue\expandafter{\iA\space /x ED #4} & }} + \AddToks{\\\cline{1-#2}\end{tabular}}% + \PrintToks + \endgroup +} +\makeatother + +\sffamily +\psset{decimals=2,valuewidth=7,xShift=-20} +$y=2^x$\\ +\makeTable[1cm]{6}{2,4,6,8,10,12}{2 x exp} +\end{LTXexample} + + %-------------------------------------------------------------------------------------- -\section{\CMD{resetOptions}} +\section{\nxLcs{resetOptions}} %-------------------------------------------------------------------------------------- Sometimes it is difficult to know what options, which are changed @@ -7322,7 +7374,7 @@ This refers to all options of the packages \LPack{pstricks}, \Lps{aload} & $v$&$x_1\quad x_2\quad \cdots\quad x_n\quad v$\\ \Lps{astore} & $x_1\quad x_2\quad \cdots\quad x_n\quad v$ & $[v]$\\ \Lps{pop} & $x$ & --\\ - \Lps{dup} & $x$ & $x\quad x$ \\ + \Lps{dup} & $x$ & $x\quad x$ \\\hline % \Lps{roll} & $x_1\quad x_2\quad \cdots\quad x_n\quad n p$ &\\\hline \end{tabular}} \caption{Some primitive PostScript macros}\label{tab:primpost} -- cgit v1.2.3