summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/utf8add/utf8add.tex
blob: 2521455308d65ce6bd7513d0ef377ec0d00159cf (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
169
170
171
% 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[math,nicefrac]{utf8add} %
\usepackage{babel} %
\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{Additional support for UTF-8 encoded input} %
\lstset{language=[latex]tex}
\setkomafont{descriptionlabel}{\ttfamily\bfseries}

\begin{document}
\maketitle

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

As I have discovered the easy access for special characters using the
\emph{compose key} feature, I found out that some extra support for
various UTF-8 characters was needed. Hence this package.

The main purpose of this package is to make the text parts of \LaTeX\
document source more readable for non-\LaTeX\ users and to make more
use of the possibilities with UTF-8 encoded input.

\section{Loading the package}
\label{sec:loading-package}
\begin{lstlisting}
\usepackage{utf8add}
\end{lstlisting}

\subsection{The authors favourite}
\label{sec:authors-favourite}

\begin{lstlisting}
\usepackage[math,nicefrac]{utf8add}
\end{lstlisting}

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

\subsubsection{Greek characters}
\label{sec:greek-characters-1}

\begin{description}
\item[greek] The greek option takes an argument. Otherwise it will not
  change anything. Possible arguments are
  \begin{description}
  \item[default] The greek characters entered are typeset as \LaTeX\
    default. Uppercase greek characters upright, lowercase greek
    characters are in italics.
  \item[italic] Both the uppercase and the lowercase greek characters
    entered are typeset in italics.
  \item[upright] Both the uppercase and the lowercase greek characters
    entered are typeset in upright font. This is done using the
    \texttt{upgreek} package, and changes the font of the greek
    characters. Use with care.
  \end{description}
\item[uppercasegreek] Same arguments as the `\texttt{greek}' option.
  However; don't use this.
\item[lowercasegreek] The same story as for the
  `\texttt{uppercasegreek}' option. Don't use this either.

\end{description}

\subsubsection{Numbers and fractions}
\label{sec:super-infer-numb}

By default numbers and fractions are typeset using the built-in
support. However not all figures are supported. Additional support
using math commands is provided but not overruling the built-in
support. This is the same case as for fractions.

\begin{description}
\item[mathsuperior] Typeset the all superior figures using math
  commands.
\item[mathinferior] Typeset the all inferior figures using math
  commands.
\item[mathfigures] Short cut for the two options above.
\item[mathfractions] Typeset the all fractions figures using math
  commands.
\item[math] Short cut for the options above.
\item[nicefrac] Use the \texttt{nicefrac} to typeset fractions in text
  mode. View section~\ref{sec:fractions} for details.
\end{description}

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

Using the package is simple. Load the package as specified above. Type
your UTF-8 characters into your document.

\subsection{Fractions}
\label{sec:fractions}

The default behaviour of the math support of the fractions is to
typeset fractions in the default \LaTeX\ way, that is small fractions,
$\tfrac12$, in text mode and larger fractions, $\dfrac12$, in display
mode.

Starring the fractions forces the fractions to be in text mode style. I
find it useful in some cases such as
\begin{equation}
  E_{\text{kin}} = ½*·m·v²
\end{equation}

Applying the `\texttt{nicefrac}' option makes the text mode fractions
typeset `nice' i.e. ½. Starring these fractions make them default
text mode style i.e. ½*.

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

The support for UTF-8 is not complete. Look into the source for
details.

The support for the \texttt{verbatim} environment and other source
displaying features is not that good. In fact it probably won't work.

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

The \texttt{\jobname} 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: