| 1 |
% Copyright 2020-21 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 |
| 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 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[math,nicefrac]{utf8add} % |
| 21 |
\usepackage{babel} % |
| 22 |
\usepackage[sc]{mathpazo} % |
| 23 |
\usepackage{tgpagella} % |
| 24 |
\usepackage{listings} % |
| 25 |
\usepackage[scaled]{luximono} % |
| 26 |
\usepackage{textcomp} % |
| 27 |
\usepackage{classico} % |
| 28 |
\linespread{1.045} % |
| 29 |
\usepackage[final]{microtype} % |
| 30 |
%\setcounter{secnumdepth}{1} % |
| 31 |
\author{Palle J\o rgensen} % |
| 32 |
\title{The \texttt{\jobname} package} % |
| 33 |
\subtitle{Additional support for UTF-8 encoded input} % |
| 34 |
\lstset{language=[latex]tex} |
| 35 |
\setkomafont{descriptionlabel}{\ttfamily\bfseries} |
| 36 |
|
| 37 |
\begin{document} |
| 38 |
\maketitle |
| 39 |
|
| 40 |
\section{Introduction} |
| 41 |
\label{sec:introduction} |
| 42 |
|
| 43 |
As I have discovered the easy access for special characters using the |
| 44 |
\emph{compose key} feature, I found out that some extra support for |
| 45 |
various UTF-8 characters was needed. Hence this package. |
| 46 |
|
| 47 |
The main purpose of this package is to make the text parts of \LaTeX\ |
| 48 |
document source more readable for non-\LaTeX\ users and to make more |
| 49 |
use of the possibilities with UTF-8 encoded input. |
| 50 |
|
| 51 |
One major issue with this package is that it does \emph{not} map input |
| 52 |
and output correct with respekt to the Unicode standards. However it |
| 53 |
makes some \emph{available} UTF-8 input provide some \emph{desired} |
| 54 |
outout. |
| 55 |
|
| 56 |
As the applied support for say the mathemathical greek letters of |
| 57 |
Unicode still is scarse this is more of a workaround than a decent, |
| 58 |
native support. |
| 59 |
|
| 60 |
The package is \emph{hack}-ish by nature. Thus the use of this |
| 61 |
package is somewhat (quite) incompatible with documents written in |
| 62 |
greek using e.g. the LGR input encoding. |
| 63 |
|
| 64 |
Thus puritans should not use this package. |
| 65 |
|
| 66 |
\section{Loading the package} |
| 67 |
\label{sec:loading-package} |
| 68 |
\begin{lstlisting} |
| 69 |
\usepackage{utf8add} |
| 70 |
\end{lstlisting} |
| 71 |
|
| 72 |
\subsection{The authors favourite} |
| 73 |
\label{sec:authors-favourite} |
| 74 |
|
| 75 |
\begin{lstlisting} |
| 76 |
\usepackage[math,nicefrac]{utf8add} |
| 77 |
\end{lstlisting} |
| 78 |
|
| 79 |
\subsection{Package options} |
| 80 |
\label{sec:package-options} |
| 81 |
|
| 82 |
\subsubsection{Greek characters} |
| 83 |
\label{sec:greek-characters-1} |
| 84 |
|
| 85 |
\begin{description} |
| 86 |
\item[greek] The greek option takes an argument. Otherwise it will not |
| 87 |
change anything. Possible arguments are |
| 88 |
\begin{description} |
| 89 |
\item[default] The greek characters entered are typeset as \LaTeX\ |
| 90 |
default. Uppercase greek characters upright, lowercase greek |
| 91 |
characters are in italics. |
| 92 |
\item[italic] Both the uppercase and the lowercase greek characters |
| 93 |
entered are typeset in italics. |
| 94 |
\item[upright] Both the uppercase and the lowercase greek characters |
| 95 |
entered are typeset in upright font. This is done using the |
| 96 |
\texttt{upgreek} package, and changes the font of the greek |
| 97 |
characters. Use with care. |
| 98 |
\end{description} |
| 99 |
\item[uppercasegreek] Same arguments as the `\texttt{greek}' option. |
| 100 |
However; don't use this. |
| 101 |
\item[lowercasegreek] The same story as for the |
| 102 |
`\texttt{uppercasegreek}' option. Don't use this either. |
| 103 |
\item[nogreek] disable the mapping of greek input. This is for |
| 104 |
compatibility with greek texts. |
| 105 |
|
| 106 |
\end{description} |
| 107 |
|
| 108 |
\subsubsection{Numbers and fractions} |
| 109 |
\label{sec:super-infer-numb} |
| 110 |
|
| 111 |
By default numbers and fractions are typeset using the built-in |
| 112 |
support. However not all figures are supported. Additional support |
| 113 |
using math commands is provided but not overruling the built-in |
| 114 |
support. This is the same case as for fractions. |
| 115 |
|
| 116 |
\begin{description} |
| 117 |
\item[mathsuperior] Typeset the all superior figures using math |
| 118 |
commands. |
| 119 |
\item[mathinferior] Typeset the all inferior figures using math |
| 120 |
commands. |
| 121 |
\item[mathfigures] Short cut for the two options above. |
| 122 |
\item[mathfractions] Typeset the all fractions figures using math |
| 123 |
commands. |
| 124 |
\item[math] Short cut for the options above. |
| 125 |
\item[nicefrac] Use the \texttt{nicefrac} to typeset fractions in text |
| 126 |
mode. View section~\ref{sec:fractions} for details. |
| 127 |
\end{description} |
| 128 |
|
| 129 |
\clearpage |
| 130 |
\section{Using the package} |
| 131 |
\label{sec:using-package} |
| 132 |
|
| 133 |
Using the package is simple. Load the package as specified above. Type |
| 134 |
your UTF-8 characters into your document. |
| 135 |
|
| 136 |
\subsection{Fractions} |
| 137 |
\label{sec:fractions} |
| 138 |
|
| 139 |
The default behaviour of the math support of the fractions is to |
| 140 |
typeset fractions in the default \LaTeX\ way, that is small fractions, |
| 141 |
$\tfrac12$, in text mode and larger fractions, $\dfrac12$, in display |
| 142 |
mode. The fractions are set with the math font in math mode and text |
| 143 |
font in text mode. |
| 144 |
|
| 145 |
Starring the fractions forces the fractions to be in text mode style. I |
| 146 |
find it useful in some cases such as |
| 147 |
\begin{equation} |
| 148 |
E_{\text{kin}} = ½*·m·v² |
| 149 |
\end{equation} |
| 150 |
|
| 151 |
Applying the `\texttt{nicefrac}' option makes the text mode fractions |
| 152 |
typeset `nice' i.e. ½. Starring these fractions make them default |
| 153 |
text mode style i.e. ½*. |
| 154 |
|
| 155 |
\section{Drawbacks} |
| 156 |
\label{sec:drawbacks} |
| 157 |
|
| 158 |
The support for UTF-8 is not complete. Look into the source for |
| 159 |
details. |
| 160 |
|
| 161 |
The support for the \texttt{verbatim} environment and other source |
| 162 |
displaying features is not that good. In fact it probably won't work. |
| 163 |
|
| 164 |
The imcompatibility with support for the greek language makes the use |
| 165 |
of this package less desirable for users writing in greek. |
| 166 |
|
| 167 |
\section{Copyright and license} |
| 168 |
\label{sec:copyright-license} |
| 169 |
|
| 170 |
The \texttt{\jobname} package and all the associated files are |
| 171 |
copyright © Palle Jørgensen, \ifnum\year=2020\relax 2020\else |
| 172 |
2020-\the\year\fi. |
| 173 |
|
| 174 |
\texttt{utf8add} is free software: you can redistribute it and/or |
| 175 |
modify it under the terms of the GNU General Public License as |
| 176 |
published by the Free Software Foundation, either version 3 of the |
| 177 |
License, or (at your option) any later version. |
| 178 |
|
| 179 |
\texttt{utf8add} is distributed in the hope that it will be useful, |
| 180 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 181 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 182 |
General Public License for more details. |
| 183 |
|
| 184 |
You should have received a copy of the GNU General Public License |
| 185 |
along with \texttt{utf8add}. If not, see |
| 186 |
<https://www.gnu.org/licenses/>. |
| 187 |
|
| 188 |
|
| 189 |
\end{document} |
| 190 |
|
| 191 |
%%% Local Variables: |
| 192 |
%%% mode: latex |
| 193 |
%%% TeX-master: t |
| 194 |
%%% End: |