texlive[61074] Master/texmf-dist: utf8add (16nov21)

commits+karl at tug.org commits+karl at tug.org
Tue Nov 16 22:24:17 CET 2021


Revision: 61074
          http://tug.org/svn/texlive?view=revision&revision=61074
Author:   karl
Date:     2021-11-16 22:24:17 +0100 (Tue, 16 Nov 2021)
Log Message:
-----------
utf8add (16nov21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/utf8add/utf8add.pdf
    trunk/Master/texmf-dist/doc/latex/utf8add/utf8add.tex
    trunk/Master/texmf-dist/doc/latex/utf8add/utf8hax.pdf
    trunk/Master/texmf-dist/tex/latex/utf8add/utf8add.sty

Modified: trunk/Master/texmf-dist/doc/latex/utf8add/utf8add.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/utf8add/utf8add.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/utf8add/utf8add.tex	2021-11-16 21:23:34 UTC (rev 61073)
+++ trunk/Master/texmf-dist/doc/latex/utf8add/utf8add.tex	2021-11-16 21:24:17 UTC (rev 61074)
@@ -1,4 +1,4 @@
-% Copyright 2020 Palle Jorgensen, hamselv at pallej.dk
+% Copyright 2020-21 Palle Jorgensen, hamselv at pallej.dk
 %
 % This file is part of utf8add.
 %
@@ -19,6 +19,7 @@
 \usepackage[utf8]{inputenc} %
 \usepackage[math,nicefrac]{utf8add} %
 \usepackage{babel} %
+\usepackage[sc]{mathpazo} %
 \usepackage{tgpagella} %
 \usepackage{listings} %
 \usepackage[scaled]{luximono} %
@@ -47,6 +48,21 @@
 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}
@@ -84,6 +100,8 @@
   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}
 
@@ -108,6 +126,7 @@
   mode. View section~\ref{sec:fractions} for details.
 \end{description}
 
+\clearpage
 \section{Using the package}
 \label{sec:using-package}
 
@@ -120,7 +139,8 @@
 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.
+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
@@ -141,6 +161,9 @@
 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}
 

Modified: trunk/Master/texmf-dist/doc/latex/utf8add/utf8hax.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/latex/utf8add/utf8add.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/utf8add/utf8add.sty	2021-11-16 21:23:34 UTC (rev 61073)
+++ trunk/Master/texmf-dist/tex/latex/utf8add/utf8add.sty	2021-11-16 21:24:17 UTC (rev 61074)
@@ -1,4 +1,4 @@
-% Copyright 2020 Palle Jorgensen, hamselv at pallej.dk
+% Copyright 2020-21 Palle Jorgensen, hamselv at pallej.dk
 %
 % This file is part of utf8add.
 %
@@ -14,7 +14,7 @@
 %
 % You should have received a copy of the GNU General Public License
 % along with utf8add. If not, see <https://www.gnu.org/licenses/>.
-\ProvidesPackage{utf8add}[2020/05/26 Palle Jorgensen]
+\ProvidesPackage{utf8add}[2021/11/16 Palle Jorgensen]
 
 %% Package dependencies
 \RequirePackage[utf8]{inputenc}
@@ -24,13 +24,18 @@
 \RequirePackage{gensymb}
 \RequirePackage{nicefrac}
 
+\newif\if at greek@
+\@greek at true
+
 %% Options
+%% Disable greek overall?
+\DeclareOptionX{nogreek}{\@greek at false}
+
 %% Choosing the uppercase greek style :-/
 \newif\if at uppercasegreek@default@
 \newif\if at uppercasegreek@upright@
 \newif\if at uppercasegreek@italic@
 \@uppercasegreek at default@true
-
 \DeclareOptionX{uppercasegreek}[default]{%
   \csname @uppercasegreek@#1 at true\endcsname}
 
@@ -105,70 +110,75 @@
   \providecommand*\Upzeta{\mathrm{Z}}
 }
 
+\def\auto at superior#1{\ifmmode^{#1}\else\textsuperscript{#1}\fi}
+\def\auto at inferior#1{\ifmmode^{#1}\else\textsubcript{#1}\fi}
 \if at math@superior@
 \AtBeginDocument{%
-  \def\textonesuperior{\ensuremath{^{1}}}
-  \def\texttwosuperior{\ensuremath{^{2}}}
-  \def\textthreesuperior{\ensuremath{^{3}}}
-  \def\textfoursuperior{\ensuremath{^{4}}}
-  \def\textfivesuperior{\ensuremath{^{5}}}
-  \def\textsixsuperior{\ensuremath{^{6}}}
-  \def\textsevensuperior{\ensuremath{^{7}}}
-  \def\texteightsuperior{\ensuremath{^{8}}}
-  \def\textninesuperior{\ensuremath{^{9}}}
-  \def\textzerosuperior{\ensuremath{^{0}}}
+  \def\textonesuperior{\auto at superior{1}}
+  \def\texttwosuperior{\auto at superior{2}}
+  \def\textthreesuperior{\auto at superior{3}}
+  \def\textfoursuperior{\auto at superior{4}}
+  \def\textfivesuperior{\auto at superior{5}}
+  \def\textsixsuperior{\auto at superior{6}}
+  \def\textsevensuperior{\auto at superior{7}}
+  \def\texteightsuperior{\auto at superior{8}}
+  \def\textninesuperior{\auto at superior{9}}
+  \def\textzerosuperior{\auto at superior{0}}
 }
 \else
 \AtBeginDocument{%
-  \providecommand*\textonesuperior{\ensuremath{^{1}}}
-  \providecommand*\texttwosuperior{\ensuremath{^{2}}}
-  \providecommand*\textthreesuperior{\ensuremath{^{3}}}
-  \providecommand*\textfoursuperior{\ensuremath{^{4}}}
-  \providecommand*\textfivesuperior{\ensuremath{^{5}}}
-  \providecommand*\textsixsuperior{\ensuremath{^{6}}}
-  \providecommand*\textsevensuperior{\ensuremath{^{7}}}
-  \providecommand*\texteightsuperior{\ensuremath{^{8}}}
-  \providecommand*\textninesuperior{\ensuremath{^{9}}}
-  \providecommand*\textzerosuperior{\ensuremath{^{0}}}}
+  \providecommand*\textonesuperior{\auto at superior{1}}
+  \providecommand*\texttwosuperior{\auto at superior{2}}
+  \providecommand*\textthreesuperior{\auto at superior{3}}
+  \providecommand*\textfoursuperior{\auto at superior{4}}
+  \providecommand*\textfivesuperior{\auto at superior{5}}
+  \providecommand*\textsixsuperior{\auto at superior{6}}
+  \providecommand*\textsevensuperior{\auto at superior{7}}
+  \providecommand*\texteightsuperior{\auto at superior{8}}
+  \providecommand*\textninesuperior{\auto at superior{9}}
+  \providecommand*\textzerosuperior{\auto at superior{0}}}
 \fi
 
 \if at math@inferior@
 \AtBeginDocument{%
-  \def\textoneinferior{\ensuremath{_{1}}}
-  \def\texttwoinferior{\ensuremath{_{2}}}
-  \def\textthreeinferior{\ensuremath{_{3}}}
-  \def\textfourinferior{\ensuremath{_{4}}}
-  \def\textfiveinferior{\ensuremath{_{5}}}
-  \def\textsixinferior{\ensuremath{_{6}}}
-  \def\textseveninferior{\ensuremath{_{7}}}
-  \def\texteightinferior{\ensuremath{_{8}}}
-  \def\textnineinferior{\ensuremath{_{9}}}
-  \def\textzeroinferior{\ensuremath{_{0}}}
-}
+  \def\textoneinferior{\auto at inferior{1}}
+  \def\texttwoinferior{\auto at inferior{2}}
+  \def\textthreeinferior{\auto at inferior{3}}
+  \def\textfourinferior{\auto at inferior{4}}
+  \def\textfiveinferior{\auto at inferior{5}}
+  \def\textsixinferior{\auto at inferior{6}}
+  \def\textseveninferior{\auto at inferior{7}}
+  \def\texteightinferior{\auto at inferior{8}}
+  \def\textnineinferior{\auto at inferior{9}}
+  \def\textzeroinferior{\auto at inferior{0}}}
 \else
 \AtBeginDocument{%
-  \providecommand*\textoneinferior{\ensuremath{_{1}}}
-  \providecommand*\texttwoinferior{\ensuremath{_{2}}}
-  \providecommand*\textthreeinferior{\ensuremath{_{3}}}
-  \providecommand*\textfourinferior{\ensuremath{_{4}}}
-  \providecommand*\textfiveinferior{\ensuremath{_{5}}}
-  \providecommand*\textsixinferior{\ensuremath{_{6}}}
-  \providecommand*\textseveninferior{\ensuremath{_{7}}}
-  \providecommand*\texteightinferior{\ensuremath{_{8}}}
-  \providecommand*\textnineinferior{\ensuremath{_{9}}}
-  \providecommand*\textzeroinferior{\ensuremath{_{0}}}
-}
+  \providecommand*\textoneinferior{\auto at inferior{1}}
+  \providecommand*\texttwoinferior{\auto at inferior{2}}
+  \providecommand*\textthreeinferior{\auto at inferior{3}}
+  \providecommand*\textfourinferior{\auto at inferior{4}}
+  \providecommand*\textfiveinferior{\auto at inferior{5}}
+  \providecommand*\textsixinferior{\auto at inferior{6}}
+  \providecommand*\textseveninferior{\auto at inferior{7}}
+  \providecommand*\texteightinferior{\auto at inferior{8}}
+  \providecommand*\textnineinferior{\auto at inferior{9}}
+  \providecommand*\textzeroinferior{\auto at inferior{0}}}
 \fi
 
 \def\@autofrac#1#2{%
-  \@ifstar{\ensuremath{\tfrac{#1}{#2}}}{%
+  \@ifstar{%
     \ifmmode
+    \tfrac{#1}{#2}
+    \else
+    $\frac{\text{#1}}{\text{#2}}$
+    \fi}{%
+    \ifmmode
     \frac{#1}{#2}
     \else
     \if at nicefrac@
     \nicefrac{#1}{#2}
     \else
-    \ensuremath{\tfrac{#1}{#2}}\fi\fi}}
+    $\tfrac{\text{#1}}{\text{#2}}$\fi\fi}}
 
 %% Fractions
 \if at math@fractions@
@@ -259,6 +269,15 @@
 \DeclareUnicodeCharacter{2152}{\textonetenth}
 \DeclareUnicodeCharacter{2189}{\textzerothirds}
 
+
+\if at greek@
+
+\@ifundefined{ver at lgrenc.def}{} {\PackageWarning{utf8add}{LGR font
+    encoding loaded. Output will be poor.}}
+
+\@ifpackageloaded{textalpha}{\PackageWarning{utf8add}{Package
+    'textalpha' loaded. Output will be poor.}{}}
+
 %% Lowercase Greek Letters
 \if at lowercasegreek@upright@
 \DeclareUnicodeCharacter{03B1}{\ensuremath{\upalpha}}
@@ -399,7 +418,7 @@
 \DeclareUnicodeCharacter{03A7}{\ensuremath{\Chi}}
 \DeclareUnicodeCharacter{03A8}{\ensuremath{\Psi}}
 \DeclareUnicodeCharacter{03A9}{\ensuremath{\Omega}}
-\fi\fi\fi
+\fi\fi\fi\fi
 
 %% Superior numbers 4-0
 \DeclareUnicodeCharacter{2074}{\textfoursuperior}
@@ -448,10 +467,12 @@
 \DeclareUnicodeCharacter{2016}{\ifmmode\Vert\else\textbardbl\fi}
 
 %% Other miscelaneous symbols
-\DeclareUnicodeCharacter{207A}{\ensuremath{^{+}}}
-\DeclareUnicodeCharacter{207B}{\ensuremath{^{-}}}
+\DeclareUnicodeCharacter{207A}{\auto at superior{+}}
+\DeclareUnicodeCharacter{207B}{\ifmmode^{-}\else\textsuperscript{\textminus}\fi}
 \DeclareUnicodeCharacter{2213}{\ensuremath{\mp}}
 \DeclareUnicodeCharacter{2212}{\ifmmode-\else--\fi}
 \DeclareUnicodeCharacter{0127}{\ensuremath{\hbar}}
 
+\providecommand*\molar{\textsc{m}}
+\DeclareUnicodeCharacter{1D0D}{\molar}
 \endinput
\ No newline at end of file



More information about the tex-live-commits mailing list.