summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/subtext/subtext.tex
blob: 9afc43e0c05a42890d44f44337a3e8c9cea98c79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
%% 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
%% <https://www.gnu.org/licenses/>.
\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. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
<https://www.gnu.org/licenses/why-not-lgpl.html>.

\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: