From b9d12717f53791c167188b582d06b829d8e64030 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 30 May 2019 20:57:40 +0000 Subject: subtext (30may19) git-svn-id: svn://tug.org/texlive/trunk@51273 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/subtext/subtext.pdf | Bin 41658 -> 37763 bytes Master/texmf-dist/doc/latex/subtext/subtext.tex | 37 +++++++++++++++++++----- Master/texmf-dist/tex/latex/subtext/subtext.sty | 11 +++++-- 3 files changed, 37 insertions(+), 11 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/subtext/subtext.pdf b/Master/texmf-dist/doc/latex/subtext/subtext.pdf index 1e18ce55f69..78998b86323 100644 Binary files a/Master/texmf-dist/doc/latex/subtext/subtext.pdf and b/Master/texmf-dist/doc/latex/subtext/subtext.pdf differ diff --git a/Master/texmf-dist/doc/latex/subtext/subtext.tex b/Master/texmf-dist/doc/latex/subtext/subtext.tex index 96a29b47d9b..9afc43e0c05 100644 --- a/Master/texmf-dist/doc/latex/subtext/subtext.tex +++ b/Master/texmf-dist/doc/latex/subtext/subtext.tex @@ -15,7 +15,7 @@ %% You should have received a copy of the GNU General Public License %% along with this program. If not, see %% . -\documentclass[a4paper,british,11pt,fleqn]{scrartcl} +\documentclass[a4paper,british,11pt,fleqn,parskip=half]{scrartcl} \usepackage[T1]{fontenc} % \usepackage[utf8]{inputenc} % \usepackage{babel} % @@ -23,10 +23,12 @@ \usepackage[scaled]{luximono} % \usepackage{classico} % \usepackage{listings} % -\usepackage{subtext} +\usepackage[upright]{subtext} \author{Palle J\o rgensen} % \title{The \texttt{subtext} package} % +\subtitle{Version 1.1} \lstset{language={[latex]{tex}}} +\sloppy \begin{document} \maketitle @@ -60,7 +62,7 @@ yielding a_{long text} \end{equation} Replace curly braces with square brackets to get the subscript typeset -using \texttt{amstext}'s \lstinline|\text| command. +using \texttt{amstext}'s \verb|\text| command. \begin{lstlisting} \begin{equation} \label{eq:2} @@ -73,13 +75,25 @@ yielding a_[long text] \end{equation} That's all! -\clearpage -\section{Source of subtext.sty} -\label{sec:source-subtext.sty} -\lstinputlisting{subtext.sty} +\subsection{Package options} +\label{sec:package-options} + +Due to the behaviour of the \texttt{amstext} \verb|\text| command, the +typeface of the text within the brackets is the same as the +surrounding text. This may not always be desirable -- I myself often +find it somewhat annoying. Thus there are two package options +\begin{description} +\setkomafont{descriptionlabel}{\ttfamily} +\item[upright] Makes the text within the brackets be in upright shape. + The font family (sans serif, serif or others) and the series (e.g. + boldface) is the same as the surrounding text. This is the authors + favourite. + +\item[normal] Makes the text within the brackets be in the documents + \verb|\normalfont| style. +\end{description} -\clearpage \section{License} The license of \texttt{subtext.sty} and related files is GNU GENERAL @@ -97,6 +111,13 @@ license document, but changing it is not allowed. \emph{View COPYING for the full license.} + +\clearpage +\section{Source of subtext.sty} +\label{sec:source-subtext.sty} + +\lstinputlisting[firstline=19]{subtext.sty} + \end{document} %%% Local Variables: diff --git a/Master/texmf-dist/tex/latex/subtext/subtext.sty b/Master/texmf-dist/tex/latex/subtext/subtext.sty index 3c07899bf74..93920cc94a6 100644 --- a/Master/texmf-dist/tex/latex/subtext/subtext.sty +++ b/Master/texmf-dist/tex/latex/subtext/subtext.sty @@ -16,19 +16,24 @@ %% along with this program. If not, see %% . -\ProvidesPackage{subtext}[2019/05/24 v. 1.0 LaTeX package for easy +\ProvidesPackage{subtext}[2019/05/30 v. 1.1 LaTeX package for easy text-style subscripts in math mode.] \RequirePackage{amstext} +\def\subtext@font{} +\DeclareOption{upright}{\def\subtext@font{\upshape}} +\DeclareOption{normal}{\def\subtext@font{\normalfont}} +\ProcessOptions* \let\saved@sub_ \catcode`_\active -\def\new@sub@text[#1]{\saved@sub{\text{#1}}} +\def\new@sub@text[#1]{\saved@sub{\text{\subtext@font #1}}} \def\new@sub@other#1{\saved@sub{#1}} \def\new@sub{% \@ifnextchar[%] {\new@sub@text}{\new@sub@other}} -\def_{\new@sub} +\protected\def_{\new@sub} + \endinput \ No newline at end of file -- cgit v1.2.3