texlive[51273] Master/texmf-dist: subtext (30may19)

commits+karl at tug.org commits+karl at tug.org
Thu May 30 22:57:40 CEST 2019


Revision: 51273
          http://tug.org/svn/texlive?view=revision&revision=51273
Author:   karl
Date:     2019-05-30 22:57:40 +0200 (Thu, 30 May 2019)
Log Message:
-----------
subtext (30may19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/subtext/subtext.pdf
    trunk/Master/texmf-dist/doc/latex/subtext/subtext.tex
    trunk/Master/texmf-dist/tex/latex/subtext/subtext.sty

Modified: trunk/Master/texmf-dist/doc/latex/subtext/subtext.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/subtext/subtext.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/subtext/subtext.tex	2019-05-30 20:57:27 UTC (rev 51272)
+++ trunk/Master/texmf-dist/doc/latex/subtext/subtext.tex	2019-05-30 20:57:40 UTC (rev 51273)
@@ -15,7 +15,7 @@
 %% You should have received a copy of the GNU General Public License
 %% along with this program. If not, see
 %% <https://www.gnu.org/licenses/>.
-\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 @@
   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 @@
   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}
 
-\clearpage
+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}
+
 \section{License}
 
 The license of \texttt{subtext.sty} and related files is GNU GENERAL
@@ -97,6 +111,13 @@
 
 \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:

Modified: trunk/Master/texmf-dist/tex/latex/subtext/subtext.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/subtext/subtext.sty	2019-05-30 20:57:27 UTC (rev 51272)
+++ trunk/Master/texmf-dist/tex/latex/subtext/subtext.sty	2019-05-30 20:57:40 UTC (rev 51273)
@@ -16,19 +16,24 @@
 %% along with this program. If not, see
 %% <https://www.gnu.org/licenses/>.
     
-\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 at font{}
+\DeclareOption{upright}{\def\subtext at font{\upshape}}
+\DeclareOption{normal}{\def\subtext at font{\normalfont}}
+\ProcessOptions*
 
 \let\saved at sub_
 \catcode`_\active
-\def\new at sub@text[#1]{\saved at sub{\text{#1}}}
+\def\new at sub@text[#1]{\saved at sub{\text{\subtext at font #1}}}
 \def\new at sub@other#1{\saved at sub{#1}}
 
 \def\new at sub{%
   \@ifnextchar[%]
   {\new at sub@text}{\new at sub@other}}
-\def_{\new at sub}
+\protected\def_{\new at sub}
 
+
 \endinput
\ No newline at end of file



More information about the tex-live-commits mailing list