summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-10-11 21:21:12 +0000
committerKarl Berry <karl@freefriends.org>2015-10-11 21:21:12 +0000
commit7d6d0cfb058a982c069407743dcf965370b00bcc (patch)
tree1087dbd962eec57c2f6060c1974ccb5f57eda0a6 /Master/texmf-dist/tex
parentc42b50b291d00f547400888b81ef4d2bcad45142 (diff)
pst-stru (11oct15)
git-svn-id: svn://tug.org/texlive/trunk@38613 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/pst-stru/pst-stru.tex302
-rw-r--r--Master/texmf-dist/tex/latex/pst-stru/pst-stru.sty2
2 files changed, 141 insertions, 163 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-stru/pst-stru.tex b/Master/texmf-dist/tex/generic/pst-stru/pst-stru.tex
index 1500a80ed77..ea4bcf05ccf 100644
--- a/Master/texmf-dist/tex/generic/pst-stru/pst-stru.tex
+++ b/Master/texmf-dist/tex/generic/pst-stru/pst-stru.tex
@@ -1,20 +1,13 @@
+%% BEGIN pst-stru.tex
%%
-%% This is file `pst-stru.tex',
+%% This extension try to deals with wavelength in optics.
+%% Beginning with spectra
%%
-%% IMPORTANT NOTICE:
-%%
-%% Package `pst-stru.tex'
-%%
-%% Authors : Giuseppe Matarazza <joematara@hotmail.com>
-%% Manuel LUQUE <Mluque5130@aol.com>
-%% Herbert Voss <voss@pstricks.de> (pst-xkey)
+%% COPYRIGHT by Giuseppe Mattarazzo, Manuel Luque
%%
%% This program can be redistributed and/or modified under the terms
-%% of the LaTeX Project Public License Distributed from CTAN archives
-%% in directory macros/latex/base/lppl.txt.
-%%
-%% DESCRIPTION:
-%% `pst-stru' is a PSTricks package for civil engineers
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt.
%%
\csname PSTCircLoaded\endcsname
\let\PSTCircLoaded\endinput
@@ -24,14 +17,14 @@
\ifx\PSTnodesLoaded\endinput\else\input pst-plot.tex\fi
\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey\fi
%
-\def\fileversion{0.12}%
-\def\filedate{2006/10/26}%
-\message{`PST-Stru v\fileversion, \filedate\space (GM, ML)}%
+\def\fileversion{0.13}%
+\def\filedate{2015/10/08}%
+\message{`PST-Stru v\fileversion,
+ \filedate\space (Giuseppe Matarazzo, Manuel Luque, hv)}%
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
\pst@addfams{pst-stru}
%
-\SpecialCoor
\psset{dimen=middle}
\newdimen\Start
\newdimen\debut
@@ -47,83 +40,81 @@
\psset{position=0.5,node=false,OffsetLabel=0.70,OffsetDipole=0,AngleLabel=0}
%Commande permettant de placer un dipôle entre deux noeuds
%
-\def\circput{\@ifnextchar[{\pst@circput}{\pst@circput[]}}
-\def\pst@circput[#1](#2)(#3)#4#5{{%
-\psset{#1}
-\Pst@Pos=\psk@circuit@Pos pt
-\multiply\Pst@Pos by 2
-\def\Position{\pst@number\Pst@Pos}
-\pst@getcoor{#2}\pst@tempa
-\pst@getcoor{#3}\pst@tempb
-\pnode(!%
- /k \psk@circuit@Pos\space def
- \pst@tempa /Y1 exch \pst@number\psyunit div def
- /X1 exch \pst@number\psxunit div def
- \pst@tempb /Y2 exch \pst@number\psyunit div def
- /X2 exch \pst@number\psxunit div def
- /XM X1 1 k sub mul X2 k mul add def
- /YM Y1 1 k sub mul Y2 k mul add def
- /deno X2 X1 sub def
- /num Y2 Y1 sub def
- /angle num deno Atan def
- /XE1 XM 1 angle cos mul sub def
- /YE1 YM 1 angle sin mul sub def
- /XE2 XM 1 angle cos mul add def
- /YE2 YM 1 angle sin mul add def
- XM YM){M@}
-\pnode(! XE1 YE1){E@1}
-\pnode(! XE2 YE2){E@2}
-\pcline(E@1)(#2)
-\pcline(E@2)(#3)
-\ncline[linestyle=none]{#2}{#3}
-\ncput[npos=\Position]{\pnode{Temp}}
-\pcline[linestyle=none,offset=\psk@Dipole@Offset](#2)(Temp)
-\lput{:U}{#4}
-\pcline[linestyle=none,offset=\psk@Label@Offset](#2)(Temp)
-\lput{\psk@Angle@Label}{#5}
- }}
+\def\circput{\pst@object{circput}}
+\def\circput@i(#1)(#2)#3#4{{%
+ \begin@SpecialObj
+ \Pst@Pos=\psk@circuit@Pos pt%
+ \multiply\Pst@Pos by 2
+ \def\Position{\pst@number\Pst@Pos}
+ \pst@getcoor{#1}\pst@tempA
+ \pst@getcoor{#2}\pst@tempB
+ \pnode(!%
+ /k \psk@circuit@Pos\space def
+ \pst@tempA /Y1 exch \pst@number\psyunit div def
+ /X1 exch \pst@number\psxunit div def
+ \pst@tempB /Y2 exch \pst@number\psyunit div def
+ /X2 exch \pst@number\psxunit div def
+ /XM X1 1 k sub mul X2 k mul add def
+ /YM Y1 1 k sub mul Y2 k mul add def
+ /deno X2 X1 sub def
+ /num Y2 Y1 sub def
+ /angle num deno Atan def
+ /XE1 XM 1 angle cos mul sub def
+ /YE1 YM 1 angle sin mul sub def
+ /XE2 XM 1 angle cos mul add def
+ /YE2 YM 1 angle sin mul add def
+ XM YM){M@}
+ \pnode(! XE1 YE1){E@1}
+ \pnode(! XE2 YE2){E@2}
+ \pcline(E@1)(#2)
+ \pcline(E@2)(#3)
+ \ncline[linestyle=none]{#1}{#2}
+ \ncput[npos=\Position]{\pnode{Temp}}
+ \pcline[linestyle=none,offset=\psk@Dipole@Offset](#1)(Temp)
+ \lput{:U}{#3}
+ \pcline[linestyle=none,offset=\psk@Label@Offset](#1)(Temp)
+ \lput{\psk@Angle@Label}{#4}
+ \end@SpecialObj
+}\ignorespaces}
% Commande permettant de dessiner une flèche de longueur variable
% entre deux noeuds
\define@key[psset]{pst-stru}{length}{\edef\psk@circuit@Arrowlenght{#1}}
\define@key[psset]{pst-stru}{start}{\edef\psk@circuit@start{#1}}
\psset{length=1,start=0.5}
%
-\def\psArrow{\@ifnextchar[{\pst@Arrow}{\pst@Arrow[]}}
-\def\pst@Arrow[#1](#2)(#3)#4{{%
-\psset{#1}
-\pst@getcoor{#2}\pst@tempa
-\pst@getcoor{#3}\pst@tempb
-\pnode(!%
- /length \psk@circuit@Arrowlenght\space def
+\def\psArrow{\pst@object{psArrow}}
+\def\psArrow@i(#1)(#2)#3{{%
+ \begin@SpecialObj
+ \pst@getcoor{#1}\pst@tempA
+ \pst@getcoor{#2}\pst@tempB
+ \pnode(!%
+ /stru@length \psk@circuit@Arrowlenght\space def
/K \psk@circuit@start\space def
- \pst@tempa /Y1 exch \pst@number\psyunit div def
+ \pst@tempA /Y1 exch \pst@number\psyunit div def
/X1 exch \pst@number\psxunit div def
- \pst@tempb /Y2 exch \pst@number\psyunit div def
+ \pst@tempB /Y2 exch \pst@number\psyunit div def
/X2 exch \pst@number\psxunit div def
/XM X1 1 K sub mul X2 K mul add def
/YM Y1 1 K sub mul Y2 K mul add def
- \pst@tempa /Y1 exch \pst@number\psyunit div def
+ \pst@tempA /Y1 exch \pst@number\psyunit div def
/X1 exch \pst@number\psxunit div def
- \pst@tempb /Y2 exch \pst@number\psyunit div def
+ \pst@tempB /Y2 exch \pst@number\psyunit div def
/X2 exch \pst@number\psxunit div def
/Angle Y2 Y1 sub X2 X1 sub Atan def
- /XE1 XM length Angle cos mul add def
- /YE1 YM length Angle sin mul add def
+ /XE1 XM stru@length Angle cos mul add def
+ /YE1 YM stru@length Angle sin mul add def
XE1 YE1){E@}%
-\pnode(! XM YM){M@@}
-\psset{arrows=->}
-\psline[#1](M@@)(E@)%
-\pcline[linestyle=none,offset=\psk@Label@Offset,arrows=-](M@@)(E@)
-\lput{\psk@Angle@Label}{#4}
-}}
+ \pnode(! XM YM){M@@}
+ \psset{arrows=->}
+ \psline(M@@)(E@)%
+ \pcline[linestyle=none,offset=\psk@Label@Offset,arrows=-](M@@)(E@)
+ \lput{\psk@Angle@Label}{#3}
+ \end@SpecialObj
+}\ignorespaces}
%
-\def\node(#1){%
-\pscircle*(#1){2\pslinewidth}
-}
-\def\arrow{%
- \psline[arrowinset=0,arrowscale=1.0,linewidth=0.75\pslinewidth]{->}(-2,0)(0,0)%
- }
+\def\node(#1){\pscircle*(#1){2\pslinewidth}}
+\def\arrow{\psline[arrowinset=0,arrowscale=1.0,linewidth=0.75\pslinewidth]{->}(-2,0)(0,0)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Structural Engineering: MACROs
% Updating:
@@ -138,26 +129,21 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\fixedend{%
\psframe[fillstyle=vlines,linestyle=none,hatchwidth=0.5\pslinewidth](-0.5,0)(0.5,-0.2)
- \psline[linewidth=1.5\pslinewidth](-0.5,0)(0.5,0)
- }
+ \psline[linewidth=1.5\pslinewidth](-0.5,0)(0.5,0)}
\def\hinge{%
\psframe[fillstyle=vlines,linestyle=none,hatchwidth=0.5\pslinewidth](-0.3,-0.45)(0.3,-0.3)
\psline[linewidth=1.5\pslinewidth](-0.3,-0.3)(0.3,-0.3)
\psline(0,0)(-0.3,-0.3)
- \psline(0,0)(0.3,-0.3)
- }
+ \psline(0,0)(0.3,-0.3)}
-\def\interhinge{%
- \pscircle[fillstyle=solid](0,0){0.1}
- }
+\def\interhinge{\pscircle[fillstyle=solid](0,0){0.1}}
\def\guide{%
\psframe[fillstyle=vlines,linestyle=none,hatchwidth=0.5\pslinewidth](-0.3,-0.3)(0.3,-0.1)
\psline[linewidth=1.5\pslinewidth](-0.3,-0.1)(0.3,-0.1)
\psline[linewidth=1.5\pslinewidth](-0.3,0.1)(0.3,0.1)
- \psframe[fillstyle=vlines,linestyle=none,hatchwidth=0.5\pslinewidth](-0.3,0.3)(0.3,0.1)
- }
+ \psframe[fillstyle=vlines,linestyle=none,hatchwidth=0.5\pslinewidth](-0.3,0.3)(0.3,0.1)}
\def\roller{%
\psframe[fillstyle=vlines,linestyle=none,hatchwidth=0.5\pslinewidth](-0.3,-0.7)(0.3,-0.5)
@@ -166,58 +152,56 @@
\psline(0,0)(0.3,-0.3)
\psline(-0.3,-0.5)(0.3,-0.5)
\pscircle(-0.15,-0.4){0.1}
- \pscircle(0.15,-0.4){0.1}
- }
+ \pscircle(0.15,-0.4){0.1}}
\def\noclockCouple{%
\psset{arrowsize=1.8mm}
- \psarc{->}(0,0){0.5}{280}{60}
- }
+ \psarc{->}(0,0){0.5}{280}{60}}
\def\clockCouple{%
\psset{arrowsize=1.8mm}
- \psarc{<-}(0,0){0.5}{120}{260}
- }
+ \psarc{<-}(0,0){0.5}{120}{260}}
%% Macro \psArrowCivil
%% ===================
-\define@key[psset]{pst-stru}{RotArrows}{\edef\psk@circ@RotArrows{#1}}
+\define@key[psset]{pst-stru}{RotArrows}{\def\psk@circ@RotArrows{#1}}
\psset{RotArrows=0}
-\def\psArrowCivil{\@ifnextchar[{\pst@ArrowCivil}{\pst@ArrowCivil[]}}
-
-\def\pst@ArrowCivil[#1](#2)(#3)#4{{%
-\psset{#1}
-\pst@getcoor{#2}\pst@tempa
-\pst@getcoor{#3}\pst@tempb
-\pnode(!%
- /length \psk@circuit@Arrowlenght\space def
- /K \psk@circuit@start\space def
- \pst@tempa /Y1 exch \pst@number\psyunit div def
+\def\psArrowCivil{\pst@object{psArrowCivil}}
+\def\psArrowCivil@i(#1)(#2)#3{%
+% \begin@SpecialObj
+ \begingroup
+ \use@par
+ \pst@getcoor{#1}\pst@stru@tempA
+ \pst@getcoor{#2}\pst@stru@tempB
+ \pnode(!
+ /stru@length \psk@circuit@Arrowlenght\space def
+ /stru@K \psk@circuit@start\space def
+ \pst@stru@tempA /Y1 exch \pst@number\psyunit div def
/X1 exch \pst@number\psxunit div def
- \pst@tempb /Y2 exch \pst@number\psyunit div def
+ \pst@stru@tempB /Y2 exch \pst@number\psyunit div def
/X2 exch \pst@number\psxunit div def
- /XM X1 1 K sub mul X2 K mul add def
- /YM Y1 1 K sub mul Y2 K mul add def
- \pst@tempa /Y1 exch \pst@number\psyunit div def
+ /stru@XM X1 1 stru@K sub mul X2 stru@K mul add def
+ /stru@YM Y1 1 stru@K sub mul Y2 stru@K mul add def
+ \pst@stru@tempA /Y1 exch \pst@number\psyunit div def
/X1 exch \pst@number\psxunit div def
- \pst@tempb /Y2 exch \pst@number\psyunit div def
+ \pst@stru@tempB /Y2 exch \pst@number\psyunit div def
/X2 exch \pst@number\psxunit div def
- /Angle Y2 Y1 sub X2 X1 sub Atan def
- /RotArrows 180 90 \psk@circ@RotArrows\space add Angle add sub def
- /XC XM length RotArrows cos mul sub def
- /YC YM length RotArrows sin mul add def
+ /stru@Angle Y2 Y1 sub X2 X1 sub Atan def
+ /RotArrows 180 90 \psk@circ@RotArrows\space add stru@Angle add sub def
+ /XC stru@XM stru@length RotArrows cos mul sub def
+ /YC stru@YM stru@length RotArrows sin mul add def
XC YC){C@}%
-\pnode(! XM YM){M@@}
-\psset{arrows=->}
-\psline[#1](C@)(M@@)%
-\pcline[linestyle=none,offset=\psk@Label@Offset,arrows=-](C@)(M@@)
-%\lput{\psk@Angle@Label}{#4}
-\lput{:U}{#4}
-}}
+ \pnode(! stru@XM stru@YM){M@@}
+ \psset{arrows=->}
+ \psline(C@)(M@@)%
+ \pcline[linestyle=none,offset=\psk@Label@Offset,arrows=-](C@)(M@@)
+ %\lput{\psk@Angle@Label}{#3}
+ \lput{:U}{#3}
+% \end@SpecialObj
+ \endgroup
+ \ignorespaces}
%%
-%% End: Macro \psArrowCivil %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
%% Starting Macro \triload
%% =======================
%
@@ -226,45 +210,43 @@
\define@key[psset]{pst-stru}{P}{\edef\psk@triload@P{#1}}
\define@key[psset]{pst-stru}{scaleFactor}{\edef\psk@triload@F{#1}}
\psset{K=3,L=6,P=6,scaleFactor=0.15}
-\def\triload{\@ifnextchar[{\pst@triload}{\pst@triload[]}}
-\def\pst@triload[#1]{{%
-\psset{#1}
-\pnode(0,0){A}
-\pnode(! /xB \psk@triload@L\space \psk@triload@K\space mul def xB 0){B}
-\pnode(! /xC \psk@triload@K\space 1 add \psk@triload@L\space mul def xC 0){C}
%
-\pnode(! /xB1 \psk@triload@L\space \psk@triload@K\space mul def xB1 -1){B1}
-\pnode(! /xC1 \psk@triload@K\space 1 add \psk@triload@L\space mul def xC1 -1){C1}
+\def\triload{\pst@object{triload}}
+\def\triload@i{{%
+ \begin@SpecialObj
+ \pnode(0,0){A}
+ \pnode(! /xB \psk@triload@L\space \psk@triload@K\space mul def xB 0){B}
+ \pnode(! /xC \psk@triload@K\space 1 add \psk@triload@L\space mul def xC 0){C}
%
-\pnode(! /xB2 \psk@triload@L\space \psk@triload@K\space mul def xB2 -3){B2}
-\pnode(! /xC2 \psk@triload@K\space 1 add \psk@triload@L\space mul def xC2 -3){C2}
+ \pnode(! /xB1 \psk@triload@L\space \psk@triload@K\space mul def xB1 -1){B1}
+ \pnode(! /xC1 \psk@triload@K\space 1 add \psk@triload@L\space mul def xC1 -1){C1}
%
-\pnode(! /xC3 \psk@triload@K\space 1 add \psk@triload@L\space mul 0.25 add def xC3 0.5){C3}
+ \pnode(! /xB2 \psk@triload@L\space \psk@triload@K\space mul def xB2 -3){B2}
+ \pnode(! /xC2 \psk@triload@K\space 1 add \psk@triload@L\space mul def xC2 -3){C2}
%
-\rput{0}(C){\hinge}
-\rput{0}(B){\roller}
-\psline[linecolor=red,fillcolor=yellow,fillstyle=solid](0,0)(!xC 0)(! xC 1)(0,0)
+ \pnode(! /xC3 \psk@triload@K\space 1 add \psk@triload@L\space mul 0.25 add def xC3 0.5){C3}
%
+ \rput{0}(C){\hinge}
+ \rput{0}(B){\roller}
+ \psline[linecolor=red,fillcolor=yellow,fillstyle=solid](0,0)(!xC 0)(! xC 1)(0,0)
%
\rput(1,-2){$k=\psk@triload@K\space \quad l=\psk@triload@L\space$}
-
\rput(C3){\Large p}
-
\rput(0,-0.4){\Large A}
\rput(B1){\Large B}
\rput(C1){\Large C}
%
-\pcline[offset=0,linecolor=blue]{|-|}(0,-3)(B2)
-\lput*{:U}{\bf $k\cdot l$}
-\pcline[offset=0,linecolor=blue]{|-|}(B2)(C2)
-\lput*{:U}{\bf $l$}
+ \pcline[offset=0,linecolor=blue]{|-|}(0,-3)(B2)
+ \lput*{:U}{\bf $k\cdot l$}
+ \pcline[offset=0,linecolor=blue]{|-|}(B2)(C2)
+ \lput*{:U}{\bf $l$}
% --------- Triangular Distributed Load -------------------------
-\multido{\nStart=1.00+0.025}{-37}{%
-\psArrowCivil[RotArrows=0,length=\nStart,start=\nStart,%
- linecolor=magenta](A)(C){}}
+ \multido{\nStart=1.000+0.025}{-37}{%
+ \psArrowCivil[RotArrows=0,length=\nStart,start=\nStart,linecolor=magenta](A)(C){}%
+ }
% définir les fonctions ici
-\pnode(! /func1 {\psk@triload@K\space 1 add \psk@triload@P\space exch div
+ \pnode(! /func1 {\psk@triload@K\space 1 add \psk@triload@P\space exch div
-6.0 div \psk@triload@L\space div x mul x mul x mul
\psk@triload@F\space mul neg} def
/func2 {\psk@triload@K\space 1 add \psk@triload@P\space exch div
@@ -286,29 +268,25 @@
0 0){Temp}
%----------- Bending Moment in span AB ----------------------
-\pscustom[linecolor=blue,linewidth=1pt,fillstyle=hlines]{
-\psplot{0}{xB}{func1}
-\psline(B)(A)}
+ \pscustom[linecolor=blue,linewidth=1pt,fillstyle=hlines]{
+ \psplot{0}{xB}{func1}
+ \psline(B)(A)}
%----------- Shear in span AB ----------------------
-\pscustom[linecolor=green,linewidth=1pt,fillstyle=crosshatch]{
+ \pscustom[linecolor=green,linewidth=1pt,fillstyle=crosshatch]{
\psplot{0}{xB}{func2}
\psline(B)(A)}
%
-% ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
-%
-% ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
-%
%----------- Bending Moment in span BC ----------------------
-\pscustom[linecolor=blue,linewidth=1pt,fillstyle=hlines]{
-\psplot{xB}{xC}{func3}
-\psline(C)(B)}
+ \pscustom[linecolor=blue,linewidth=1pt,fillstyle=hlines]{
+ \psplot{xB}{xC}{func3}
+ \psline(C)(B)}
%----------- Shear in span BC ----------------------
- \pscustom[linecolor=green,linewidth=1pt,fillstyle=crosshatch]{
- \psplot{xB}{xC}{func4}
-
-% Closing Shear diagram in bearing B (right side)
- \psline(C)(B)(! xB /x xB def func4)}
-}}
+ \pscustom[linecolor=green,linewidth=1pt,fillstyle=crosshatch]{
+ \psplot{xB}{xC}{func4}
+ % Closing Shear diagram in bearing B (right side)
+ \psline(C)(B)(! xB /x xB def func4)}
+ \end@SpecialObj
+}\ignorespaces}
\catcode`\@=\PstAtCode\relax
%%
%% End: Macro \triload %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/Master/texmf-dist/tex/latex/pst-stru/pst-stru.sty b/Master/texmf-dist/tex/latex/pst-stru/pst-stru.sty
index 7efee09646b..1c24c31af0e 100644
--- a/Master/texmf-dist/tex/latex/pst-stru/pst-stru.sty
+++ b/Master/texmf-dist/tex/latex/pst-stru/pst-stru.sty
@@ -1,6 +1,6 @@
\RequirePackage{pstricks}
\RequirePackage{multido}
-\ProvidesPackage{pst-stru}[2006/10/25 package wrapper for
+\ProvidesPackage{pst-stru}[2005/11/09 package wrapper for
pst-stru.tex (hv)]
\input{pst-stru.tex}
\ProvidesFile{pst-stru.tex}