diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-11 23:54:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-11 23:54:11 +0000 |
commit | 2cd91240031435dee99513b9e6084c2e08b97a0a (patch) | |
tree | 2b182d7d072d0159192fc1389900cb5ad09f065c /Master/texmf-dist/source/latex/isotope | |
parent | 1d4ca8a6dd26d16a41726aac1b7944ab8a3c5b3c (diff) |
trunk/Master/texmf-dist/source/latex/isotope
git-svn-id: svn://tug.org/texlive/trunk@335 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/isotope')
-rw-r--r-- | Master/texmf-dist/source/latex/isotope/isotope.dtx | 165 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/isotope/isotope.ins | 60 |
2 files changed, 225 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/isotope/isotope.dtx b/Master/texmf-dist/source/latex/isotope/isotope.dtx new file mode 100644 index 00000000000..1d4eff55922 --- /dev/null +++ b/Master/texmf-dist/source/latex/isotope/isotope.dtx @@ -0,0 +1,165 @@ +% \iffalse meta-comment +% +% Copyright (C) 2003 by Heiko Bauke <heiko.bauke@physik.uni-magdeburg.de> +% ----------------------------------------------------------------------- +% +% This file may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.2 +% 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.2 or later is part of all distributions of LaTeX +% version 1999/12/01 or later. +% +% \fi +% +% \iffalse +%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%<package>\ProvidesPackage{isotope} +%<package> [2004/01/04 v0.2 for type setting isotopes] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{isotope} +\usepackage{textcomp} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} + \DocInput{isotope.dtx} +\end{document} +%</driver> +% \fi +% +% \CheckSum{51} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \changes{v0.1}{2003/12/31}{Initial version.} +% +% \GetFileInfo{isotope.sty} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% +% \title{The \textsf{isotope} package\thanks{This document +% corresponds to \textsf{isotope}~\fileversion, dated \filedate.}} +% \author{Heiko Bauke\thanks{E-mail: \texttt{heiko.bauke@physik.uni-magdeburg.de}}} +% +% \maketitle +% +% \section{Introduction} +% +% It's quite difficult to type set isotopes with \LaTeX. The ad hoc method +% using e.g. |$^{232}_{90}\mathrm{Th}$| results in $^{232}_{90}\mathrm{Th}$. +% This is not satisfactory because of the wrong alignment of atomic +% and nuclear number. The package \textsf{isotope} provides the |\isotope| +% macro for correct type setting isotopes. +% +% \section{Usage} +% +% The package \textsf{isotope} has to be included into the preamble of your +% \LaTeX\ file by: +% \begin{quote} +% |\usepackage{isotope}| +% \end{quote} +% \DescribeMacro{\isotope} +% The usage of the |\isotope| macro is straight forward: +% \begin{quote} +% |\isotope|\oarg{nuclear number}\oarg{atomic number}\marg{name} +% \end{quote} +% See \tablename~\ref{tab:example} for some examples. +% \begin{table}[tb] +% \centering +% \caption{Examples for \texttt{\textbackslash isotope} macro usage.} +% \label{tab:example} +% \begin{tabular}{@{}ll@{}} +% \hline +% \hline +% command & result \\ +% \hline +% |\isotope{Ra}| & \isotope{Ra} \\ +% |\isotope[228]{Ra}| & \isotope[228]{Ra} \\ +% |\isotope[228][88]{Ra}| & \isotope[228][88]{Ra} \\ +% |$\isotope[A][Z]{X}\to| & \\ +% |\isotope[A-4][Z-2]{Y}+\isotope[4][2]{\alpha}$| & +% \raisebox{1.5ex}[-1.5ex]{$\isotope[A][Z]{X}\to\isotope[A-4][Z-2]{Y}+\isotope[4][2]{\alpha}$}\\ +% \hline +% \hline +% \end{tabular} +% \end{table} +% \DescribeMacro{\isotopestyle} +% The macro |\isotopestyle| determines the style which is used to type set the +% name of the iostope. It may be redefined, e.g. +% \begin{quote} +% |\renewcommand{\isotopestyle}{\sf}|\\ +% |\isotope[228]{Ra}| +% \end{quote} +% gives {\renewcommand{\isotopestyle}{\sf}\isotope[228]{Ra}}. +% +% \StopEventually{\PrintChanges\PrintIndex} +% +% \section{Implementation} +% +% \begin{macro}{\isotopestyle} +% \changes{v0.2}{2004/01/04}{\texttt{\textbackslash isotopestyle} determines +% also the style of nuclear and atomic number.} +% |\isotopestyle| determines the style which is used to typeset the +% name of an iostope and its nuclear and atomic number. +% \begin{macrocode} +\newcommand{\isotopestyle}{\rm} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\isotope} +% \changes{v0.2}{2004/01/04}{Vertical spacing between nuclear and atomic +% number has been improved. The implementation is based no a suggestion +% of Walter Schmidt in \texttt{de.comp.text.tex}.} +% Now it follows the implementation of \verb#\isotope# macro. +% \begin{macrocode} +\newcommand{\isotope@atomicnumber}{} +\newcommand{\isotope@nuclearnumber}{} +\newcommand{\isotope}[1][]{% + \begingroup% + \renewcommand{\isotope@nuclearnumber}{#1}% + \isotope@two}% + \newcommand{\isotope@two}[2][]{% + \renewcommand{\isotope@atomicnumber}{#1}% + {\m@th% +% \end{macrocode} +% Determine which has a larger width nuclear number or atomic number. +% \begin{macrocode} + \settowidth\@tempdimb{\ensuremath{% + \isotopestyle\scriptstyle\isotope@nuclearnumber}}% + \settowidth\@tempdimc{\ensuremath{% + \isotopestyle\scriptstyle\isotope@atomicnumber}}% + \ifdim\@tempdimb<\@tempdimc\@tempdimb=\@tempdimc\fi% + \ensuremath{{}% + ^{\makebox[\@tempdimb][r]{\ensuremath{% + \isotopestyle\scriptstyle\isotope@nuclearnumber}}}% + _{\makebox[\@tempdimb][r]{\ensuremath{% + \isotopestyle\scriptstyle\isotope@atomicnumber}}}% + \isotopestyle#2}% + }% + \endgroup% +}% +% \end{macrocode} +% \end{macro} +% \PrintChanges +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/isotope/isotope.ins b/Master/texmf-dist/source/latex/isotope/isotope.ins new file mode 100644 index 00000000000..24a4850906e --- /dev/null +++ b/Master/texmf-dist/source/latex/isotope/isotope.ins @@ -0,0 +1,60 @@ +%% +%% Copyright (C) 2003 by Heiko Bauke <heiko.bauke@physik.uni-magdeburg.de> +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX version +%% 1999/12/01 or later. +%% + +\input docstrip.tex +\keepsilent + +\usedir{tex/latex/isotope} + +\preamble + +This is a generated file. + +Copyright (C) 2003 by Heiko Bauke <heiko.bauke@physik.uni-magdeburg.de> + +This file may be distributed and/or modified under the conditions of +the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX version +1999/12/01 or later. + +\endpreamble + +\generate{\file{isotope.sty}{\from{isotope.dtx}{package}}} + +\obeyspaces +\Msg{*************************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the following *} +\Msg{* file into a directory searched by TeX: *} +\Msg{* *} +\Msg{* isotope.sty *} +\Msg{* *} +\Msg{* To produce the documentation run the file isotop.dtx *} +\Msg{* through LaTeX and makeindex. *} +\Msg{* *} +\Msg{* latex isotope.dtx *} +\Msg{* makeindex -s gglo.ist -o isotope.ind isotope.idx *} +\Msg{* makeindex -s gglo.ist -o isotope.gls isotope.glo *} +\Msg{* latex isotope.dtx *} +\Msg{* *} +\Msg{* Happy TeXing! *} +\Msg{* *} +\Msg{*************************************************************} + +\endbatchfile |