From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/hhtensor/ChangeLog | 5 + macros/latex/contrib/hhtensor/Makefile | 76 +++++++ macros/latex/contrib/hhtensor/README | 47 +++++ macros/latex/contrib/hhtensor/getversion.tex | 7 + macros/latex/contrib/hhtensor/hhtensor.dtx | 293 +++++++++++++++++++++++++++ macros/latex/contrib/hhtensor/hhtensor.ins | 26 +++ macros/latex/contrib/hhtensor/hhtensor.pdf | Bin 0 -> 360629 bytes 7 files changed, 454 insertions(+) create mode 100644 macros/latex/contrib/hhtensor/ChangeLog create mode 100644 macros/latex/contrib/hhtensor/Makefile create mode 100644 macros/latex/contrib/hhtensor/README create mode 100644 macros/latex/contrib/hhtensor/getversion.tex create mode 100644 macros/latex/contrib/hhtensor/hhtensor.dtx create mode 100644 macros/latex/contrib/hhtensor/hhtensor.ins create mode 100644 macros/latex/contrib/hhtensor/hhtensor.pdf (limited to 'macros/latex/contrib/hhtensor') diff --git a/macros/latex/contrib/hhtensor/ChangeLog b/macros/latex/contrib/hhtensor/ChangeLog new file mode 100644 index 0000000000..004264604e --- /dev/null +++ b/macros/latex/contrib/hhtensor/ChangeLog @@ -0,0 +1,5 @@ +2011/12/29 0.61 Harald Harders (harald.harders@gmx.de) + - Avoid usage of \fileversion etc. + +2003/10/15 0.6 Harald Harders (h.harders@tu-bs.de) + - Total new implementation diff --git a/macros/latex/contrib/hhtensor/Makefile b/macros/latex/contrib/hhtensor/Makefile new file mode 100644 index 0000000000..2c4daf366f --- /dev/null +++ b/macros/latex/contrib/hhtensor/Makefile @@ -0,0 +1,76 @@ + +SRCDIR=hhtensor +INSTALLDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/tex/latex/hhtensor +DOCDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/doc/latex/hhtensor +VERSION=`latex getversion | grep '^VERSION' | sed 's/^VERSION \\(.*\\)\\.\\(.*\\)/\\1_\\2/'` + + +.SUFFIXES: .sty .ins .dtx .dvi .ps .pdf + +.ins.sty: + pdflatex $< + +.dtx.pdf: + pdflatex $< + pdflatex $< + makeindex -s gind.ist $(*D)/$(*F) + makeindex -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo + pdflatex $< + + +all: hhtensor hhtensor.pdf + +hhtensor: hhtensor.sty + +hhtensor.pdf: hhtensor.dtx hhtensor.ins + pdflatex hhtensor.dtx + pdflatex hhtensor.dtx + makeindex -s gind.ist hhtensor + makeindex -s gglo.ist -o hhtensor.gls hhtensor.glo + pdflatex 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.pdf + +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)/ChangeLog \ + $(SRCDIR)/Makefile \ + $(SRCDIR)/hhtensor.pdf \ + $(SRCDIR)/hhtensor.dtx \ + $(SRCDIR)/hhtensor.ins \ + $(SRCDIR)/getversion.tex \ + $(SRCDIR)/hhtensor.xml + rm getversion.log + +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.pdf doc/latex/hhtensor + zip -r hhtensor-$(VERSION).zip tex doc source + rm -r tex/ doc/ source/ + rm getversion.log + +install: all + if [ ! -d $(INSTALLDIR) ]; then mkdirhier $(INSTALLDIR); fi + if [ ! -d $(DOCDIR) ]; then mkdirhier $(DOCDIR); fi + install -m644 hhtensor.sty $(INSTALLDIR) + install -m644 hhtensor.pdf $(DOCDIR) + texhash + + +hhtensor.sty: hhtensor.ins hhtensor.dtx + diff --git a/macros/latex/contrib/hhtensor/README b/macros/latex/contrib/hhtensor/README new file mode 100644 index 0000000000..c037158102 --- /dev/null +++ b/macros/latex/contrib/hhtensor/README @@ -0,0 +1,47 @@ +hhtensor.sty +============ + +This package provides commands for vectors, matrices, and tensors +with different styles (arrows as the \LaTeX\ default, underlined, +and bold). + + +Copyright 2003-2011 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. + + + +Installation: + +automatic: - run make + - run make install + or + - run make + - copy hhtensor.sty to a place where LaTeX can find it + - run texhash or the corresponding command of your distribution + +by hand: - execute latex on hhtensor.ins + - copy hhtensor.sty to a place LaTeX can find it + - run texhash or the corresponding command of your distribution + If you also want to re-compile the documentation which should not + be necessary do the following items, too: + - execute: + latex hhtensor.dtx + latex hhtensor.dtx + makeindex -s gglo.ist -o hhtensor.gls hhtensor.glo + makeindex -s gind.ist hhtensor + latex hhtensor.dtx + - copy hhtensor.dvi to the documentation tree of your + TeX implementation + - run texhash or the corresponding command of your distribution, + again + + + +2011-12-29 +Harald Harders +harald.harders@gmx.de diff --git a/macros/latex/contrib/hhtensor/getversion.tex b/macros/latex/contrib/hhtensor/getversion.tex new file mode 100644 index 0000000000..ab1df50392 --- /dev/null +++ b/macros/latex/contrib/hhtensor/getversion.tex @@ -0,0 +1,7 @@ +\documentclass[english]{ltxdoc} +\nofiles +\usepackage{hhtensor} +\GetFileInfo{hhtensor.sty} +\typeout{VERSION \fileversion} +\begin{document} +\end{document} diff --git a/macros/latex/contrib/hhtensor/hhtensor.dtx b/macros/latex/contrib/hhtensor/hhtensor.dtx new file mode 100644 index 0000000000..c4280433b7 --- /dev/null +++ b/macros/latex/contrib/hhtensor/hhtensor.dtx @@ -0,0 +1,293 @@ +% \iffalse meta comment +% File: hhtensor.dtx Copyright (C) 2003-2011 Harald Harders +% \fi +% +% \iffalse +% +%<*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 +} +\GetFileInfo{hhtensor.sty} +\title{The \texttt{hhtensor} package\thanks{This file has version + \fileversion\ last revised \filedate.}} +\author{Harald Harders\\\texttt{harald.harders@gmx.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.61}{2011/12/29}{Avoid usage of \cs{fileversion} etc.}% +% \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--2011 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} + [2011/12/29 v0.61 Print vectors and tensors] +% \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/macros/latex/contrib/hhtensor/hhtensor.ins b/macros/latex/contrib/hhtensor/hhtensor.ins new file mode 100644 index 0000000000..846cde63da --- /dev/null +++ b/macros/latex/contrib/hhtensor/hhtensor.ins @@ -0,0 +1,26 @@ +\input docstrip.tex +\preamble + + hhtensor package + + Copyright 2003-2011 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. + + harald.harders@gmx.de + +\endpreamble + +\askforoverwritefalse + +% Files +%%%%%%%%%%%%%%%%%%%%%% +\generate{% + \file{hhtensor.sty}{\from{hhtensor.dtx}{package}}% +}% + +\Msg{* Ready} +\endbatchfile diff --git a/macros/latex/contrib/hhtensor/hhtensor.pdf b/macros/latex/contrib/hhtensor/hhtensor.pdf new file mode 100644 index 0000000000..5627d172e9 Binary files /dev/null and b/macros/latex/contrib/hhtensor/hhtensor.pdf differ -- cgit v1.2.3