% Copyright 2020-21 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 .
\documentclass[a4paper,british,parskip=half,11pt,fleqn]{scrartcl}
\usepackage[T1]{fontenc} %
\usepackage[utf8]{inputenc} %
\usepackage[math,nicefrac]{utf8add} %
\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{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.
One major issue with this package is that it does \emph{not} map input
and output correct with respekt to the Unicode standards. However it
makes some \emph{available} UTF-8 input provide some \emph{desired}
outout.
As the applied support for say the mathemathical greek letters of
Unicode still is scarse this is more of a workaround than a decent,
native support.
The package is \emph{hack}-ish by nature. Thus the use of this
package is somewhat (quite) incompatible with documents written in
greek using e.g. the LGR input encoding.
Thus puritans should not use this package.
\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.
\item[nogreek] disable the mapping of greek input. This is for
compatibility with greek texts.
\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}
\clearpage
\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. The fractions are set with the math font in math mode and text
font in text 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.
The imcompatibility with support for the greek language makes the use
of this package less desirable for users writing in greek.
\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
.
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: