From 96cff1ad736296ce495dc00c48dd9a0b54dcc1c1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 11 Jan 2006 23:53:56 +0000 Subject: trunk/Master/texmf-dist/source/latex/hhtensor git-svn-id: svn://tug.org/texlive/trunk@320 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/hhtensor/Makefile | 72 +++++ .../texmf-dist/source/latex/hhtensor/hhtensor.dtx | 298 +++++++++++++++++++++ .../texmf-dist/source/latex/hhtensor/hhtensor.ins | 26 ++ .../texmf-dist/source/latex/hhtensor/hhtensor.xml | 29 ++ 4 files changed, 425 insertions(+) create mode 100644 Master/texmf-dist/source/latex/hhtensor/Makefile create mode 100644 Master/texmf-dist/source/latex/hhtensor/hhtensor.dtx create mode 100644 Master/texmf-dist/source/latex/hhtensor/hhtensor.ins create mode 100644 Master/texmf-dist/source/latex/hhtensor/hhtensor.xml (limited to 'Master/texmf-dist/source/latex/hhtensor') diff --git a/Master/texmf-dist/source/latex/hhtensor/Makefile b/Master/texmf-dist/source/latex/hhtensor/Makefile new file mode 100644 index 00000000000..a6a521b28ac --- /dev/null +++ b/Master/texmf-dist/source/latex/hhtensor/Makefile @@ -0,0 +1,72 @@ + +SRCDIR=hhtensor +INSTALLDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/tex/latex/hhtensor +DOCDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/doc/latex/hhtensor +VERSION=`grep '^\\\\def\\\\fileversion' hhtensor.dtx | sed 's/^\\\\def\\\\fileversion{\\(.*\\)\\.\\(.*\\)}/\\1_\\2/'` + + +.SUFFIXES: .sty .ins .dtx .dvi .ps .pdf + +.ins.sty: + latex $< + +.dtx.dvi: + latex $< + latex $< + makeindex -s gind.ist $(*D)/$(*F) + makeindex -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo + latex $< + + +all: hhtensor hhtensor.dvi + +hhtensor: hhtensor.sty + +hhtensor.dvi: hhtensor.dtx hhtensor.ins + latex hhtensor.dtx + latex hhtensor.dtx + makeindex -s gind.ist hhtensor + makeindex -s gglo.ist -o hhtensor.gls hhtensor.glo + latex hhtensor.dtx + +clean: + @-rm -f hhtensor.glo hhtensor.gls hhtensor.idx hhtensor.ilg + @-rm -f hhtensor.ind hhtensor.aux hhtensor.log hhtensor.toc + @-rm -f *~ + +distclean: clean + @-rm -f hhtensor.sty hhtensor.dvi + +tar: all clean + echo Lege hhtensor-$(VERSION).tar.gz an + -rm -f hhtensor-$(VERSION).tar.gz + tar czCf .. hhtensor-$(VERSION).tar.gz \ + $(SRCDIR)/README \ + $(SRCDIR)/Makefile \ + $(SRCDIR)/hhtensor.dtx \ + $(SRCDIR)/hhtensor.ins \ + $(SRCDIR)/hhtensor.dvi \ + $(SRCDIR)/hhtensor.xml + +zip: all clean + -@rm -f hhtensor-$(VERSION).zip + mkdirhier tex/latex/hhtensor + mkdirhier doc/latex/hhtensor + mkdirhier source/latex/hhtensor + mv hhtensor.sty tex/latex/hhtensor + cp hhtensor.dtx hhtensor.ins hhtensor.xml source/latex/hhtensor + cp Makefile source/latex/hhtensor + cp README hhtensor.dvi doc/latex/hhtensor + zip -r hhtensor-$(VERSION).zip tex doc source + rm -r tex/ doc/ source/ + +install: all + if [ ! -d $(INSTALLDIR) ]; then mkdirhier $(INSTALLDIR); fi + if [ ! -d $(DOCDIR) ]; then mkdirhier $(DOCDIR); fi + install -m644 hhtensor.sty $(INSTALLDIR) + install -m644 hhtensor.dvi $(DOCDIR) + texhash + + +hhtensor.sty: hhtensor.ins hhtensor.dtx + diff --git a/Master/texmf-dist/source/latex/hhtensor/hhtensor.dtx b/Master/texmf-dist/source/latex/hhtensor/hhtensor.dtx new file mode 100644 index 00000000000..bdf63628997 --- /dev/null +++ b/Master/texmf-dist/source/latex/hhtensor/hhtensor.dtx @@ -0,0 +1,298 @@ +% \iffalse meta comment +% File: hhtensor.dtx Copyright (C) 2003 Harald Harders +% \fi +% +% \iffalse +% +%<*package> +\def\fileversion{0.6} +\def\filedate{2003/10/15} +\def\docdate{2003/10/15} +% +%<*driver> +\listfiles +\documentclass[ngerman,english,a4paper]{ltxdoc} +\usepackage[T1]{fontenc} +%\usepackage{longtable} +\usepackage{mathcomp} +\usepackage{babel} +\IfFileExists{hhtensor.sty}{% + \usepackage{hhtensor} +}{% + \GenericWarning{hhtensor.dtx}{Package file hhtensor.sty not found + (Documentation will be messed up!^^J^^A + Generate hhtensor.sty by (La)TeXing hhtensor.ins, process + hhtensor.dtx again)^^J}\stop +} +\title{The \texttt{hhtensor} package\thanks{This file has version + \fileversion\ last revised \filedate, documentation dated + \docdate.}} +\author{Harald Harders\\\texttt{h.harders@tu-bs.de}} +\date{File Date \filedate, Printed \today} +\newlength{\tempdima}% +\makeatletter +\renewenvironment{table}[1][]{% + \@float{table}[#1]% + \centering% + \setlength{\tempdima}{\abovecaptionskip}% + \setlength{\abovecaptionskip}{\belowcaptionskip}% + \setlength{\belowcaptionskip}{\tempdima}% + }{% +\end@float +} +\def\meta@font@select{\normalfont\itshape} +%% +\DeclareRobustCommand*\bvec[1]{\ensuremath{\boldsymbol{#1}}} +\DeclareRobustCommand*\bmatr[1]{\ensuremath{\boldsymbol{#1}}} +\DeclareRobustCommand*\btens[2]{\ensuremath{\boldsymbol{#1}}} +\DeclareRobustCommand*\uvec[1]{\ushort{#1}} +\DeclareRobustCommand*\umatr[1]{\ushortd{#1}} +\DeclareRobustCommand*\utens[2]{% + \begingroup + \setlength{\arraycolsep}{0pt} + \begin{array}[t]{c}% + #1 \\[-2.05ex] + {\scriptstyle \sim} \\[-2.1ex] + {\scriptscriptstyle #2}\\[-0.7ex] + \end{array}% + \endgroup +} +\makeatother +%% +\EnableCrossrefs +\CodelineIndex +\DoNotIndex{\def,\edef,\let,\newcommand,\newenvironment,\newcounter} +\DoNotIndex{\setcounter,\space,\if,\else,\fi,\empty,\@empty,\ifx,\fi} +\DoNotIndex{\ifnum,\fi,\expandafter,\csname,\endcsname,\the} +\DoNotIndex{\MessageBreak,\message,\newlength,\newif,\xdef,\newcount} +\DoNotIndex{\begingroup,\endgroup,\,,\@tempcnta,\@tempdima,\advance} +\DoNotIndex{\ensuremath,\filedate,\fileversion,\docdate} +\DoNotIndex{\mathit,\mathrm,\mathsf,\nprt@tmp,\nprt@tmpnum,\relax} +\DoNotIndex{\protect,\renewcommand,\setlength,\settowidth,\stepcounter} +\DoNotIndex{\string,\DeclareRobustCommand,\\} +\CodelineNumbered +\RecordChanges +%\CheckSum{1016} +\begin{document} + \DocInput{hhtensor.dtx} +\end{document} +% +% \fi +% +% \changes{0.6}{2003/10/15}{Total new implementation}% +% +% \maketitle +% \begin{abstract} +% \noindent +% This package provides commands for vectors, matrices, and tensors +% with different styles (arrows as the \LaTeX\ default, underlined, +% and bold). +% \end{abstract} +% +% \tableofcontents +% +% \section*{Copyright} +% +% Copyright 2003 Harald Harders. +% +% This program can be redistributed and/or modified under the terms +% of the LaTeX Project Public License Distributed from CTAN +% archives in directory macros/latex/base/lppl.txt; either +% version 1 of the License, or any later version. +% +% +% \section{Load the package} +% +% To use this package place +% \begin{quote} +% |\usepackage|\oarg{style}\marg{hhtensor} +% \end{quote} +% in the preamble of your document. +% The \meta{style} is |arrow|, |bold|, or |uline| for arrow style, +% bold symbols, resp.\ underlined symbols. +% Default is |arrow|. +% +% +% \section{Usage} +% +% \DescribeMacro{\vec} +% Vectors are printed as usual using the \cs{vec\marg{symbol}} +% command. +% Depending on the style, they are printed $\vec{\alpha}$, +% $\bvec{\alpha}$, resp.\ $\uvec{\alpha}$. +% +% \DescribeMacro{\matr} +% Matrices are printed using \cs{matr\marg{symbol}}: $\matr{\alpha}$, +% $\bmatr{\alpha}$, resp.\ $\umatr{\alpha}$. +% +% \DescribeMacro{\tens} +% Tensors are a little bit different. +% They take two arguments while the first one is the symbol, while the +% second is the step: \cs{tens\marg{symbol}\marg{step}}. +% This leads to $\tens{\alpha}{4}$, $\btens{\alpha}{4}$, resp.\ +% $\utens{\alpha}{4}$. +% +% In the bold style, it is not distinguished between vectors, +% matrices, and tensors. +% I would like to use upright symbols but then you cannot use all +% symbols because there is no full upright bold math alphabet. +% +% \DescribeMacro{\dcdot} +% The \cs{dcdot} command produces a double dot for double scalar +% products, e.g., +% $\matr{\sigma}=\tens{A}{4}\dcdot\matr{\varepsilon}$. +% +% \DescribeMacro{\trans} +% \cs{trans} produces a transponed sign: $\matr{A}\trans = \matr{B}$. +% +% +% \StopEventually{\PrintChanges \PrintIndex} +% +% \section{The implementation} +% \iffalse +%<*package> +% \fi +% Heading of the package: +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{hhtensor}[\filedate\space v\fileversion\space + Print numbers] +\message{Package `hhtensor', Version \fileversion\space of \filedate.} +% \end{macrocode} +% |ushort| underlines with shorter lines than \cs{underline}. +% \begin{macrocode} +\RequirePackage{ushort} +% \end{macrocode} +% |amsmath| for bold symbols. +% \begin{macrocode} +\RequirePackage{amsmath} +% \end{macrocode} +% Booleans to decide which version has to be used. +% \begin{macrocode} +\newif\iftensor@bold +\newif\iftensor@uline +% \end{macrocode} +% Package options that set the booleans. +% \begin{macrocode} +\DeclareOption{bold}{\tensor@boldtrue\tensor@ulinefalse} +\DeclareOption{uline}{\tensor@boldfalse\tensor@ulinetrue} +\DeclareOption{arrow}{\tensor@boldfalse\tensor@ulinefalse} +% \end{macrocode} +% Default are arrows, as in standard \LaTeX. +% \begin{macrocode} +\ExecuteOptions{arrow} +\ProcessOptions\relax +% \end{macrocode} +% \begin{macro}{\origvec} +% Save the original \cs{vec} command. +% \begin{macrocode} +\newcommand\origvec{} +\let\origvec=\vec +% \end{macrocode} +% \end{macro} +% If bold vectors and tensors are requested, execute this code. +% \begin{macrocode} +\iftensor@bold +% \end{macrocode} +% \begin{macro}{\vec} +% Redefine the \cs{vec} command. +% \begin{macrocode} + \DeclareRobustCommand*\vec[1]{\ensuremath{\boldsymbol{#1}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\matr} +% Defined the \cs{matr} command. +% \begin{macrocode} + \DeclareRobustCommand*\matr[1]{\ensuremath{\boldsymbol{#1}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\tens} +% Defined the \cs{tens} command. +% \begin{macrocode} + \DeclareRobustCommand*\tens[2]{\ensuremath{\boldsymbol{#1}}} +% \end{macrocode} +% \end{macro} +% Underlined vectors? +% \begin{macrocode} +\else + \iftensor@uline +% \end{macrocode} +% \begin{macro}{\vec} +% Vectors underlined. +% \begin{macrocode} + \DeclareRobustCommand*\vec[1]{\ushort{#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\matr} +% Matrices double underlined. +% \begin{macrocode} + \DeclareRobustCommand*\matr[1]{\ushortd{#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\tens} +% Tensors with number of step below. +% \begin{macrocode} + \DeclareRobustCommand*\tens[2]{% + \begingroup + \setlength{\arraycolsep}{0pt} + \begin{array}[t]{c}% + #1 \\[-2.05ex] + {\scriptstyle \sim} \\[-2.1ex] + {\scriptscriptstyle #2}\\[-0.7ex] + \end{array}% + \endgroup + } +% \end{macrocode} +% \end{macro} +% Vectors with an arrow. +% Since this is the default, the \cs{vec} command has not to be +% redefined. +% \begin{macrocode} + \else +% \end{macrocode} +% \begin{macro}{\matr} +% Matrix. +% \begin{macrocode} + \DeclareRobustCommand*\matr[1]{\ensuremath{\vec{\vec{#1}}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\tens} +% Tensors with number of step below. +% That does not fit well to the arrow styles, but I don't know a +% better solution. +% Does somebody have one? +% \begin{macrocode} + \DeclareRobustCommand*\tens[2]{% + \begingroup + \setlength{\arraycolsep}{0pt} + \begin{array}[t]{c}% + #1 \\[-2.05ex] + {\scriptstyle \sim} \\[-2.1ex] + {\scriptscriptstyle #2}\\[-0.7ex] + \end{array}% + \endgroup + } +% \end{macrocode} +% \end{macro} +% \begin{macrocode} + \fi +\fi +% \end{macrocode} +% \begin{macro}{\dcdot} +% Double scalar product. +% \begin{macrocode} +\DeclareRobustCommand*\dcdot{\mathrel{\cdot\mkern 0.0mu \cdot}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\trans} +% Transformed sign. +% \begin{macrocode} +\DeclareRobustCommand*\trans{^{\mathrm{T}}} +% \end{macrocode} +% \end{macro} +% +% \iffalse +% +% \fi +% \Finale + diff --git a/Master/texmf-dist/source/latex/hhtensor/hhtensor.ins b/Master/texmf-dist/source/latex/hhtensor/hhtensor.ins new file mode 100644 index 00000000000..052e5cab5e4 --- /dev/null +++ b/Master/texmf-dist/source/latex/hhtensor/hhtensor.ins @@ -0,0 +1,26 @@ +\input docstrip.tex +\preamble + + hhtensor package + + Copyright 2003 Harald Harders + + This program can be redistributed and/or modified under the terms + of the LaTeX Project Public License Distributed from CTAN + archives in directory macros/latex/base/lppl.txt; either + version 1 of the License, or any later version. + + h.harders@tu-bs.de + +\endpreamble + +\askforoverwritefalse + +% Files +%%%%%%%%%%%%%%%%%%%%%% +\generate{% + \file{hhtensor.sty}{\from{hhtensor.dtx}{package}}% +}% + +\Msg{* Ready} +\endbatchfile diff --git a/Master/texmf-dist/source/latex/hhtensor/hhtensor.xml b/Master/texmf-dist/source/latex/hhtensor/hhtensor.xml new file mode 100644 index 00000000000..b1633d6377c --- /dev/null +++ b/Master/texmf-dist/source/latex/hhtensor/hhtensor.xml @@ -0,0 +1,29 @@ + + + + + hhtensor + Print vectors, matrices, and tensors. + + Harald Harders + h.harders@tu-bs.de + + + + 0.6 + + + + + This package provides commands for vectors, matrices, and tensors + with different styles (arrows as the \LaTeX\ default, underlined, + and bold). + + + + latex3 + macros/latex/contrib/hhtensor + + -- cgit v1.2.3