summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-10-26 21:42:18 +0000
committerKarl Berry <karl@freefriends.org>2013-10-26 21:42:18 +0000
commitc3ad81474a43e78dcb33ddfaeebc08504bee76f1 (patch)
tree8c1980caca614a775f56d82dad01285be9d69611 /Master
parent8fd740a32619f187dd09484ff3ee7efc8c80d044 (diff)
harveyballs (26oct13)
git-svn-id: svn://tug.org/texlive/trunk@32003 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/harveyballs/README2
-rw-r--r--Master/texmf-dist/doc/latex/harveyballs/harveyballs-Manual.pdfbin130233 -> 144233 bytes
-rw-r--r--Master/texmf-dist/doc/latex/harveyballs/harveyballs-Manual.tex50
-rw-r--r--Master/texmf-dist/tex/latex/harveyballs/harveyballs.sty39
4 files changed, 70 insertions, 21 deletions
diff --git a/Master/texmf-dist/doc/latex/harveyballs/README b/Master/texmf-dist/doc/latex/harveyballs/README
index 16082328c1a..f351b18fa57 100644
--- a/Master/texmf-dist/doc/latex/harveyballs/README
+++ b/Master/texmf-dist/doc/latex/harveyballs/README
@@ -22,4 +22,4 @@ This package provides the commands to create Harvey Balls using tikz.
\harveyBallThreeQuarter
\harveyBallFull
-All commands take an optional parameter to set the size. Default is \normalsize to be used in inline text and tables. \ No newline at end of file
+All commands take an optional parameter to set the size. User variables can be used to customize the appearance of the Harvey Balls. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/harveyballs/harveyballs-Manual.pdf b/Master/texmf-dist/doc/latex/harveyballs/harveyballs-Manual.pdf
index b9274513707..63a48d36b9e 100644
--- a/Master/texmf-dist/doc/latex/harveyballs/harveyballs-Manual.pdf
+++ b/Master/texmf-dist/doc/latex/harveyballs/harveyballs-Manual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/harveyballs/harveyballs-Manual.tex b/Master/texmf-dist/doc/latex/harveyballs/harveyballs-Manual.tex
index f025e150f5d..cbf6f40dcfa 100644
--- a/Master/texmf-dist/doc/latex/harveyballs/harveyballs-Manual.tex
+++ b/Master/texmf-dist/doc/latex/harveyballs/harveyballs-Manual.tex
@@ -10,6 +10,9 @@
\begin{document}%
\maketitle
+
+%\@harveyBallsSize and \@harveyBallsLineWidth
+
\newcommand{\pkgName}{\texttt{harveyballs}\xspace}
\begin{abstract}
@@ -21,7 +24,7 @@ This document exemplifies the \pkgName package for \LaTeXe in a nutshell. Harvey
The \pkgName package requires the \texttt{tikz} package.
-\section{Examples}
+\section{Examples and Options}
\subsection{In text}
@@ -52,7 +55,28 @@ Harvey Balls can also be integrated in tables (cf.\,Table \ref{tab:ExampleForATa
\end{table}
\subsection{Custom size}
-You can also use custom sized Harvey Balls:\\
+
+There are two variables available to the user to override the size of the Harvey Balls globally.
+\begin{itemize}
+\item \verb|\harveyBallsSize|, i.e. the size of the Harvey Balls and
+\item \verb|\harveyBallsLineWidth|, i.e. the line width used to draw the Harvey Balls.
+\end{itemize}
+Threse values can be changed using the following commands:
+\begin{itemize}
+\item \verb|\def\harveyBallsSize{0.85ex}|
+\item \verb|\def\harveyBallsLineWidth{0.2pt}|
+\end{itemize}
+Whereas 0.85ex and 0.2pt would be parameters, i.e. your custom sizes. Note that these are also the default values.
+\verb|\def\harveyBallsLineWidth{1pt}| and \verb|\def\harveyBallsSize{3ex}| produces:\\
+\def\harveyBallsLineWidth{1pt}\def\harveyBallsSize{3ex}
+\harveyBallNone, \harveyBallNone, \harveyBallQuarter, \harveyBallHalf, \harveyBallThreeQuarter, \harveyBallFull. \\
+
+%reset to defaults
+%\def\harveyBallsSize{0.85ex}
+%\def\harveyBallsLineWidth{0.2pt}
+
+
+You can also use custom sized using an optional parameter for each Harvey Ball\\
%
\begin{table}[h]
\centering
@@ -70,6 +94,28 @@ Command & {Produced Harvey Ball}\\
\caption{Example for custom-sized Harvey Balls}
\end{table}
+\subsection{Custom Colors}
+The colors of the Havey Balls can be overridden utilizing the user variables
+\begin{itemize}
+\item \verb|\harveyBallsColor|, i.e. the fill color of the Harvey Ball and
+\item \verb|\harveyBallsLineColor|, i.e. the border color of the Harvey Ball.
+\end{itemize}
+For instance with \verb|\def\harveyBallsColor{red}| and \verb|\def\harveyBallsLineColor{blue}| you Harvey Balls will apear like this:\\
+\def\harveyBallsColor{red}
+\def\harveyBallsLineColor{blue}
+\harveyBallNone, \harveyBallQuarter, \harveyBallHalf, \harveyBallThreeQuarter, \harveyBallFull. \\
+
+\def\harveyBallsColor{blue}
+
+\section{Changelog}
+\begin{tabular}{llp{8cm}}
+Date & Version & Changes\\
+\hline
+2013/10/26 & Version 1.1 & Added user variables for fill and border colors, custom sizes and improved visual appreareance. Thanks to Daniel H. Luecking from University of Arkansas for the valuable feedback to the initial version and suggestions for improvements \\
+2013/10/22 & Version 1.0 & Initial release.\\
+\end{tabular}
+
+
\section{License}
\begin{verbatim}
Harvey Balls for LaTeX
diff --git a/Master/texmf-dist/tex/latex/harveyballs/harveyballs.sty b/Master/texmf-dist/tex/latex/harveyballs/harveyballs.sty
index 1c310862ddf..fba6ac5d11e 100644
--- a/Master/texmf-dist/tex/latex/harveyballs/harveyballs.sty
+++ b/Master/texmf-dist/tex/latex/harveyballs/harveyballs.sty
@@ -13,41 +13,44 @@
%%
%% You should have received a copy of the GNU General Public License
%% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%%
+
\NeedsTeXFormat{LaTeX2e}[2001/06/01]
\ProvidesPackage{harveyballs}[2013/10/22 Harvey Balls for LaTeX by Sascha Roth, Technical University Munich, sascha.roth@mytum.de]
\RequirePackage{tikz}
+%user variables
+\def\harveyBallsSize{0.85ex}%size of the harvey balls
+\def\harveyBallsLineWidth{0.2pt}%line width of the harvey balls
+\def\harveyBallsColor{black}
+\def\harveyBallsLineColor{black}
+
%
-\def\@harveyBallsSize{0.85ex}%size of the harvey balls
-\def\@harveyBallsLineWidth{0.2pt}%line width of the harvey balls
-%
-\DeclareRobustCommand{\harveyBallNone}[1][\@harveyBallsSize]{%
+\DeclareRobustCommand{\harveyBallNone}[1][\harveyBallsSize]{%
\begin{tikzpicture}%
-\draw[draw=black,line width=\@harveyBallsLineWidth] (0,0) circle (#1);%
+\draw[draw=\harveyBallsLineColor,line width=\harveyBallsLineWidth] (0,0) circle (#1);%
\end{tikzpicture}%
}%
-\DeclareRobustCommand{\harveyBallQuarter}[1][\@harveyBallsSize]{%
+\DeclareRobustCommand{\harveyBallQuarter}[1][\harveyBallsSize]{%
\begin{tikzpicture}%
-\draw[line width=\@harveyBallsLineWidth](0,0) circle (#1);%
-\fill[fill=black] (0,0) -- (#1,0mm) arc (0:90:#1) -- cycle;%
+\draw[draw=\harveyBallsLineColor,line width=\harveyBallsLineWidth](0,0) circle (#1);%
+\fill[fill=\harveyBallsColor] (0,0) -- (#1,0mm) arc (0:90:#1) -- cycle;%
\end{tikzpicture}%
}%
-\DeclareRobustCommand{\harveyBallHalf}[1][\@harveyBallsSize]{%
+\DeclareRobustCommand{\harveyBallHalf}[1][\harveyBallsSize]{%
\begin{tikzpicture}%
-\draw[line width=\@harveyBallsLineWidth](0,0) circle (#1);%
-\fill[fill=black] (0,0) -- (#1,0mm) arc (0:90:#1) -- cycle;%
-\fill[fill=black] (0,0) -- (#1,0mm) arc (0:-90:#1) -- cycle;%
+\draw[draw=\harveyBallsLineColor,line width=\harveyBallsLineWidth](0,0) circle (#1);%
+ \fill [fill=\harveyBallsColor] (0,0) -- (0mm,#1) arc (90:-90:#1) -- cycle;%
\end{tikzpicture}%
}%
-\DeclareRobustCommand{\harveyBallThreeQuarter}[1][\@harveyBallsSize]{%
+\DeclareRobustCommand{\harveyBallThreeQuarter}[1][\harveyBallsSize]{%
\begin{tikzpicture}%
-\draw[line width=\@harveyBallsLineWidth](0,0) circle (#1);%
-\fill[fill=black] (0,0) -- (#1,0mm) arc (0:90:#1) -- cycle;%
-\fill[fill=black] (0,0) -- (#1,0mm) arc (0:-180:#1) -- cycle;%
+\draw[draw=\harveyBallsLineColor,line width=\harveyBallsLineWidth](0,0) circle (#1);%
+ \fill [fill=\harveyBallsColor] (0,0) -- (0mm,#1) arc (90:-180:#1) -- cycle;%
\end{tikzpicture}%
}%
-\DeclareRobustCommand{\harveyBallFull}[1][\@harveyBallsSize]{%
+\DeclareRobustCommand{\harveyBallFull}[1][\harveyBallsSize]{%
\begin{tikzpicture}%
-\filldraw[fill=black,draw=black,line width=\@harveyBallsLineWidth] (0,0) circle (#1);%
+\filldraw[draw=\harveyBallsLineColor,fill=\harveyBallsColor,line width=\harveyBallsLineWidth] (0,0) circle (#1);%
\end{tikzpicture}%
}% \ No newline at end of file