summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/bracketkey
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/bracketkey
Initial commit
Diffstat (limited to 'macros/latex/contrib/bracketkey')
-rw-r--r--macros/latex/contrib/bracketkey/Malva.pdfbin0 -> 82282 bytes
-rw-r--r--macros/latex/contrib/bracketkey/Malva.tex46
-rw-r--r--macros/latex/contrib/bracketkey/README45
-rw-r--r--macros/latex/contrib/bracketkey/bracketkey.pdfbin0 -> 223085 bytes
-rw-r--r--macros/latex/contrib/bracketkey/bracketkey.sty96
-rw-r--r--macros/latex/contrib/bracketkey/bracketkey.tex67
6 files changed, 254 insertions, 0 deletions
diff --git a/macros/latex/contrib/bracketkey/Malva.pdf b/macros/latex/contrib/bracketkey/Malva.pdf
new file mode 100644
index 0000000000..589032fcf0
--- /dev/null
+++ b/macros/latex/contrib/bracketkey/Malva.pdf
Binary files differ
diff --git a/macros/latex/contrib/bracketkey/Malva.tex b/macros/latex/contrib/bracketkey/Malva.tex
new file mode 100644
index 0000000000..ae42ab0221
--- /dev/null
+++ b/macros/latex/contrib/bracketkey/Malva.tex
@@ -0,0 +1,46 @@
+%% Malva.tex
+%
+% An example for the bracketkey package (C. Heibl)
+%
+\documentclass[11pt, spanish]{article}
+\usepackage[a5paper]{geometry}
+\usepackage{bracketkey} % load bracketkey.sty
+%
+%%% BEGIN DOCUMENT
+\begin{document}
+%
+\pagestyle{empty}
+%
+% header of key (alternatively you could use: \keytitle{Malva})
+\vspace{3ex}
+\noindent\textbf{Clave para las especies chilenas de \textit{Malva}}\footnote{A. Marticorena, Malvaceae. In: C. Marticorena \& R. Rodr\'iguez (eds.). Flora de Chile 2(3): 22-105, Editorial Universidad de Concepci\'on, Chile.}
+\vspace{1ex}
+%
+% the key environment:
+\begin{key}{M.~}
+\leadONE{}{Br\'acteas del cal\'iculo unidas}
+\name{}{2}{}
+\leadTWO{Br\'acteas del cal\'iculo libres}
+\name{}{3}{}
+\leadONE{}{Br\'acteas lanceoladas, m\'as cortas que el c\'aliz; flores en general solitarias, raro 2-3}
+\name{}{assurgentiflora}{(Kellogg) M.F.Ray}
+\leadTWO{Br\'acteas del cal\'iculo anchas, ovadas, excediendo el c\'aliz; flores usualmente agrupadas}
+\name{}{dendromorpha}{M.F.Ray}
+\leadONE{1}{Hojas superiores laciniadas}
+\name{}{moschata}{L.}
+\leadTWO{Hojas superiores lobadas}
+\name{}{4}{}
+\leadONE{}{Br\'acteas del cal\'iculo lineares}
+\name{}{5}{}
+\leadTWO{Br\'acteas del cal\'iculo ovadas}
+\name{}{6}{}
+\leadONE{}{Mericarpos lisos}
+\name{}{neglecta}{Wallr.}
+\leadTWO{Mericarpos rugosos }
+\name{}{parviflora}{L.}
+\leadONE{4}{P\'etalos de 5-15 mm de largo, pedicelos de casi el largo del c\'aliz }
+\name{}{nicaeensis}{All.}
+\leadTWO{P\'etalos de 16-25 mm de largo, pedicelos 3-4 veces m\'as largos que el c\'aliz}
+\name{}{sylvestris}{L.}
+\end{key}
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/bracketkey/README b/macros/latex/contrib/bracketkey/README
new file mode 100644
index 0000000000..d5638e7ae4
--- /dev/null
+++ b/macros/latex/contrib/bracketkey/README
@@ -0,0 +1,45 @@
+bracketkey 1.0 -- A LaTeX class for producing bracketed identication keys
+
+This work 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.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+The use of bracketkey is explained below. See also the example in
+Malva.tex for how to use bracketkey.
+
+1. Use \begin{key}{<text>} and \end{key} to define the
+ bracketkey environment.
+
+2. The second argument of \begin key can be used to pass
+ an abbreveated (genus) name to the 'name' command.
+
+3. The two alternatives of each couplet are defined by:
+
+ \leadONE{<backref>}{<text>} and
+
+ \leadTWO{<text>}.
+
+ <backref> is an integer which refers to the previous couplet
+ number, in case that the current and the previouos couplet
+ numbers are not consecutive.
+
+4. Each 'lead' command is followed by a 'name' command:
+
+ \name{<text>}{<text|integer>}{<text>}
+
+ <text> in the first argument is set in boldface. It can be used
+ for taxon ranks which do not require italized writing.
+
+ <text> in the second argument is set in italics. It typically
+ takes names of genus rank and below. Alternatively, <integer>
+ refers to the next couplet.
+
+ <text> in the third argument is set "as is". It can be used to provide
+ authority names.
+
+
+Please email commentaries, questions, etc. to heibl at lmu.de.
diff --git a/macros/latex/contrib/bracketkey/bracketkey.pdf b/macros/latex/contrib/bracketkey/bracketkey.pdf
new file mode 100644
index 0000000000..21ba1cd9fa
--- /dev/null
+++ b/macros/latex/contrib/bracketkey/bracketkey.pdf
Binary files differ
diff --git a/macros/latex/contrib/bracketkey/bracketkey.sty b/macros/latex/contrib/bracketkey/bracketkey.sty
new file mode 100644
index 0000000000..83806db228
--- /dev/null
+++ b/macros/latex/contrib/bracketkey/bracketkey.sty
@@ -0,0 +1,96 @@
+%% bracketkey.sty
+%% Copyright 2009 C. Heibl
+%
+% This work 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. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or
+% later.
+%
+% For a description of how to use bracketkey, see the files README and
+% Malva.txt
+%
+% Load required packages
+\usepackage{calc}
+\usepackage{xifthen}
+\usepackage{coolstr}
+\usepackage{hyperref}
+\hypersetup{backref, pdfpagemode=FullScreen, colorlinks=true}
+%
+%\let\HyperRaiseLinkHook\@empty
+%\def\HyperRaiseLinkDefault{\baselineskip}
+%
+\def\hang{\hangindent\parindent}
+\newcounter{index}%
+\newcounter{backindex}%
+\newcounter{key}\setcounter{key}{0}
+\newboolean{named}%
+\newboolean{back}%
+\newboolean{nameornumber}% true if alternative results in a name
+\newsavebox{\gprefix}% Abbreviation of genus name, parameter for key
+\newlength{\altindent}% additional indentation of each key level
+\setlength{\altindent}{0mm}
+\newlength{\keylabelwidth}% width of label of each key step
+\setlength{\keylabelwidth}{2em}%
+\newlength{\oldparindent}
+%
+% define command 'keytitle'
+\newcommand{\keytitle}[2][it]{
+ \vspace{2pt}
+ \ifthenelse{\equal{#1}{it}}
+ {\noindent\textbf{Key to \textit{#2}}} % taxonname in italis
+ {\noindent\textbf{Key to #2}} % normal taxonname
+ \vspace{2pt}
+}
+%
+% define environment 'key'
+\newenvironment{key}[1]%
+ {\setcounter{index}{0}
+ \stepcounter{key}
+ \setboolean{nameornumber}{true}%
+ \sbox{\gprefix}{\textit{\textbf{#1}}}%
+ \setlength{\oldparindent}{\parindent}%
+ \setlength{\hangindent}{0pt}%
+ \setlength{\parindent}{0pt}%
+ }
+ {\par\setlength{\parindent}{\oldparindent}}
+%
+% define command 'name'
+\newcommand{\name}[4][\usebox{\gprefix}]%
+ {\unskip\nobreak\hfil
+ \penalty 150
+ \leaders\hbox{\thinspace.\thinspace}\hskip 12pt plus 1fill
+ \vadjust{}\hfil
+ \isint{#3}{nameornumber}
+ \ifthenelse{\boolean{nameornumber}}
+ {#2\hspace{6pt}\textbf{\mbox{ \hyperlink{\thekey:#3}{#3}}}} %
+ {\hbox{\textbf{#2}\hspace{4pt}\textit{\textbf{#1}\textit{\textbf{\mbox{#3}}}}}\hspace{4pt}#4}%
+ {\parfillskip=0pt\par}}
+%
+% define command 'leadONE'
+\newcommand{\leadONE}[2]%
+ {\par%
+ \stepcounter{index}%
+ \setcounter{backindex}{\theindex-1}
+ \hspace*{-\keylabelwidth}\hspace*{-2mm}%
+ %\parbox[t]{\keylabelwidth}{\hfill{\textbf{\hypertarget{\thekey:\theindex}{\theindex}}}}%
+ %\parbox[t]{\keylabelwidth}{\hfill{\textbf{ \raisebox{\baselineskip}[0pt]{\hypertarget
+ % {\thekey:\theindex}{}}\theindex}}}%
+ \parbox[t]{\keylabelwidth}{\hfill{\textbf{\raisebox{\baselineskip}[0pt]{\hypertarget
+ {\thekey:\theindex}{}}\hyperlink{\thekey:\thebackindex}{\theindex}}}}%
+ \ifthenelse{\isempty{#1}}
+ {\hspace*{2mm}#2}
+ {\hspace*{1.4pt}\textbf{(\hyperlink{\thekey:#1}{#1})}\hspace*{2pt}#2}
+}
+%
+% Anker nach oben verschieben:
+% Instead of '\hypertarget{abc}{def}' you can also use
+% '\raisebox{\baselineskip}[0pt]{\hypertarget{abc}{}}def'
+%
+% define command 'leadTWO'
+\newcommand{\leadTWO}%
+ {\par
+ \hspace*{-\keylabelwidth}\hspace{-4mm}
+ \parbox[t]{2em}{\hfill{\textbf{-}}}% die indexe eine Textbox
+ \hspace*{2.7mm}% hier kommt der Text % \leadTWO
+}%
diff --git a/macros/latex/contrib/bracketkey/bracketkey.tex b/macros/latex/contrib/bracketkey/bracketkey.tex
new file mode 100644
index 0000000000..85e8dbd014
--- /dev/null
+++ b/macros/latex/contrib/bracketkey/bracketkey.tex
@@ -0,0 +1,67 @@
+\documentclass[parskip=half, pagesize=auto, version=last]{scrartcl}
+
+\usepackage{fixltx2e}
+\usepackage{lmodern}
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\usepackage{microtype}
+\usepackage{hyperref}
+
+\addtokomafont{title}{\rmfamily}
+
+\title{The \textsf{bracketkey} package\thanks{This manual corresponds to \textsf{bracketkey}~v1.0, dated~2009/09/24.}}
+\subtitle{A \LaTeX\ class for producing bracketed identication keys}
+\author{Christoph Heibl}
+\date{2009/09/24}
+
+
+\begin{document}
+
+\maketitle
+
+\noindent
+This work 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.
+The latest version of this license is in
+\url{http://www.latex-project.org/lppl.txt}
+and version~1.3 or later is part of all distributions of \LaTeX\ %
+version~2005/12/01 or later.
+
+The use of \textsf{bracketkey} is explained below. See also the example in
+\texttt{Malva.tex} for how to use \textsf{bracketkey}.
+%
+\begin{enumerate}
+\item Use \verb+\begin{key}{<text>}+ and \verb+\end{key}+ to define the
+ \texttt{bracketkey} environment.
+
+\item The second argument of \verb+\begin key+ can be used to pass
+ an abbreveated (genus) name to the `\texttt{name}' command.
+
+\item The two alternatives of each couplet are defined by:
+
+ \verb+\leadONE{<backref>}{<text>}+~~and \\
+ \verb+\leadTWO{<text>}+.
+
+ \verb+<backref>+ is an integer which refers to the previous couplet
+ number, in case that the current and the previouos couplet
+ numbers are not consecutive.
+
+\item Each `\texttt{lead}' command is followed by a `\texttt{name}' command:
+
+ \verb+\name{<text>}{<text|integer>}{<text>}+
+
+ \verb+<text>+ in the first argument is set in boldface. It can be used
+ for taxon ranks which do not require italized writing.
+
+ \verb+<text>+ in the second argument is set in italics. It typically
+ takes names of genus rank and below. Alternatively, \verb+<integer>+
+ refers to the next couplet.
+
+ \verb+<text>+ in the third argument is set ``as is''. It can be used to provide
+ authority names.
+\end{enumerate}
+
+Please email commentaries, questions, etc. to \texttt{heibl at lmu.de}.
+
+\end{document}