diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/signchart/signchart.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/signchart/signchart.sty | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/signchart/signchart.sty b/Master/texmf-dist/tex/latex/signchart/signchart.sty index 9f4434751ab..684abdf6fc4 100644 --- a/Master/texmf-dist/tex/latex/signchart/signchart.sty +++ b/Master/texmf-dist/tex/latex/signchart/signchart.sty @@ -13,21 +13,31 @@ %% ---------------------------------------------------------------- %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{signchart}[2016/01/29 v1.0 First release] +\ProvidesPackage{signchart}[2016/02/12 v1.01] \RequirePackage{tikz} \RequirePackage{pgfplots} \pgfplotsset{compat = 1.10} \RequirePackage{xstring} \RequirePackage{xkeyval} -\DeclareOption*{\PackageWarning{examplepackage}{Unknown option `\CurrentOption'. - This package does not accept any options.}} +\def\signHeightKey{0.3} +\def\valNorthSouthKey{south} +\def\valSepKey{3pt} +\DeclareOption{signunder}{\def\signHeightKey{-0.3}} +\DeclareOption{valunder}{% +\def\valNorthSouthKey{north}% +\def\valSepKey{13pt}} +\DeclareOption*{% +\PackageWarning{signchart}{Unknown option ‘\CurrentOption’}% +} \ProcessOptions\relax -\define@key{signchart}{height}[0.3]{\def\signHeight{#1}} +\define@key{signchart}{height}[\signHeightKey]{\def\signHeight{#1}} +\define@key{signchart}{valanchor}[\valNorthSouthKey]{\def\valNorthSouth{#1}} +\define@key{signchart}{valsep}[\valSepKey]{\def\valSep{#1}} \define@key{signchart}{width}[5]{\def\signChartWidth{#1}} \define@key{signchart}{arrows}[<->]{\def\theArrow{#1}} \makeatother \newcommand{\signchart}[3][]{ -\setkeys{signchart}{height, width, arrows, #1} +\setkeys{signchart}{height, valanchor, valsep, width, arrows, #1} \begin{center} \begin{tikzpicture} \pgfmathsetmacro{\snht}{\signHeight} @@ -59,7 +69,9 @@ \StrBehind[\j]{,\leftPartii}{,}[\s] \pgfmathsetmacro{\valpos}{(\wid/(\len+2))*(\i+1)} \pgfmathsetmacro{\signpos}{(\wid/(\len+2))*(\i+0.5)} -\draw (\valpos,-0.15) -- (\valpos,0.15) node[anchor=south] {\thisVal}; +\draw (\valpos,-0.15) -- (\valpos,0.15) node[anchor=\valNorthSouth, + inner sep=\valSep] +{\thisVal}; \node at (\signpos,\snht) {$\s$}; \ifnum \i = \len \pgfmathsetmacro{\signpos}{(\wid/(\len+2))*(\len+1.5)} |