From c5e415e617636193b934f2e5ff7479167f746e92 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 16 Jul 2007 16:34:19 +0000 Subject: new latex package boldtensors (3jul07) git-svn-id: svn://tug.org/texlive/trunk@4621 c570f23f-e606-0410-a88d-b1316a301751 --- Build/tools/tpm-ctan-check | 5 +- .../doc/latex/boldtensors/boldtensors.pdf | Bin 0 -> 62269 bytes .../doc/latex/boldtensors/boldtensors.tex | 77 ++++++ .../tex/latex/boldtensors/boldtensors.sty | 277 +++++++++++++++++++++ Master/tlpkg/tlpsrc/boldtensors.tlpsrc | 2 + Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc | 1 + 6 files changed, 360 insertions(+), 2 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/boldtensors/boldtensors.pdf create mode 100644 Master/texmf-dist/doc/latex/boldtensors/boldtensors.tex create mode 100644 Master/texmf-dist/tex/latex/boldtensors/boldtensors.sty create mode 100644 Master/tlpkg/tlpsrc/boldtensors.tlpsrc diff --git a/Build/tools/tpm-ctan-check b/Build/tools/tpm-ctan-check index b47ee1403e6..bc69d4b942c 100755 --- a/Build/tools/tpm-ctan-check +++ b/Build/tools/tpm-ctan-check @@ -18,7 +18,8 @@ my @WorkingTPM = qw( aurical authorindex auto-pst-pdf automata babelbib beamer beamer-contrib beamer-tut-pt begriff bera betababel bezos bghyphen bibhtml bibleref bibtopic bibunits bigfoot - binomexp bitfield blacklettert1 blindtext bookest booklet bophook + binomexp bitfield blacklettert1 blindtext boldtensors + bookest booklet bophook boxhandler breakurl bullcntr bussproofs bytefield caption carlisle cbcoptic ccaption cdpbundl cellspace changebar chappg chem-journal chemcompounds cherokee circ @@ -28,7 +29,7 @@ my @WorkingTPM = qw( colortbl colorwav commath compactbib complexity comprehensive computational-complexity cooking cool coollist coolstr cooltooltips coordsys courier-scaled courseoutline coursepaper coverpage - crop crossreference csquotes ctable cursolatex cursor cuisine + crop crossreference csquotes csvtools ctable cursolatex cursor cuisine currvita curve curve2e curves custom-bib cyrillic dancers dashbox dateiliste datetime dcpic decimal delimtxt digiconfigs diff --git a/Master/texmf-dist/doc/latex/boldtensors/boldtensors.pdf b/Master/texmf-dist/doc/latex/boldtensors/boldtensors.pdf new file mode 100644 index 00000000000..8f312179ede Binary files /dev/null and b/Master/texmf-dist/doc/latex/boldtensors/boldtensors.pdf differ diff --git a/Master/texmf-dist/doc/latex/boldtensors/boldtensors.tex b/Master/texmf-dist/doc/latex/boldtensors/boldtensors.tex new file mode 100644 index 00000000000..044e99ad26f --- /dev/null +++ b/Master/texmf-dist/doc/latex/boldtensors/boldtensors.tex @@ -0,0 +1,77 @@ +%% +%% Description of the LaTeX package `boldtensors' +%% +%% This program can be redistributed and/or modified under the +%% terms of the GNU Public License, version 2. +%% +%% 2007/06/29 +%% Author: Werner Fink +%% +\documentclass{ltxdoc} +\usepackage[utf8]{inputenc} +\usepackage{amsmath} +\usepackage[nabla,differential]{boldtensors} +\title{The `Boldtensors'\ style file} +\author{% +\copyright\ 1995 by Werner Fink and Jürgen Bachteler\and +\copyright\ 2007 by Werner Fink} +\date{June 29, 2007} +\nofiles +\parindent0em +\parskip1ex +\begin{document} +\maketitle +\thispagestyle{empty} +The \LaTeX{} style file `Boldtensors'\ provides +within standard \verb|\mathversion{normal}| (the \verb|\unboldmath| +environment) latin and greek characters in bold and blackboard +layout. With the style option \verb|nabla| also the Nabla operator +$\nabla$ is available in bold layout. For the unit tensor +and null tensor a bold `$~1$' and bold `$~0$' are provided. +A second option \verb|differential| let the character +`$d$' behave like an ordinary operator in roman layout. + +The major advantage is that subscripts, indices and accents +can be used without any layout problems. Any index or +subscript will be placed nearby on the bold/blackboard +symbol accordingly to the layout/formating rules defined +in the used fonts. + +The usage is simple \verb|$~T$| and \verb|$"R$|. The first +just prints a bold $~T$ which denotes a tensor independent +from its components $T_{ij}$ within an arbitrary chosen +orthonormal base. The second example shows a blackboard +bold $"R$ for the real numbers sometimes written as +\verb|$\mathrm{I\!R}$| but looks like `$\mathrm{I\!R}$'.\@ + +Some more examples: +\begin{verbatim} +\documentclass{article} +\usepackage{amsmath} +\usepackage[differential]{boldtensors} +\begin{document} +\begin{math} +ds^2 = g_{\alpha\beta}dx^{\alpha}dx^{\beta} +\end{math} +\end{document} +\end{verbatim} +\begin{math} +ds^2 = g_{\alpha\beta}dx^{\alpha}dx^{\beta} +\end{math} +\begin{verbatim} +\documentclass{article} +\usepackage{amsmath} +\usepackage{boldtensors} +\begin{document} +\begin{math} +~G = \frac{8 \pi G}{c^4} ~T +\end{math} +\end{document} +\end{verbatim} +\begin{math} +~G = \frac{8 \pi G}{c^4} ~T +\end{math} +% +% Just the end +% +\end{document} diff --git a/Master/texmf-dist/tex/latex/boldtensors/boldtensors.sty b/Master/texmf-dist/tex/latex/boldtensors/boldtensors.sty new file mode 100644 index 00000000000..dd192db8041 --- /dev/null +++ b/Master/texmf-dist/tex/latex/boldtensors/boldtensors.sty @@ -0,0 +1,277 @@ +%% +%% LaTeX package `boldtensors' +%% +%% This program can be redistributed and/or modified under the +%% terms of the GNU Public License, version 2. +%% +%% Copyright 1995 by Werner Fink und Juergen Bachteler +%% Copyright 2007 by Werner Fink +%% +%% 1995/01/10 +%% Authors : Werner Fink und Juergen Bachteler +%% Institut fuer Theoretische und Angewandte Physik, +%% Universitaet Stuttgart +%% Pfaffenwaldring 57/vi, 7000 Stuttgart 80 +%% +%% 2007/06/29 +%% Author: Werner Fink +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{boldtensors}[1995/01/10 boldtensors] +\@ifundefined{@bt@math}{\relax}% + {\message{-- boldtensors already loaded --}\endinput} +\message{Document Style Option `boldtensors' } +\newif\ifbt@nabla\bt@nablafalse +\newif\ifbt@diffop\bt@diffopfalse +\DeclareOption{nabla}{\bt@nablatrue} +\DeclareOption{differential}{\bt@diffoptrue} +\ProcessOptions +% +% Define a font family and some font shapes for both +% bold latin and greek symbols in \mathversion{normal} +% For all fonts we use \skewchar'177 then we can also +% use accents even on the nabla operator. +% +\DeclareFontFamily{U}{cmten}{\skewchar\font='177} +% +% Bold italic standard version +% +\DeclareFontShape{U}{cmten}{b}{it}{% + <5> sfixed * [5.48] cmmib5 + <6> sfixed * [6.57] cmmib6 + <7> sfixed * [7.67] cmmib7 + <8> sfixed * [8.76] cmmib8 + <9> sfixed * [9.86] cmmib9 + <10> sfixed * [10] cmmib10 + <11> sfixed * [10.95] cmmib10 + <12> sfixed * [12] cmmib10 + <14> sfixed * [14.4] cmmib10 + <17> sfixed * [17.28] cmmib10 + <20> sfixed * [20.74] cmmib10 + <25> sfixed * [24.88] cmmib10}{} +% +% Bold \mathrm numbers for null and one tensor +% Some changes are done for upper greek symbols +% +\DeclareFontShape{U}{cmten}{bx}{n}{% + <5> sfixed * [5.48] cmbx5 + <6> sfixed * [6.57] cmbx6 + <7> sfixed * [7.67] cmbx7 + <8> sfixed * [8.76] cmbx8 + <9> sfixed * [9.86] cmbx9 + <10> sfixed * [10] cmbx10 + <11> sfixed * [10.95] cmbx10 + <12> sfixed * [12] cmbx12 + <14> sfixed * [14.4] cmbx12 + <17> sfixed * [17.28] cmbx12 + <20> sfixed * [20.74] cmbx12 + <25> sfixed * [24.88] cmbx12}{} +% +% Some bold symbols useful for e.g. nabla operator +% cmbsy5 upto cmbsy9 are found within the AMS fonts +% +\DeclareFontShape{U}{cmten}{b}{n}{% + <5> sfixed * [5.48] cmbsy5 + <6> sfixed * [6.57] cmbsy6 + <7> sfixed * [7.67] cmbsy7 + <8> sfixed * [8.76] cmbsy8 + <9> sfixed * [9.86] cmbsy9 + <10> sfixed * [10] cmbsy10 + <11> sfixed * [10.95] cmbsy10 + <12> sfixed * [12] cmbsy10 + <14> sfixed * [14.4] cmbsy10 + <17> sfixed * [17.28] cmbsy10 + <20> sfixed * [20.74] cmbsy10 + <25> sfixed * [24.88] cmbsy10}{} +% +% The blackboards bolds from Jeffrey's +% +\DeclareFontShape{U}{cmten}{m}{n}{% + <5> sfixed * [5] bbold5 + <6> sfixed * [6] bbold6 + <7> sfixed * [7] bbold7 + <8> sfixed * [8] bbold8 + <9> sfixed * [9] bbold9 + <10> sfixed * [10] bbold10 + <11> sfixed * [10.95] bbold10 + <12> sfixed * [12] bbold12 + <14> sfixed * [14.4] bbold12 + <17> sfixed * [17.28] bbold17 + <20> sfixed * [20.74] bbold17 + <25> sfixed * [24.88] bbold17}{} +% +% Now declare the symbol fonts +% +\DeclareSymbolFont{cmtensor} {U}{cmten}{b} {it} +\DeclareSymbolFont{cmoperator}{U}{cmten}{bx}{n} +\DeclareSymbolFont{cmsymbols} {U}{cmten}{b} {n} +\DeclareSymbolFont{cmbboard} {U}{cmten}{m} {n} +% +% Set up fonts +% +\DeclareSymbolFontAlphabet{\btensor} {cmtensor} +\DeclareSymbolFontAlphabet{\boperator}{cmoperator} +\DeclareSymbolFontAlphabet{\bsymbols} {cmsymbols} +\DeclareSymbolFontAlphabet{\bboard} {cmbboard} +% +% This macro helps us some none \mathalpha +% symbols in a bold version +% +\let\@wait\expandafter +\let\@null\relax +\def\def@DeclareMathSymbol#1#2#3#4#5{\@wait% + \DeclareMathSymbol\csname#1@\string#2\endcsname{#3}{#4}{#5}} +% +% For both bold and blackboard bold symbols +% +\def\btens@DeclareMathSymbol{\def@DeclareMathSymbol{bt}} +\def\bbold@DeclareMathSymbol{\def@DeclareMathSymbol{bb}} +% +% The bold tensor none \mathalpha symbols +% +\btens@DeclareMathSymbol{\alpha}{\mathord}{cmtensor}{"0B} +\btens@DeclareMathSymbol{\beta}{\mathord}{cmtensor}{"0C} +\btens@DeclareMathSymbol{\gamma}{\mathord}{cmtensor}{"0D} +\btens@DeclareMathSymbol{\delta}{\mathord}{cmtensor}{"0E} +\btens@DeclareMathSymbol{\epsilon}{\mathord}{cmtensor}{"0F} +\btens@DeclareMathSymbol{\zeta}{\mathord}{cmtensor}{"10} +\btens@DeclareMathSymbol{\eta}{\mathord}{cmtensor}{"11} +\btens@DeclareMathSymbol{\theta}{\mathord}{cmtensor}{"12} +\btens@DeclareMathSymbol{\iota}{\mathord}{cmtensor}{"13} +\btens@DeclareMathSymbol{\kappa}{\mathord}{cmtensor}{"14} +\btens@DeclareMathSymbol{\lambda}{\mathord}{cmtensor}{"15} +\btens@DeclareMathSymbol{\mu}{\mathord}{cmtensor}{"16} +\btens@DeclareMathSymbol{\nu}{\mathord}{cmtensor}{"17} +\btens@DeclareMathSymbol{\xi}{\mathord}{cmtensor}{"18} +\btens@DeclareMathSymbol{\pi}{\mathord}{cmtensor}{"19} +\btens@DeclareMathSymbol{\rho}{\mathord}{cmtensor}{"1A} +\btens@DeclareMathSymbol{\sigma}{\mathord}{cmtensor}{"1B} +\btens@DeclareMathSymbol{\tau}{\mathord}{cmtensor}{"1C} +\btens@DeclareMathSymbol{\upsilon}{\mathord}{cmtensor}{"1D} +\btens@DeclareMathSymbol{\phi}{\mathord}{cmtensor}{"1E} +\btens@DeclareMathSymbol{\chi}{\mathord}{cmtensor}{"1F} +\btens@DeclareMathSymbol{\psi}{\mathord}{cmtensor}{"20} +\btens@DeclareMathSymbol{\omega}{\mathord}{cmtensor}{"21} +\btens@DeclareMathSymbol{\varepsilon}{\mathord}{cmtensor}{"22} +\btens@DeclareMathSymbol{\vartheta}{\mathord}{cmtensor}{"23} +\btens@DeclareMathSymbol{\varpi}{\mathord}{cmtensor}{"24} +\btens@DeclareMathSymbol{\varrho}{\mathord}{cmtensor}{"25} +\btens@DeclareMathSymbol{\varsigma}{\mathord}{cmtensor}{"26} +\btens@DeclareMathSymbol{\varphi}{\mathord}{cmtensor}{"27} +\btens@DeclareMathSymbol{\imath}{\mathord}{cmtensor}{"7B} +\btens@DeclareMathSymbol{\jmath}{\mathord}{cmtensor}{"7C} +% +% Some bold integers and roman symbols +% +\btens@DeclareMathSymbol{1}{\mathord}{cmoperator}{"31} +\btens@DeclareMathSymbol{0}{\mathord}{cmoperator}{"30} +\btens@DeclareMathSymbol{\Gamma}{\mathord}{cmoperator}{"00} +\btens@DeclareMathSymbol{\Delta}{\mathord}{cmoperator}{"01} +\btens@DeclareMathSymbol{\Theta}{\mathord}{cmoperator}{"02} +\btens@DeclareMathSymbol{\Lambda}{\mathord}{cmoperator}{"03} +\btens@DeclareMathSymbol{\Xi}{\mathord}{cmoperator}{"04} +\btens@DeclareMathSymbol{\Pi}{\mathord}{cmoperator}{"05} +\btens@DeclareMathSymbol{\Sigma}{\mathord}{cmoperator}{"06} +\btens@DeclareMathSymbol{\Upsilon}{\mathord}{cmoperator}{"07} +\btens@DeclareMathSymbol{\Phi}{\mathord}{cmoperator}{"08} +\btens@DeclareMathSymbol{\Psi}{\mathord}{cmoperator}{"09} +\btens@DeclareMathSymbol{\Omega}{\mathord}{cmoperator}{"0A} +% +% The bold nabla operator +% +\ifbt@nabla +\btens@DeclareMathSymbol{\nabla}{\mathord}{cmsymbols}{"72}\fi +% +% The blackboard bold greek characters +% +\bbold@DeclareMathSymbol{\alpha}{\mathord}{cmbboard}{"0B} +\bbold@DeclareMathSymbol{\beta}{\mathord}{cmbboard}{"0C} +\bbold@DeclareMathSymbol{\gamma}{\mathord}{cmbboard}{"0D} +\bbold@DeclareMathSymbol{\delta}{\mathord}{cmbboard}{"0E} +\bbold@DeclareMathSymbol{\epsilon}{\mathord}{cmbboard}{"0F} +\bbold@DeclareMathSymbol{\zeta}{\mathord}{cmbboard}{"10} +\bbold@DeclareMathSymbol{\eta}{\mathord}{cmbboard}{"11} +\bbold@DeclareMathSymbol{\theta}{\mathord}{cmbboard}{"12} +\bbold@DeclareMathSymbol{\iota}{\mathord}{cmbboard}{"13} +\bbold@DeclareMathSymbol{\kappa}{\mathord}{cmbboard}{"14} +\bbold@DeclareMathSymbol{\lambda}{\mathord}{cmbboard}{"15} +\bbold@DeclareMathSymbol{\mu}{\mathord}{cmbboard}{"16} +\bbold@DeclareMathSymbol{\nu}{\mathord}{cmbboard}{"17} +\bbold@DeclareMathSymbol{\xi}{\mathord}{cmbboard}{"18} +\bbold@DeclareMathSymbol{\pi}{\mathord}{cmbboard}{"19} +\bbold@DeclareMathSymbol{\rho}{\mathord}{cmbboard}{"1A} +\bbold@DeclareMathSymbol{\sigma}{\mathord}{cmbboard}{"1B} +\bbold@DeclareMathSymbol{\tau}{\mathord}{cmbboard}{"1C} +\bbold@DeclareMathSymbol{\upsilon}{\mathord}{cmbboard}{"1D} +\bbold@DeclareMathSymbol{\phi}{\mathord}{cmbboard}{"1E} +\bbold@DeclareMathSymbol{\chi}{\mathord}{cmbboard}{"1F} +\bbold@DeclareMathSymbol{\psi}{\mathord}{cmbboard}{"20} +\bbold@DeclareMathSymbol{\omega}{\mathord}{cmbboard}{"21} +\bbold@DeclareMathSymbol{\varepsilon}{\mathord}{cmbboard}{"22} +\bbold@DeclareMathSymbol{\vartheta}{\mathord}{cmbboard}{"23} +\bbold@DeclareMathSymbol{\varpi}{\mathord}{cmbboard}{"24} +\bbold@DeclareMathSymbol{\varrho}{\mathord}{cmbboard}{"25} +\bbold@DeclareMathSymbol{\varsigma}{\mathord}{cmbboard}{"26} +\bbold@DeclareMathSymbol{\varphi}{\mathord}{cmbboard}{"27} +\bbold@DeclareMathSymbol{\imath}{\mathord}{cmbboard}{"7B} +\bbold@DeclareMathSymbol{\jmath}{\mathord}{cmbboard}{"7C} +% +% Redeclare the small `d' to have differential operator in roman +% +\ifbt@diffop +\DeclareMathSymbol{d}{\mathord}{operators}{`d}\fi +% +% For known symbols use them otherwise use font +% +\def\btens@#1{% + \@wait\ifx\csname bt@\string#1\endcsname\@null% + \mathord{\btensor#1}% + \else% + \csname bt@\string#1\endcsname% + \fi} +\def\bbold@#1{% + \@wait\ifx\csname bb@\string#1\endcsname\@null% + \mathord{\bboard#1}% + \else% + \csname bb@\string#1\endcsname% + \fi} +% +% Do this only in math mode +% +\def\@bt@math{\ifmmode\@wait\btens@\else\@wait\bt@text\fi} +\def\@bb@math{\ifmmode\@wait\bbold@\else\@wait\bb@text\fi} +% +% Avoid that macros will be broken +% +\def\bt@math{\protect\@bt@math} +\def\bb@math{\protect\@bb@math} +% +% Switch cat code back for ~ and " +% +\def\outer@boldtensor{% + \catcode`\"=13\@null% + \catcode`\~=13\@null} +% +% Switch cat code to math for ~ and " +% +\def\inner@boldtensor{% + \mathcode`\"="8000\@null% + \mathcode`\~="8000\@null} +% +% Set up the hook for begin{document} +% +\begingroup + \outer@boldtensor\@null% + \gdef\boldtensor{% + \let\bt@text=~\@null% + \let\bb@text="\@null% + \let~=\bt@math\@null% + \let"=\bb@math\@null% + \let\boldtensor=\@null% + \inner@boldtensor\@null} + \AtBeginDocument{\boldtensor} +\endgroup +% +% Just the end +% +\endinput diff --git a/Master/tlpkg/tlpsrc/boldtensors.tlpsrc b/Master/tlpkg/tlpsrc/boldtensors.tlpsrc new file mode 100644 index 00000000000..2799800c96c --- /dev/null +++ b/Master/tlpkg/tlpsrc/boldtensors.tlpsrc @@ -0,0 +1,2 @@ +name boldtensors +category Package diff --git a/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc index 13a1890945e..0e3e5031b96 100644 --- a/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc @@ -4,6 +4,7 @@ shortdesc Advanced math typesetting longdesc Extra math depend Package/12many depend Package/amstex +depend Package/boldtensors depend Package/breqn depend Package/ccfonts depend Package/commath -- cgit v1.2.3