summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/acroterm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-20 00:06:03 +0000
committerKarl Berry <karl@freefriends.org>2010-11-20 00:06:03 +0000
commit0b183d0343504df0fbdb0b634e8b6f30adcc2602 (patch)
tree7b3cf999908b5b32b445c64a6b4983b5d1365ac5 /Master/texmf-dist/tex/latex/acroterm
parentfb9bb69fbc53a537a078c6182710a0fd30cb7eb4 (diff)
new latex package acroterm 0.1 (20nov10)
git-svn-id: svn://tug.org/texlive/trunk@20498 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/acroterm')
-rw-r--r--Master/texmf-dist/tex/latex/acroterm/acroterm.sty88
1 files changed, 88 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/acroterm/acroterm.sty b/Master/texmf-dist/tex/latex/acroterm/acroterm.sty
new file mode 100644
index 00000000000..b0f258a2e89
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/acroterm/acroterm.sty
@@ -0,0 +1,88 @@
+%%
+%% This is file `acroterm.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% acroterm.dtx (with options: `package')
+%%
+%% The Acroterm package
+%%
+%% Copyright (C) 2010 by Jakob Voss
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Jakob Voss.
+%%
+%% This work consists of the file acroterm.dtx
+%% and the derived files acroterm.sty,
+%% acroterm.ins, and
+%% acroterm.pdf.
+%%
+\ProvidesPackage{acroterm}
+ [2010/11/19 v0.1 Manage and index acronyms and terms]
+\RequirePackage{splitidx}[2009/02/18 v1.1a]
+\RequirePackage{xifthen}
+\newcommand{\Acrostyle}[1]{#1}
+\newcommand{\acrostyle}[1]{\textsc{\lowercase{#1}}}
+\newcommand{\termstyle}[1]{#1}
+\newcommand{\Termstyle}[1]{\textit{#1}}
+\newcommand{\tacrostyle}[2]{\termstyle{#1} (\acrostyle{#2})}
+\newcommand{\Tacrostyle}[2]{\Termstyle{#1} (\acrostyle{#2})}
+\newcommand{\atermstyle}[2]{\acrostyle{#1} (\termstyle{#2})}
+\newcommand{\Atermstyle}[2]{\acrostyle{#1} (\termstyle{#2})}
+\newcommand{\acroindexstyle}[1]{#1\acroexpand[ --- ]{#1}}
+\newcommand{\provideacronym}[2]{% TODO: detect redefinitions
+ \expandafter\providecommand\expandafter{%
+ \csname acronymlong#1\endcsname}{#2}%
+}
+\newcommand{\bfhref}[1]{\textbf{\hyperpage{#1}}}
+\newcommand{\acro@define}[2]{% #1: long term, #2: acronym
+ \sindex[idx]{#1|see{\acrostyle{#2}}}% TODO: acronyms in general index?
+ \@ifundefined{acronymlong#2}{%
+ \provideacronym{#2}{#1}}{}%
+ \sindex[acronym]{#2@\acroindexstyle{#2}|bfhref}%
+}
+
+\newcommand{\acroexpand}[2][]{%
+ \@ifundefined{acronymlong#2}{}{%
+ #1\csname acronymlong#2\endcsname}%
+}
+\newcommand{\term}[2][]{%
+ \ifthenelse{\isempty{#1}}%
+ {\sindex[idx]{#2}}{\sindex[idx]{#1}}%
+ \termstyle{#2}}
+\newcommand\Term[2][]{%
+ \ifthenelse{\isempty{#1}}%
+ {\sindex[idx]{#2|bfhref}}%
+ {\sindex[idx]{#1|bfhref}}%
+ \Termstyle{#2}%
+}
+\newcommand{\acro}[1]{%
+ \acrostyle{#1}%
+ {\sindex[acronym]{#1@\acroindexstyle{#1}}}%
+}
+\newcommand{\Acro}[1]{%
+ \Acrostyle{#1}%
+ {\sindex[acronym]{#1@\acroindexstyle{#1}}}%
+}
+\newcommand{\tacro}[3][]{%
+ \ifthenelse{\isempty{#1}}%
+ {\acro@define{#2}{#3}}{\acro@define{#1}{#3}}% TODO: not define?
+ \tacrostyle{#2}{#3}}
+\newcommand{\Tacro}[3][]{%
+ \ifthenelse{\isempty{#1}}%
+ {\acro@define{#2}{#3}}{\acro@define{#1}{#3}}%
+ \Tacrostyle{#2}{#3}}
+\newcommand{\aterm}[2]{%
+ \acro@define{#2}{#1}% TODO: not define but only use?
+ \atermstyle{#1}{#2}}
+\newcommand{\Aterm}[2]{%
+ \acro@define{#2}{#1}%
+ \Atermstyle{#1}{#2}}
+\endinput
+%%
+%% End of file `acroterm.sty'.