summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/syntaxdi
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-10-17 21:01:27 +0000
committerKarl Berry <karl@freefriends.org>2020-10-17 21:01:27 +0000
commit0e5e2f0d8a0472c17785e552e27fa41b0930c74c (patch)
tree74cc3b9c5fba575cb5f2252b08ee07dbaa7cf71f /Master/texmf-dist/tex/latex/syntaxdi
parentcb284828fadb6a1c28889b823132099c337ceea6 (diff)
syntaxdi (17oct20)
git-svn-id: svn://tug.org/texlive/trunk@56685 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/syntaxdi')
-rw-r--r--Master/texmf-dist/tex/latex/syntaxdi/syntaxdi.sty117
1 files changed, 117 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/syntaxdi/syntaxdi.sty b/Master/texmf-dist/tex/latex/syntaxdi/syntaxdi.sty
new file mode 100644
index 00000000000..97e0672fdc2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/syntaxdi/syntaxdi.sty
@@ -0,0 +1,117 @@
+% \subsection{Das Paket \texttt{syntaxdi}}
+%
+% Beginn der Definition, Voraussetzung der \LaTeXe{} Version und die
+% eigene Identifizierung
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{syntaxdi}[2020/10/16 v0.8.2 %
+ Syntaxdiagramme mit TikZ]
+% \end{macrocode}
+% Einbinden der benötigten Pakete
+% \begin{macrocode}
+\RequirePackage{tikz}
+\usetikzlibrary{chains}
+\usetikzlibrary{arrows,shadows,shapes.misc,scopes}
+% \end{macrocode}
+%
+% \subsubsection{TikZ-Definitionen}
+%
+% Definition für nicht terminale Symbole für Syntaxdiagramme in TikZ
+% \begin{macrocode}
+\tikzset{
+ fnonterminal/.style={
+ rectangle,
+ minimum size=6mm,
+ text height=1.5ex,text depth=.25ex,
+ very thick,
+ draw=red!50!black!50, % 50% red und 50% black,
+ top color=white, % oben: weisser Schatten ...
+ bottom color=red!50!black!20, % unten: anderer Schatten
+ font=\itshape
+ }
+}
+\tikzset{
+ nonterminal/.style={
+ % Die Form:
+ rectangle,
+ % Die Größe:
+ minimum size=6mm,
+ text height=1.5ex,text depth=.25ex,
+ % Der Rand:
+ very thick,
+ draw=red!50!black!50, % 50% red und 50% black,
+ % gemischt mit 50% white
+ % Füllfarbe:
+ top color=white, % oben: weisser Schatten ...
+ bottom color=red!50!black!20, % unten: anderer Schatten
+ % Font
+ font=\itshape
+ }
+}
+% \end{macrocode}
+%
+% Definitionen für terminale Symbole im Syntaxdiagramm in TikZ
+% \begin{macrocode}
+\tikzset{
+ fterminal/.style={
+ rounded rectangle,
+ minimum size=6mm,
+ very thick,draw=black!50,
+ text height=1.5ex,text depth=.25ex,
+ top color=white,bottom color=black!20,
+ font=\ttfamily
+ }
+}
+\tikzset{
+ terminal/.style={
+ % Die Form:
+ rounded rectangle,
+ minimum size=6mm,
+ % Der Rest ...
+ very thick,draw=black!50,
+ text height=1.5ex,text depth=.25ex,
+ top color=white,bottom color=black!20,
+ font=\ttfamily
+ }
+}
+% \end{macrocode}
+%
+% Definitionen eines Punktes für das Syntaxdiagramm in TikZ
+% \begin{macrocode}
+\tikzset{
+ point/.style={
+ circle,
+ inner sep=0pt,
+ minimum size=0pt
+ }
+}
+% \end{macrocode}
+%
+% Definition eines Endpunktes für das Syntaxdiagramm in TikZ
+% \begin{macrocode}
+\tikzset{
+ endpoint/.style={
+ circle,
+ inner sep=0pt,
+ minimum size=0pt
+ }
+}
+% \end{macrocode}
+%
+% Definition der Syntaxdiagramme in TikZ
+% \begin{macrocode}
+\tikzset{
+ syntaxdiagramm/.style={
+ start chain,
+ node distance=7mm and 5mm,
+ every node/.style={on chain},
+ nonterminal/.append style={join=by ->},
+ terminal/.append style={join=by ->},
+ endpoint/.append style={join=by ->},
+ point/.append style={join=by -},
+ skip loop/.style={to path={-- ++(0,-.5) -| (\tikztotarget)}}
+ }
+}
+% \end{macrocode}
+%
+% Ende des Pakets \texttt{syntaxdi}