summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/signchart
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-02-13 22:32:45 +0000
committerKarl Berry <karl@freefriends.org>2016-02-13 22:32:45 +0000
commitdd5c634836f2baa30078beba0229fdc67906d5cc (patch)
treee3ed46527fe86f5bcf2376170daeb0f0007617e7 /Master/texmf-dist/tex/latex/signchart
parenta66b38a42090ca28256d46362ccacc1ad398ffe5 (diff)
signchart (13feb16)
git-svn-id: svn://tug.org/texlive/trunk@39707 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/signchart')
-rw-r--r--Master/texmf-dist/tex/latex/signchart/signchart.sty24
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)}