%% subtext.tex Look further down for brief description %% %% Copyright (C) 2019 Palle Jorgensen %% %% This program is free software: you can redistribute it and/or %% modify it under the terms of the GNU General Public License as %% published by the Free Software Foundation, either version 3 of the %% License, or (at your option) any later version. %% %% This program is distributed in the hope that it will be useful, but %% WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU %% General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with this program. If not, see %% . \documentclass[a4paper,british,11pt,fleqn,parskip=half]{scrartcl} \usepackage[T1]{fontenc} % \usepackage[utf8]{inputenc} % \usepackage{babel} % \usepackage{tgpagella} % \usepackage[scaled]{luximono} % \usepackage{classico} % \usepackage{listings} % \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 \section{Usage} \label{sec:usage} \subsection{Loading the package} \label{sec:loading-package} To load the package type \begin{lstlisting} \usepackage{subtext} \end{lstlisting} into your preamble. \subsection{Using the package} \label{sec:using-package} In math mode use the \lstinline|_| character as usual to get the usual result. \begin{lstlisting} \begin{equation} \label{eq:1} a_{long text} \end{equation} \end{lstlisting} yielding \begin{equation} \label{eq:1} a_{long text} \end{equation} Replace curly braces with square brackets to get the subscript typeset using \texttt{amstext}'s \verb|\text| command. \begin{lstlisting} \begin{equation} \label{eq:2} a_[long text] \end{equation} \end{lstlisting} yielding \begin{equation} \label{eq:2} a_[long text] \end{equation} That's all! \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} \section{License} The license of \texttt{subtext.sty} and related files is GNU GENERAL PUBLIC LICENSE. \subsection*{GNU GENERAL PUBLIC LICENSE} \label{sec:gnu-general-public} Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this 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: %%% mode: latex %%% TeX-master: t %%% End: