summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/utf8add/utf8hax.tex
blob: 2cb48e52ce6f51397d666908fcc34650577c055c (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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
% Copyright 2020 Palle Jorgensen, hamselv@pallej.dk
%
% This file is part of utf8add.
%
% utf8add 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.
%
% utf8add 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 utf8add. If not, see <https://www.gnu.org/licenses/>.
\documentclass[a4paper,british,parskip=half,11pt,fleqn]{scrartcl}
\usepackage[T1]{fontenc} %
\usepackage[utf8]{inputenc} %
\usepackage{babel} %
\usepackage[sc]{mathpazo} %
\usepackage{tgpagella} %
\usepackage{listings} %
\usepackage[scaled]{luximono} %
\usepackage{textcomp} %
\usepackage{classico} %
\linespread{1.045} %
\usepackage[final]{microtype} %
%\setcounter{secnumdepth}{1} %
\author{Palle J\o rgensen} %
\title{The \texttt{\jobname} package} %
\subtitle{Using UTF-8 encoded input as short cuts} %
\lstset{language=[latex]tex}
\setkomafont{descriptionlabel}{\ttfamily\bfseries}
\let\oldquote\quote
\def\quote{\leftmargini0pt\oldquote\slshape}

\begin{document}
\maketitle

\section{Introduction}
\label{sec:introduction}

The purpose of this package is to provide som short cuts for typing
math in \LaTeX. It is \emph{not} intended for increasing readability.

\section{Loading the package}
\label{sec:loading-package}

\begin{lstlisting}
\usepackage[default]{utf8hax}
\end{lstlisting}

\subsection{Package options}
\label{sec:package-options}

\begin{description}
\item[autochar] Choosing the character for the math automatation. It
  must be the hex code for the desired character.
\item[mathchar] Choosing the character for math mode. It must be the
  hex code for the desired character.
\item[currmath] Setting `\verb|¤|' as the math character.
\item[yenmath]  Setting `\verb|¥|' as the math character.
\item[sterlingmath] Setting `\verb|£|' as the math character.
\item[copyauto] Setting `\verb|©|' at the math automatation character.
\item[regauto] Setting `\verb|®|' at the math automatation character.
\item[default] Short cut for the \verb|copyauto| and \verb|currmath|
  option. The authors favourite.
\end{description}

\section{Using the package}
\label{sec:using-package}

\subsection{Math character}
\label{sec:math-character}

Typing 
\begin{verbatim}
The slope of the line is designated ¤a.
\end{verbatim}
equals
\begin{verbatim}
The slope of the line is designated \ensuremath{a}.
\end{verbatim}
yielding
\begin{quote}
  The slope of the line is designated \ensuremath{a}.
\end{quote}

\subsection{Math automatation character}
\label{sec:math-autom-char}

Typing 
\begin{verbatim}
The slope of the line is designated ©a.
\end{verbatim}
automates into
\begin{verbatim}
The slope of the line is designated \@automath@a.
\end{verbatim}
The command `\verb|\@automath@a|' is programmed into being equal to `\verb|\ensuremath{\alpha}|'.

Thus the input is equal to
\begin{verbatim}
The slope of the line is designated \ensuremath{\alpha}.
\end{verbatim}
yielding
\begin{quote}
The slope of the line is designated \ensuremath{\alpha}.
\end{quote}

\subsection{New math automatation}
\label{sec:new-math-shortcuts}

New math automatation is accessible through the
`\verb|\newmathautomatation|' command. Typing
\begin{verbatim}
\newmathautomatation{?}{What?}
\end{verbatim}
makes the input sequence `\verb|©?|' equal to
\begin{verbatim}
\ensuremath{What?}
\end{verbatim}
yielding
\begin{quote}
\ensuremath{What?}
\end{quote}

\section{Drawbacks}
\label{sec:drawbacks}

As some input characters are changed the access to these characters is
made more difficult.

The copyright symbol is accessible through `\verb|©!|'. As i do not
know anybody using the \emph{generic currency symbol} in real life it
is not made as easily accessible.

\section{Copyright and license}
\label{sec:copyright-license}

This file \texttt{\jobname} is part of the \texttt{utf8add} bundle.

The \texttt{utf8add} package and all the associated files are
copyright © Palle Jørgensen, \ifnum\year=2020\relax 2020\else
2020-\the\year\fi.

\texttt{utf8add} 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.

\texttt{utf8add} 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 \texttt{utf8add}. If not, see
<https://www.gnu.org/licenses/>.


\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: