% 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 . \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 . \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: