From 300efd5afacdf57d11f593b9263b7224e8052de9 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 19 Nov 2009 18:35:24 +0000 Subject: new latex package subsupscripts 1.0 (27oct09) git-svn-id: svn://tug.org/texlive/trunk@16080 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/subsupscripts/README | 5 + .../doc/latex/subsupscripts/SubSupScripts.pdf | Bin 0 -> 109791 bytes .../doc/latex/subsupscripts/SubSupScripts.tex | 215 +++++++++++++++++++++ .../tex/latex/subsupscripts/subsupscripts.sty | 30 +++ Master/tlpkg/bin/tlpkg-ctan-check | 3 +- Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc | 1 + Master/tlpkg/tlpsrc/subsupscripts.tlpsrc | 0 7 files changed, 253 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/subsupscripts/README create mode 100644 Master/texmf-dist/doc/latex/subsupscripts/SubSupScripts.pdf create mode 100644 Master/texmf-dist/doc/latex/subsupscripts/SubSupScripts.tex create mode 100644 Master/texmf-dist/tex/latex/subsupscripts/subsupscripts.sty create mode 100644 Master/tlpkg/tlpsrc/subsupscripts.tlpsrc diff --git a/Master/texmf-dist/doc/latex/subsupscripts/README b/Master/texmf-dist/doc/latex/subsupscripts/README new file mode 100644 index 00000000000..68642a504db --- /dev/null +++ b/Master/texmf-dist/doc/latex/subsupscripts/README @@ -0,0 +1,5 @@ +The package SubSupScripts provides some new more flexible commands to typeset +subscripts and superscripts in mathematical mode. + +Author: Riccardo Bresciani +License type: lppl \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/subsupscripts/SubSupScripts.pdf b/Master/texmf-dist/doc/latex/subsupscripts/SubSupScripts.pdf new file mode 100644 index 00000000000..f2c3acbfab1 Binary files /dev/null and b/Master/texmf-dist/doc/latex/subsupscripts/SubSupScripts.pdf differ diff --git a/Master/texmf-dist/doc/latex/subsupscripts/SubSupScripts.tex b/Master/texmf-dist/doc/latex/subsupscripts/SubSupScripts.tex new file mode 100644 index 00000000000..3d3e9c35d99 --- /dev/null +++ b/Master/texmf-dist/doc/latex/subsupscripts/SubSupScripts.tex @@ -0,0 +1,215 @@ +\documentclass[green,a4paper,oneside,openany,noparindent,noparskip,article,nomatter]{bookest} + +\usepackage[T1]{fontenc} +\usepackage{amsmath} +\usepackage{amsfonts} +\usepackage{subsupscripts} +\usepackage{fancyvrb} +\usepackage{stmaryrd} +\usepackage{palatino} +\usepackage{hyperref} + +\VerbatimFootnotes + +\newcommand{\choice}{\oplus} % Usual notation +\newcommand{\Choice}{$\choice$} +\newcommand{\Boxast}{$\boxast$} +\newcommand{\Boxcircle}{$\boxcircle$} +\newcommand{\Boxbslash}{$\boxbslash$} +\newcommand{\Boxbox}{$\boxbox$} +\newcommand{\Elll}{$\ell_L$} +\newcommand{\Ellr}{$\ell_R$} + +\setbibname{References} + +\setleftmark{} +\setrightmark{} + +%pdfLaTeX +\hypersetup{ +pdftitle={SubSupScripts}, +pdfsubject={A LaTeX package to provide new commands for subscripts and superscripts.}, +pdfauthor={Riccardo Bresciani}, +pdfkeywords={SubSupScripts, LaTeX, Subscript, Superscript, TeX}, +pdfstartview=FitV, +%colorlinks +} + + +% Aliases +\newcommand{\ie}{\emph{i.e.} } + +\author{Riccardo Bresciani} +\title{SubSupScripts\hfill{\small\href{http://tex.nopkoguo.net/subsupscripts}{http://tex.nopkoguo.net/subsupscripts}}} +\newcommand{\belowLine}{{\normalsize Version 1.0 --- \today}} + +\makeatletter +\renewcommand{\maketitle}{\thispagestyle{plain}{\Huge\textbf{\colorB\@title}\Large\\\vspace{2ex} +\@author{\colorA\hrule}\vspace{1ex}\belowLine\\\vspace{2ex}}} +\makeatother + + \geometry{ + hmargin=2.3cm, + vmargin={3cm,3cm}, + bindingoffset=0mm, + columnsep=20pt + } + +\begin{document} + +\maketitle + +\begin{abstract}{Brief description of the package:} +This package provides some new more flexible commands to typeset subscripts and superscripts in mathematical mode. +\end{abstract} + + +\artsection{Usage} +\artsubsection{Default lengths} +The following commands use the default lengths, as defined in \ref{lengths}. They are quite tight and are useful in case of an operator such as \Choice. +\begin{itemize} +\item \Verb[commandchars=-\[\]]+\fourscripts{-Choice}{-Boxast}{-Boxbox}{-Boxcircle}{-Boxbslash}+ + +Output: $\fourscripts{\choice}{\boxast}{\boxbox}{\boxcircle}{\boxbslash}$ +\item \Verb[commandchars=-\[\]]+\lrsubscripts{-Choice}{-Boxbox}{-Boxcircle}+ + +Output: $\lrsubscripts{\choice}{\boxbox}{\boxcircle}$ +\item \Verb[commandchars=-\[\]]+\lrsuperscripts{-Choice}{-Boxbox}{-Boxcircle}+ + +Output: $\lrsuperscripts{\choice}{\boxbox}{\boxcircle}$ +\item \Verb[commandchars=-\[\]]+\twolscripts{-Choice}{-Boxbox}{-Boxcircle}+ + +Output: $\twolscripts{\choice}{\boxbox}{\boxcircle}$ +\item \Verb[commandchars=-\[\]]+\tworscripts{-Choice}{-Boxbox}{-Boxcircle}+ + +Output: $\tworscripts{\choice}{\boxbox}{\boxcircle}$ +\item \Verb[commandchars=-\[\]]+\lsubscript{-Choice}{-Boxbox}+ + +Output: $\lsubscript{\choice}{\boxbox}$ +\item \Verb[commandchars=-\[\]]+\lsuperscript{-Choice}{-Boxbox}+ + +Output: $\lsuperscript{\choice}{\boxbox}$ +\item \Verb[commandchars=-\[\]]+\rsubscript{-Choice}{-Boxbox}+ + +Output: $\rsubscript{\choice}{\boxbox}$ +\item \Verb[commandchars=-\[\]]+\rsuperscript{-Choice}{-Boxbox}+ + +Output: $\rsuperscript{\choice}{\boxbox}$ +\end{itemize} + +\artsubsection{Larger skips} + +\largerSkips + +The following commands use larger lengths, as defined in \ref{lengths}: this is achieved by running the command \Verb+\largerSkips+. This is needed when we want to apply subscripts or superscripts to something larger than \Choice, such as {\renewcommand{\choice}{expression} \Choice. + + +\begin{itemize} +\item \Verb[commandchars=-\[\]]+\fourscripts{-Choice}{-Boxast}{-Boxbox}{-Boxcircle}{-Boxbslash}+ + +Output: $\fourscripts{\choice}{\boxast}{\boxbox}{\boxcircle}{\boxbslash}$ +\item \Verb[commandchars=-\[\]]+\lrsubscripts{-Choice}{-Boxbox}{-Boxcircle}+ + +Output: $\lrsubscripts{\choice}{\boxbox}{\boxcircle}$ +\item \Verb[commandchars=-\[\]]+\lrsuperscripts{-Choice}{-Boxbox}{-Boxcircle}+ + +Output: $\lrsuperscripts{\choice}{\boxbox}{\boxcircle}$ +\item \Verb[commandchars=-\[\]]+\twolscripts{-Choice}{-Boxbox}{-Boxcircle}+ + +Output: $\twolscripts{\choice}{\boxbox}{\boxcircle}$ +\item \Verb[commandchars=-\[\]]+\tworscripts{-Choice}{-Boxbox}{-Boxcircle}+ + +Output: $\tworscripts{\choice}{\boxbox}{\boxcircle}$ +\item \Verb[commandchars=-\[\]]+\lsubscript{-Choice}{-Boxbox}+ + +Output: $\lsubscript{\choice}{\boxbox}$ +\item \Verb[commandchars=-\[\]]+\lsuperscript{-Choice}{-Boxbox}+ + +Output: $\lsuperscript{\choice}{\boxbox}$ +\item \Verb[commandchars=-\[\]]+\rsubscript{-Choice}{-Boxbox}+ + +Output: $\rsubscript{\choice}{\boxbox}$ +\item \Verb[commandchars=-\[\]]+\rsuperscript{-Choice}{-Boxbox}+ + +Output: $\rsuperscript{\choice}{\boxbox}$ +\end{itemize}} + +\artsubsection{Changing the default lengths} +The following commands can be used to change the default skips between subscripts and/or superscripts and \Choice: +\begin{itemize} +\item\Verb[commandchars=-\[\]]+\setSingleLSkip{-Elll}+ changes the value of \Verb+\singleleftscriptskip+ to \Elll: this affects the skip in all the commands putting a subscript and/or a superscript on the left side of \Choice; +\item\Verb[commandchars=-\[\]]+\setSingleRSkip{-Ellr}+ changes the value of \Verb+\singlerightscriptskip+ to \Ellr: this affects the skip in all the commands putting a subscript and/or a superscript on the right side of \Choice; +\item\Verb[commandchars=-\[\]]+\setDblLSkip{-Elll}+ changes the value of \Verb+\dblleftscriptskip+ to \Elll: this affects the left skip in all the commands putting a subscript and/or a superscript on both sides of \Choice; +\item\Verb[commandchars=-\[\]]+\setDblRSkip{-Ellr}+ changes the value of \Verb+\dblrightscriptskip+ to \Ellr: this affects the right skip in all the commands putting a subscript and/or a superscript on both sides of \Choice. +\end{itemize} + +\artsubsection{Custom lengths} +If you want to define the left and right skip on the sides of \Choice\ each time you write a command, you have the following options ($\ell_I$ is 2ex in these examples): + +\begin{itemize} +\item \Verb[commandchars=-\[\]]+\fourscriptsC{-Choice}{-Boxast}{-Boxbox}{-Boxcircle}{-Boxbslash}{-Elll}{-Ellr}+ + +Output: $\fourscriptsC{\choice}{\boxast}{\boxbox}{\boxcircle}{\boxbslash}{2ex}{2ex}$ +\item \Verb[commandchars=-\[\]]+\lrsubscriptsC{-Choice}{-Boxbox}{-Boxcircle}{-Elll}{-Ellr}+ + +Output: $\lrsubscriptsC{\choice}{\boxbox}{\boxcircle}{2ex}{2ex}$ +\item \Verb[commandchars=-\[\]]+\lrsuperscriptsC{-Choice}{-Boxbox}{-Boxcircle}{-Elll}{-Ellr}+ + +Output: $\lrsuperscriptsC{\choice}{\boxbox}{\boxcircle}{2ex}{2ex}$ +\item \Verb[commandchars=-\(\)]+\twolscripts[-Elll]{-Choice}{-Boxbox}{-Boxcircle}+ + +Output: $\twolscripts[2ex]{\choice}{\boxbox}{\boxcircle}$ +\item \Verb[commandchars=-\(\)]+\tworscripts[-Ellr]{-Choice}{-Boxbox}{-Boxcircle}+ + +Output: $\tworscripts[2ex]{\choice}{\boxbox}{\boxcircle}$ +\item \Verb[commandchars=-\(\)]+\lsubscript[-Elll]{-Choice}{-Boxbox}+ + +Output: $\lsubscript[2ex]{\choice}{\boxbox}$ +\item \Verb[commandchars=-\(\)]+\lsuperscript[-Elll]{-Choice}{-Boxbox}+ + +Output: $\lsuperscript[2ex]{\choice}{\boxbox}$ +\item \Verb[commandchars=-\(\)]+\rsubscript[-Ellr]{-Choice}{-Boxbox}+ + +Output: $\rsubscript[2ex]{\choice}{\boxbox}$ +\item \Verb[commandchars=-\(\)]+\rsuperscript[-Ellr]{-Choice}{-Boxbox}+ + +Output: $\rsuperscript[2ex]{\choice}{\boxbox}$ +\end{itemize} + + +\artsection{What does the package actually contains?} +You don't really need to read the following stuff to use the package, but have a look at it if you want to have an idea of how the package works without looking at the code. + +\artsubsection{Lengths definitions}\label{lengths} +This lenghts are used to define the default skips on the left and on the right side of $\choice$. +\begin{itemize} +\item\Verb+\singleleftscriptskip+: default -0.27ex, larger\footnote{This is obtained after invoking the \verb+\largerSkips+ command.} -0.16ex; +\item\Verb+\singlerightscriptskip+: default -0.18ex, larger -0.07ex; +\item\Verb+\dblleftscriptskip+: default -0.75ex, larger 0ex; +\item\Verb+\dblrightscriptskip+: default -0.645ex, larger 0ex. +\end{itemize} + +\artsubsection{Base commands} +The base commands are only three, all the rest is built on top of them: + +\begin{itemize} +\item\Verb+\newcommand{\fourscriptsC}[7]+ + +\hspace{4ex}\Verb+{{\null}^{#2}_{#3}\hspace{#6}#1\hspace{#7}{\null}^{#4}_{#5}}+ + +\item\Verb+\newcommand{\twolscripts}[4]+ + +\hspace{4ex}\Verb+[\singleleftscriptskip]{{\null}^{#3}_{#4}\hspace{#1}#2}+ + +\item\Verb+\newcommand{\tworscripts}[4]+ + +\hspace{4ex}\Verb+[\singlerightscriptskip]{#2\hspace{#1}{\null}^{#3}_{#4}}+ +\end{itemize} + +\artsection{Contacts} +As you can see this package boils down to just a few new command definitions, but it can help save some time --- I wrote it because I was not really satisfied of what I had found searching the web. + +\ppar +If you have comments or want to report any bug, please send a mail to \textsl{\href{mailto:subsupscripts@tex.nopkoguo.net}{subsupscripts@tex.nopkoguo.net}}. + +\end{document} diff --git a/Master/texmf-dist/tex/latex/subsupscripts/subsupscripts.sty b/Master/texmf-dist/tex/latex/subsupscripts/subsupscripts.sty new file mode 100644 index 00000000000..2fdea5cdf1d --- /dev/null +++ b/Master/texmf-dist/tex/latex/subsupscripts/subsupscripts.sty @@ -0,0 +1,30 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{subsupscripts}[2009/10/27 v1.0] + +% Default skips +\newcommand{\singleleftscriptskip}{-0.27ex} +\newcommand{\singlerightscriptskip}{-0.18ex} +\newcommand{\dblleftscriptskip}{-0.75ex} +\newcommand{\dblrightscriptskip}{-0.645ex} + +% Customize skips +\newcommand{\setSingleLSkip}[1]{\renewcommand{\singleleftscriptskip}{#1}} +\newcommand{\setSingleRSkip}[1]{\renewcommand{\singlerightscriptskip}{#1}} +\newcommand{\setDblLSkip}[1]{\renewcommand{\dblleftscriptskip}{#1}} +\newcommand{\setDblRSkip}[1]{\renewcommand{\dblrightscriptskip}{#1}} + +\newcommand{\largerSkips}{\setSingleLSkip{-0.16ex}\setSingleRSkip{-0.07ex}\setDblLSkip{0ex}\setDblRSkip{0ex}} + +% Scripts commands +\newcommand{\fourscriptsC}[7]{{\null}^{#2}_{#3}\hspace{#6}#1\hspace{#7}{\null}^{#4}_{#5}} +\newcommand{\lrsubscriptsC}[5]{\fourscriptsC{#1}{}{#2}{}{#3}{#4}{#5}} +\newcommand{\lrsuperscriptsC}[5]{\fourscriptsC{#1}{#2}{}{#3}{}{#4}{#5}} +\newcommand{\fourscripts}[5]{\fourscriptsC{#1}{#2}{#3}{#4}{#5}{\dblleftscriptskip}{\dblrightscriptskip}} +\newcommand{\lrsubscripts}[3]{\fourscripts{#1}{}{#2}{}{#3}} +\newcommand{\lrsuperscripts}[3]{\fourscripts{#1}{#2}{}{#3}{}} +\newcommand{\twolscripts}[4][\singleleftscriptskip]{{\null}^{#3}_{#4}\hspace{#1}#2} +\newcommand{\tworscripts}[4][\singlerightscriptskip]{#2\hspace{#1}{\null}^{#3}_{#4}} +\newcommand{\lsubscript}[3][\singleleftscriptskip]{\twolscripts[#1]{#2}{}{#3}} +\newcommand{\lsuperscript}[3][\singleleftscriptskip]{\twolscripts[#1]{#2}{#3}{}} +\newcommand{\rsubscript}[3][\singlerightscriptskip]{\tworscripts[#1]{#2}{}{#3}} +\newcommand{\rsuperscript}[3][\singlerightscriptskip]{\tworscripts[#1]{#2}{#3}{}} \ No newline at end of file diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 4d110cee3cb..2fbd93b19a2 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -237,7 +237,8 @@ my @WorkingTLP = qw( ssqquote stack stage statex2 staves stdclsdv stdpage steinmetz stellenbosch stex stringstrings struktex sttools stubs suanpan subdepth subeqn subeqnarray - subfig subfigure subfloat substr sudoku sudokubundle sugconf + subfig subfigure subfloat substr subsupscripts sudoku + sudokubundle sugconf supertabular susy svgcolor svn svn-multi svn-prov svninfo swebib syllogism syntax synproof syntrace synttree t-angles t2 Tabbing diff --git a/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc index 33644bf1722..f9fdca63117 100644 --- a/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-mathextra.tlpsrc @@ -24,6 +24,7 @@ depend shuffle depend statex2 depend stex depend stmaryrd +depend subsupscripts depend susy depend syllogism depend synproof diff --git a/Master/tlpkg/tlpsrc/subsupscripts.tlpsrc b/Master/tlpkg/tlpsrc/subsupscripts.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3