| 1 |
%% subtext.tex Look further down for brief description |
| 2 |
%% |
| 3 |
%% Copyright (C) 2019 Palle Jorgensen |
| 4 |
%% |
| 5 |
%% This program is free software: you can redistribute it and/or |
| 6 |
%% modify it under the terms of the GNU General Public License as |
| 7 |
%% published by the Free Software Foundation, either version 3 of the |
| 8 |
%% License, or (at your option) any later version. |
| 9 |
%% |
| 10 |
%% This program is distributed in the hope that it will be useful, but |
| 11 |
%% WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
%% General Public License for more details. |
| 14 |
%% |
| 15 |
%% You should have received a copy of the GNU General Public License |
| 16 |
%% along with this program. If not, see |
| 17 |
%% <https://www.gnu.org/licenses/>. |
| 18 |
\documentclass[a4paper,british,11pt,fleqn,parskip=half]{scrartcl} |
| 19 |
\usepackage[T1]{fontenc} % |
| 20 |
\usepackage[utf8]{inputenc} % |
| 21 |
\usepackage{babel} % |
| 22 |
\usepackage{tgpagella} % |
| 23 |
\usepackage[scaled]{luximono} % |
| 24 |
\usepackage{classico} % |
| 25 |
\usepackage{listings} % |
| 26 |
\usepackage[upright]{subtext} |
| 27 |
\author{Palle J\o rgensen} % |
| 28 |
\title{The \texttt{subtext} package} % |
| 29 |
\subtitle{Version 1.1} |
| 30 |
\lstset{language={[latex]{tex}}} |
| 31 |
\sloppy |
| 32 |
|
| 33 |
\begin{document} |
| 34 |
\maketitle |
| 35 |
|
| 36 |
\section{Usage} |
| 37 |
\label{sec:usage} |
| 38 |
|
| 39 |
\subsection{Loading the package} |
| 40 |
\label{sec:loading-package} |
| 41 |
|
| 42 |
To load the package type |
| 43 |
\begin{lstlisting} |
| 44 |
\usepackage{subtext} |
| 45 |
\end{lstlisting} |
| 46 |
into your preamble. |
| 47 |
|
| 48 |
\subsection{Using the package} |
| 49 |
\label{sec:using-package} |
| 50 |
|
| 51 |
In math mode use the \lstinline|_| character as usual to get the usual |
| 52 |
result. |
| 53 |
\begin{lstlisting} |
| 54 |
\begin{equation} |
| 55 |
\label{eq:1} |
| 56 |
a_{long text} |
| 57 |
\end{equation} |
| 58 |
\end{lstlisting} |
| 59 |
yielding |
| 60 |
\begin{equation} |
| 61 |
\label{eq:1} |
| 62 |
a_{long text} |
| 63 |
\end{equation} |
| 64 |
Replace curly braces with square brackets to get the subscript typeset |
| 65 |
using \texttt{amstext}'s \verb|\text| command. |
| 66 |
\begin{lstlisting} |
| 67 |
\begin{equation} |
| 68 |
\label{eq:2} |
| 69 |
a_[long text] |
| 70 |
\end{equation} |
| 71 |
\end{lstlisting} |
| 72 |
yielding |
| 73 |
\begin{equation} |
| 74 |
\label{eq:2} |
| 75 |
a_[long text] |
| 76 |
\end{equation} |
| 77 |
That's all! |
| 78 |
|
| 79 |
\subsection{Package options} |
| 80 |
\label{sec:package-options} |
| 81 |
|
| 82 |
Due to the behaviour of the \texttt{amstext} \verb|\text| command, the |
| 83 |
typeface of the text within the brackets is the same as the |
| 84 |
surrounding text. This may not always be desirable -- I myself often |
| 85 |
find it somewhat annoying. Thus there are two package options |
| 86 |
\begin{description} |
| 87 |
\setkomafont{descriptionlabel}{\ttfamily} |
| 88 |
\item[upright] Makes the text within the brackets be in upright shape. |
| 89 |
The font family (sans serif, serif or others) and the series (e.g. |
| 90 |
boldface) is the same as the surrounding text. This is the authors |
| 91 |
favourite. |
| 92 |
|
| 93 |
\item[normal] Makes the text within the brackets be in the documents |
| 94 |
\verb|\normalfont| style. |
| 95 |
\end{description} |
| 96 |
|
| 97 |
\section{License} |
| 98 |
|
| 99 |
The license of \texttt{subtext.sty} and related files is GNU GENERAL |
| 100 |
PUBLIC LICENSE. |
| 101 |
|
| 102 |
\subsection*{GNU GENERAL PUBLIC LICENSE} |
| 103 |
\label{sec:gnu-general-public} |
| 104 |
|
| 105 |
Version 3, 29 June 2007 |
| 106 |
|
| 107 |
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> |
| 108 |
Everyone is permitted to copy and distribute verbatim copies of this |
| 109 |
license document, but changing it is not allowed. |
| 110 |
<https://www.gnu.org/licenses/why-not-lgpl.html>. |
| 111 |
|
| 112 |
\emph{View COPYING for the full license.} |
| 113 |
|
| 114 |
|
| 115 |
\clearpage |
| 116 |
\section{Source of subtext.sty} |
| 117 |
\label{sec:source-subtext.sty} |
| 118 |
|
| 119 |
\lstinputlisting[firstline=19]{subtext.sty} |
| 120 |
|
| 121 |
\end{document} |
| 122 |
|
| 123 |
%%% Local Variables: |
| 124 |
%%% mode: latex |
| 125 |
%%% TeX-master: t |
| 126 |
%%% End: |