summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pstricks-examples-en/36-00-124.ltx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/pstricks-examples-en/36-00-124.ltx')
-rw-r--r--Master/texmf-dist/doc/latex/pstricks-examples-en/36-00-124.ltx43
1 files changed, 43 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/pstricks-examples-en/36-00-124.ltx b/Master/texmf-dist/doc/latex/pstricks-examples-en/36-00-124.ltx
new file mode 100644
index 00000000000..203bf015096
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pstricks-examples-en/36-00-124.ltx
@@ -0,0 +1,43 @@
+%%
+%% A DANTE-Edition example
+%%
+%%
+%% Copyright (C) 2011 Herbert Voss
+%%
+%% It may be distributed and/or modified under the conditions
+%% of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%%
+%% See http://www.latex-project.org/lppl.txt for details.
+%%
+%%
+%% ====
+% Show page(s) 1
+%%
+\documentclass[]{article}
+\pagestyle{empty}
+\setlength\textwidth{375.57637pt}
+\setlength\parindent{0pt}
+
+\usepackage{pstricks,pst-node,pst-tree,calc}
+\definecolor{darkyellow}{rgb}{1, 0.9, 0}
+\newcommand\cbox[1]{\colorbox{darkyellow}{#1}}
+\newcommand*\pbox[2]{\parbox[t]{\widthof{#1}}{\footnotesize #2}}
+
+\begin{document}
+\begin{psmatrix}[rowsep=0pt,colsep=0pt]
+ \verb+if (+ &[name=rn24a] \cbox{Condition}
+ & \verb+) {+ &[name=rn25a] \cbox{Command block 1}
+ & \verb+} else {+ &[name=rn26a] \cbox{Command block 2} & \verb+}+\\[0.75cm]
+ &[name=rn24e] \pbox{( Condition )}{The condition must be true or false}
+&&[name=rn25e] \pbox{\{ Command block 1 \}}{%
+ This command is executed if the condition
+ is $\neq0$, which means true.}
+&&[name=rn26e]\pbox{\{ Anweisungsblock 2 \}}{%
+ This command is executed if the condition
+ is $=0$, which means false.}
+\end{psmatrix}
+\nccurve[angleA=-90,angleB=90]{->}{rn24a}{rn24e}
+\nccurve[angleA=-90,angleB=90]{->}{rn25a}{rn25e}
+\nccurve[angleA=-90,angleB=90]{->}{rn26a}{rn26e}
+\end{document}