summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/leftidx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/leftidx
Initial commit
Diffstat (limited to 'macros/latex/contrib/leftidx')
-rw-r--r--macros/latex/contrib/leftidx/Makefile70
-rw-r--r--macros/latex/contrib/leftidx/README22
-rw-r--r--macros/latex/contrib/leftidx/leftidx.dtx207
-rw-r--r--macros/latex/contrib/leftidx/leftidx.ins25
-rw-r--r--macros/latex/contrib/leftidx/leftidx.pdfbin0 -> 68441 bytes
5 files changed, 324 insertions, 0 deletions
diff --git a/macros/latex/contrib/leftidx/Makefile b/macros/latex/contrib/leftidx/Makefile
new file mode 100644
index 0000000000..adafde2333
--- /dev/null
+++ b/macros/latex/contrib/leftidx/Makefile
@@ -0,0 +1,70 @@
+
+SRCDIR=leftidx
+INSTALLDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/tex/latex/leftidx
+DOCDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/doc/latex/leftidx
+VERSION=`grep '^\\\\def\\\\fileversion' leftidx.dtx | sed 's/^\\\\def\\\\fileversion{\\(.*\\)\\.\\(.*\\)}/\\1_\\2/'`
+
+
+.SUFFIXES: .sty .ins .dtx .dvi .ps
+
+.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 $<
+
+.dvi.ps:
+ dvips -o $(*D)/$(*F).ps $(*D)/$(*F)
+
+
+all: leftidx leftidx.dvi ausgabe
+
+
+leftidx: leftidx.sty
+
+
+
+clean:
+ @-rm -f leftidx.{glo,gls,idx,ilg,ind,aux,log,toc}
+ @-rm -f *~
+
+distclean: clean
+ @-rm -f leftidx.{sty,dvi,ps}
+
+tar: all clean
+ echo Lege leftidx-$(VERSION).tar.gz an
+ -rm -f leftidx-$(VERSION).tar.gz
+ tar czCf .. leftidx-$(VERSION).tar.gz \
+ $(SRCDIR)/README $(SRCDIR)/Makefile \
+ $(SRCDIR)/leftidx.{dtx,ins,dvi} \
+ $(SRCDIR)/leftidx.xml
+
+zip: all clean
+ -@rm -f leftidx-$(VERSION).zip
+ mkdirhier tex/latex/leftidx
+ mkdirhier doc/latex/leftidx
+ mkdirhier source/latex/leftidx
+ mv leftidx.sty tex/latex/leftidx
+ cp leftidx.{dtx,ins,xml} Makefile source/latex/leftidx
+ cp README leftidx.dvi doc/latex/leftidx
+ zip -r leftidx-$(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 leftidx.sty $(INSTALLDIR)
+ install -m644 leftidx.dvi $(DOCDIR)
+ texhash
+
+ausgabe:
+ @echo "Please copy leftidx.sty to a directory"
+ @echo "in the LaTeX search path"
+
+
+leftidx.sty: leftidx.ins leftidx.dtx
+
diff --git a/macros/latex/contrib/leftidx/README b/macros/latex/contrib/leftidx/README
new file mode 100644
index 0000000000..d74e9e653d
--- /dev/null
+++ b/macros/latex/contrib/leftidx/README
@@ -0,0 +1,22 @@
+leftidx.sty
+
+This package enables left subscripts and superscripts in math mode.
+These subscripts and superscripts are automatically raised for better
+fitting to the symbol they belong to.
+
+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.
+
+
+ChangeLog:
+
+2003/09/24 v1.03
+- Reimplementation with dtx format with English documentation
+- Implementation simplyfied
+
+
+2003/09/24
+Harald Harders
+h.harders@tu-bs.de
diff --git a/macros/latex/contrib/leftidx/leftidx.dtx b/macros/latex/contrib/leftidx/leftidx.dtx
new file mode 100644
index 0000000000..6ed2924ab0
--- /dev/null
+++ b/macros/latex/contrib/leftidx/leftidx.dtx
@@ -0,0 +1,207 @@
+% \iffalse meta comment
+% File: leftidx.dtx Copyright (C) 2000, 2001, 2003 Harald Harders
+% \fi
+%
+% \iffalse
+%
+%<*package>
+\def\fileversion{1.03}
+\def\filedate{2003/09/24}
+%</package>
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[latin1]{inputenc}
+\IfFileExists{leftidx.sty}{\usepackage{leftidx}
+ \let\leftidxSTYfound\active}{\GenericWarning{leftidx.dtx}{Package
+ file leftidx.sty not found (Documentation will be messed up!^^J^^A
+ Generate leftidx.sty by (La)TeXing leftidx.ins, process
+ leftidx.dtx again)^^J}\stop}
+\usepackage{longtable}
+\title{The \texttt{leftidx} package\thanks{This file has version
+ \fileversion\ last revised \filedate.}}
+\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
+}
+\makeatother
+\EnableCrossrefs
+\CodelineIndex
+\DoNotIndex{\def,\edef,\let,\newcommand,\newenvironment,\newcounter}
+\DoNotIndex{\setcounter,\space,\if,\else,\fi,\empty,\@empty,\ifx,\fi}
+\DoNotIndex{\ifnum,\fi,\expandafter}
+\CodelineNumbered
+\RecordChanges
+\CheckSum{14}
+\begin{document}
+ \DocInput{leftidx.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \changes{1.03}{2003/09/24}{Reimplementation with dtx format with
+% English documentation}%
+%
+% \maketitle
+% \begin{abstract}
+% \noindent
+% This package enables left subscripts and superscripts in math mode.
+% These subscripts and superscripts are automatically raised for better
+% fitting to the symbol they belong to.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section*{Copyright}
+% Copyright 2000, 2001, 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{Introduction}
+%
+% In mathematical equations, it is sometimes necessary to use indices
+% (subscript or superscript) that are positioned at the left side of a
+% symbol.
+% In tensor mathematics, for instance, some notations use a transponed
+% sign at the left side of the symbol:
+% \begin{eqnarray*}
+% \leftidx{^\mathrm{t}}{\left(A_{ij}\right)}{} &=&
+% \left(A_{ji}\right)
+% \end{eqnarray*}
+%
+% For symbols with a normal character height, this can be reached by
+% simply put the indices without an own symbol:
+%
+% \noindent
+% \begin{minipage}[c]{0.79\linewidth}
+% \leavevmode\begin{verbatim}
+%${_1^2}a_3^4$
+% \end{verbatim}
+% \end{minipage}
+% \begin{minipage}[c]{0.19\linewidth}
+% ${_1^2}a_3^4$
+% \end{minipage}
+%
+% \noindent
+% Is the symbol larger, this leads to unsatisfactory results:
+%
+% \noindent
+% \begin{minipage}[c]{0.79\linewidth}
+% \leavevmode\begin{verbatim}
+%${_1^2}\left(\frac{1}{b}\right)_3^4$
+% \end{verbatim}
+% \end{minipage}
+% \begin{minipage}[c]{0.19\linewidth}
+% ${_1^2}\left(\frac{1}{b}\right)_3^4$
+% \end{minipage}
+%
+% \noindent
+% A better output can be reached by using the package |leftidx.sty|:
+%
+% \noindent
+% \begin{minipage}[c]{0.79\linewidth}
+% \leavevmode\begin{verbatim}
+%$\leftidx{_1^2}{\left(\frac{1}{b}\right)}{_3^4}$
+% \end{verbatim}
+% \end{minipage}
+% \begin{minipage}[c]{0.19\linewidth}
+%$\leftidx{_1^2}{\left(\frac{1}{b}\right)}{_3^4}$
+% \end{minipage}
+%
+% \section{Usage of the package}
+%
+% Two commands are provided by the package.
+%
+% \DescribeMacro{\leftidx}%
+% The \cs{leftidx} command has the syntax
+% \cs{leftidx}\marg{left indices}\marg{symbol}\marg{right indices}.
+% This command typesets the symbol \meta{symbol} with indices on the
+% left and on the right side.
+% Example:
+%
+% \noindent
+% \begin{minipage}[c]{0.79\linewidth}
+% \leavevmode\begin{verbatim}
+%$\leftidx{_1^2}{\left(\frac{1}{b}\right)}{_3^4}$
+% \end{verbatim}
+% \end{minipage}
+% \begin{minipage}[c]{0.19\linewidth}
+% $\leftidx{_1^2}{\left(\frac{1}{b}\right)}{_3^4}$
+% \end{minipage}
+%
+% \noindent
+% You may omit left or right indices by using empty arguments.
+%
+% The next example shows the same in the different mathematical
+% styles:
+% \def\asdf{\leftidx{_1^2}{\left(\frac1b\right)}{_3^4}}%
+% \begin{displaymath}
+% \displaystyle\asdf\quad\textstyle\asdf\quad
+% \scriptstyle\asdf\quad\scriptscriptstyle\asdf
+% \end{displaymath}
+% As you can see from the left indices, the horizontal spacing of the
+% left indices is not perfect.
+% You have to adjust them by yourself.
+%
+% \DescribeMacro{\ltrans}%
+% The \cs{ltrans}\marg{symbol} command typesets a small upright ``t''
+% as transponed sign on the left side of \meta{symbol}.
+% Example:
+%
+% \noindent
+% \begin{minipage}[c]{0.79\linewidth}
+% \leavevmode\begin{verbatim}
+%$\ltrans{\underline{\underline{J}}}=
+%\underline{\underline{J}}^{-1}$
+% \end{verbatim}
+% \end{minipage}
+% \begin{minipage}[c]{0.19\linewidth}
+% $\ltrans{\underline{\underline{J}}}=\underline{\underline{J}}^{-1}$
+% \end{minipage}
+%
+%
+% \StopEventually{\PrintChanges \PrintIndex}
+%
+% \section{The implementation}
+% \iffalse
+%<*package>
+% \fi
+% Heading of the package:
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{leftidx}[\filedate\space v\fileversion\space Left indices]
+% \end{macrocode}
+% \begin{macro}{\leftidx}
+% \changes{1.03}{2003/09/24}{Implementation simplyfied}%
+% Command for left indices.
+% The braces around the \cs{vphantom} are necessary to really raise
+% the left indices.
+% \begin{macrocode}
+\newcommand\leftidx[3]{%
+ {\vphantom{#2}}#1#2#3%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ltrans}
+% Left positioned transponed sign.
+% \begin{macrocode}
+\newcommand{\ltrans}[1]{\leftidx{^\mathrm{t}}{\!#1}{}}
+% \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+%</package>
+% \fi
+% \Finale
+
diff --git a/macros/latex/contrib/leftidx/leftidx.ins b/macros/latex/contrib/leftidx/leftidx.ins
new file mode 100644
index 0000000000..c8aea0d694
--- /dev/null
+++ b/macros/latex/contrib/leftidx/leftidx.ins
@@ -0,0 +1,25 @@
+\input docstrip.tex
+\preamble
+
+ leftidx package
+
+ Copyright 2000, 2001, 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{leftidx.sty}{\from{leftidx.dtx}{package}}%
+}
+\Msg{* Ready}
+\endbatchfile \ No newline at end of file
diff --git a/macros/latex/contrib/leftidx/leftidx.pdf b/macros/latex/contrib/leftidx/leftidx.pdf
new file mode 100644
index 0000000000..4741638931
--- /dev/null
+++ b/macros/latex/contrib/leftidx/leftidx.pdf
Binary files differ