Debian Codegraph @

texmf-dist/doc/latex/utf8add/utf8hax.tex

raw
1 % Copyright 2020 Palle Jorgensen, [email protected]
2 %
3 % This file is part of utf8add.
4 %
5 % utf8add is free software: you can redistribute it and/or modify it
6 % under the terms of the GNU General Public License as published by
7 % the Free Software Foundation, either version 3 of the License, or
8 % (at your option) any later version.
9 %
10 % utf8add is distributed in the hope that it will be useful, but WITHOUT
11 % ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 % or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13 % License for more details.
14 %
15 % You should have received a copy of the GNU General Public License
16 % along with utf8add. If not, see <https://www.gnu.org/licenses/>.
17 \documentclass[a4paper,british,parskip=half,11pt,fleqn]{scrartcl}
18 \usepackage[T1]{fontenc} %
19 \usepackage[utf8]{inputenc} %
20 \usepackage{babel} %
21 \usepackage[sc]{mathpazo} %
22 \usepackage{tgpagella} %
23 \usepackage{listings} %
24 \usepackage[scaled]{luximono} %
25 \usepackage{textcomp} %
26 \usepackage{classico} %
27 \linespread{1.045} %
28 \usepackage[final]{microtype} %
29 %\setcounter{secnumdepth}{1} %
30 \author{Palle J\o rgensen} %
31 \title{The \texttt{\jobname} package} %
32 \subtitle{Using UTF-8 encoded input as short cuts} %
33 \lstset{language=[latex]tex}
34 \setkomafont{descriptionlabel}{\ttfamily\bfseries}
35 \let\oldquote\quote
36 \def\quote{\leftmargini0pt\oldquote\slshape}
37
38 \begin{document}
39 \maketitle
40
41 \section{Introduction}
42 \label{sec:introduction}
43
44 The purpose of this package is to provide som short cuts for typing
45 math in \LaTeX. It is \emph{not} intended for increasing readability.
46
47 \section{Loading the package}
48 \label{sec:loading-package}
49
50 \begin{lstlisting}
51 \usepackage[default]{utf8hax}
52 \end{lstlisting}
53
54 \subsection{Package options}
55 \label{sec:package-options}
56
57 \begin{description}
58 \item[autochar] Choosing the character for the math automatation. It
59 must be the hex code for the desired character.
60 \item[mathchar] Choosing the character for math mode. It must be the
61 hex code for the desired character.
62 \item[currmath] Setting `\verb|¤|' as the math character.
63 \item[yenmath] Setting `\verb|¥|' as the math character.
64 \item[sterlingmath] Setting `\verb|£|' as the math character.
65 \item[copyauto] Setting `\verb|©|' at the math automatation character.
66 \item[regauto] Setting `\verb|®|' at the math automatation character.
67 \item[default] Short cut for the \verb|copyauto| and \verb|currmath|
68 option. The authors favourite.
69 \end{description}
70
71 \section{Using the package}
72 \label{sec:using-package}
73
74 \subsection{Math character}
75 \label{sec:math-character}
76
77 Typing
78 \begin{verbatim}
79 The slope of the line is designated ¤a.
80 \end{verbatim}
81 equals
82 \begin{verbatim}
83 The slope of the line is designated \ensuremath{a}.
84 \end{verbatim}
85 yielding
86 \begin{quote}
87 The slope of the line is designated \ensuremath{a}.
88 \end{quote}
89
90 \subsection{Math automatation character}
91 \label{sec:math-autom-char}
92
93 Typing
94 \begin{verbatim}
95 The slope of the line is designated ©a.
96 \end{verbatim}
97 automates into
98 \begin{verbatim}
99 The slope of the line is designated \@automath@a.
100 \end{verbatim}
101 The command `\verb|\@automath@a|' is programmed into being equal to `\verb|\ensuremath{\alpha}|'.
102
103 Thus the input is equal to
104 \begin{verbatim}
105 The slope of the line is designated \ensuremath{\alpha}.
106 \end{verbatim}
107 yielding
108 \begin{quote}
109 The slope of the line is designated \ensuremath{\alpha}.
110 \end{quote}
111
112 \subsection{New math automatation}
113 \label{sec:new-math-shortcuts}
114
115 New math automatation is accessible through the
116 `\verb|\newmathautomatation|' command. Typing
117 \begin{verbatim}
118 \newmathautomatation{?}{What?}
119 \end{verbatim}
120 makes the input sequence `\verb|©?|' equal to
121 \begin{verbatim}
122 \ensuremath{What?}
123 \end{verbatim}
124 yielding
125 \begin{quote}
126 \ensuremath{What?}
127 \end{quote}
128
129 \section{Drawbacks}
130 \label{sec:drawbacks}
131
132 As some input characters are changed the access to these characters is
133 made more difficult.
134
135 The copyright symbol is accessible through `\verb|©!|'. As i do not
136 know anybody using the \emph{generic currency symbol} in real life it
137 is not made as easily accessible.
138
139 \section{Copyright and license}
140 \label{sec:copyright-license}
141
142 This file \texttt{\jobname} is part of the \texttt{utf8add} bundle.
143
144 The \texttt{utf8add} package and all the associated files are
145 copyright © Palle Jørgensen, \ifnum\year=2020\relax 2020\else
146 2020-\the\year\fi.
147
148 \texttt{utf8add} is free software: you can redistribute it and/or
149 modify it under the terms of the GNU General Public License as
150 published by the Free Software Foundation, either version 3 of the
151 License, or (at your option) any later version.
152
153 \texttt{utf8add} is distributed in the hope that it will be useful,
154 but WITHOUT ANY WARRANTY; without even the implied warranty of
155 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
156 General Public License for more details.
157
158 You should have received a copy of the GNU General Public License
159 along with \texttt{utf8add}. If not, see
160 <https://www.gnu.org/licenses/>.
161
162
163 \end{document}
164
165 %%% Local Variables:
166 %%% mode: latex
167 %%% TeX-master: t
168 %%% End: