texlive[71146] Master: mathgreeks (1may24)
commits+karl at tug.org
commits+karl at tug.org
Wed May 1 22:14:50 CEST 2024
Revision: 71146
https://tug.org/svn/texlive?view=revision&revision=71146
Author: karl
Date: 2024-05-01 22:14:50 +0200 (Wed, 01 May 2024)
Log Message:
-----------
mathgreeks (1may24)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/mathgreeks/
trunk/Master/texmf-dist/doc/latex/mathgreeks/README.md
trunk/Master/texmf-dist/doc/latex/mathgreeks/mathgreeks.pdf
trunk/Master/texmf-dist/source/latex/mathgreeks/
trunk/Master/texmf-dist/source/latex/mathgreeks/mathgreeks.dtx
trunk/Master/texmf-dist/source/latex/mathgreeks/mathgreeks.ins
trunk/Master/texmf-dist/tex/latex/mathgreeks/
trunk/Master/texmf-dist/tex/latex/mathgreeks/mathgreeks.sty
trunk/Master/tlpkg/tlpsrc/mathgreeks.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/mathgreeks/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mathgreeks/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/mathgreeks/README.md 2024-05-01 20:14:50 UTC (rev 71146)
@@ -0,0 +1,30 @@
+# Math Greek letters - The mathgreeks package
+
+
+## Presentation
+
+The purpose of this package is to provide access to numerous Greek letter fonts
+for math mode, without altering other mathematical characters and symbols
+and without loading whole extensions that provide these fonts.
+Moreover, the chosen font or shape can be changed dynamically throughout the document.
+
+
+## Installation
+
+- run LaTeX on mathgreeks.ins, you obtain the file mathgreeks.sty;
+- if then you run LuaLaTeX on mathgreeks.dtx you get the file mathgreeks.pdf which is also in the archive;
+- if you run pdfLaTex on mathgreeks.dtx you get a shorter version of this pdf file without the examples using fontspec or unicode-math;
+- put the files mathgreeks.sty and mathgreeks.pdf in your TeX Directory Structure.
+
+
+## Author
+
+Antoine Missier
+
+Email: antoine.missier at ac-toulouse.fr
+
+
+## License
+
+Released under the LaTeX Project Public License v1.3 or later.
+See http://www.latex-project.org/lppl.txt
Property changes on: trunk/Master/texmf-dist/doc/latex/mathgreeks/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/mathgreeks/mathgreeks.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/mathgreeks/mathgreeks.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mathgreeks/mathgreeks.pdf 2024-05-01 20:13:51 UTC (rev 71145)
+++ trunk/Master/texmf-dist/doc/latex/mathgreeks/mathgreeks.pdf 2024-05-01 20:14:50 UTC (rev 71146)
Property changes on: trunk/Master/texmf-dist/doc/latex/mathgreeks/mathgreeks.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/mathgreeks/mathgreeks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathgreeks/mathgreeks.dtx (rev 0)
+++ trunk/Master/texmf-dist/source/latex/mathgreeks/mathgreeks.dtx 2024-05-01 20:14:50 UTC (rev 71146)
@@ -0,0 +1,1309 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2024 by Antoine Missier <antoine.missier at ac-toulouse.fr>
+%
+% This file may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX version
+% 2005/12/01 or later.
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{mathgreeks.dtx}
+%</driver>
+%<*package>
+\NeedsTeXFormat{LaTeX2e}[2005/12/01]
+\ProvidesPackage{mathgreeks}
+ [2024/04/30 v1.0 .dtx Math Greek letters]
+%</package>
+%<*driver>
+\documentclass[11pt]{article}
+%\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[english]{babel}
+\usepackage{doc}
+\usepackage{geometry}
+\usepackage[savegreeks,otherfonts]{mathgreeks}
+\usepackage{sectsty}
+\usepackage{xcolor}
+\usepackage{spacingtricks}
+\usepackage{metalogo}
+%\usepackage{supertabular}
+\usepackage{tabls}
+\usepackage{multirow}
+\usepackage{ifluatex}
+\ifluatex
+ \usepackage{unicode-math}
+ \setmainfont{XCharter}
+\else
+ \usepackage{charter}
+\fi
+\geometry{scale=0.73,vmarginratio=3:4,heightrounded}
+\MakeShortVerb{"}
+\definecolor{darkbrown}{rgb}{0.5,0.1,0.1}
+\allsectionsfont{\color{darkbrown}}
+\newcommand\bs{\textbackslash}
+\DisableCrossrefs
+%\CodelineIndex
+%\RecordChanges
+\OnlyDescription
+\usepackage{hyperref}
+\title{The \textsf{mathgreeks} package}
+\author{Antoine Missier \\ \texttt{antoine.missier at ac-toulouse.fr}}
+\date{\filedate, \fileversion}
+\hypersetup{%
+ colorlinks,
+ linkcolor=blue,
+ citecolor=red,
+ pdftitle={mathgreeks},
+ pdfsubject={LaTeX package},
+ pdfauthor={Antoine Missier}
+}
+
+\begin{document}
+\DocInput{mathgreeks.dtx}
+%\PrintChanges
+%\PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{1060}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \changes{v1.0}{2024/04/30}{Initial version}
+%
+% \GetFileInfo{mathgreeks.sty}
+%
+% \maketitle
+% \tableofcontents
+%
+% \section{Introduction}
+%
+% The purpose of this package is to provide access to numerous Greek letter fonts
+% for math mode, without altering other mathematical characters and symbols
+% and without loading whole extensions that provide these fonts.
+%
+% The commands "\italpha", "\itbeta"\ldots\ produce the italic forms of the chosen font,
+% and "\upalpha", "\upbeta" \ldots\ produce the upright forms.
+% Style options allow choosing between italic or upright forms for the basic commands
+% "\alpha", "\beta"\ldots
+% Only letters whose glyph differs from the corresponding Roman letter
+% will be defined this way.
+% Therefore, the package does not provide a command "\omicron",
+% whose letter is identical to the Roman `o', and only a few uppercase letters are defined:
+% "\Gamma", "\Delta", "\Theta"\ldots
+%
+% \medskip
+% An ISO recommendation, rarely followed, is to typeset uppercase
+% Greek letters in italic shape, as for other variables~\cite{ICTNS}.
+% This is automatically achieved, for some particular fonts, with packages
+% such as \textsf{fixmath} by Walter Schmidt~\cite{FIXM},
+% \mbox{\textsf{isomath}} by Günter Milde~\cite{ISOM}
+% or \textsf{pm-isomath} by Claudio Beccari~\cite{PMISO} and optionally with some others
+% (such as \textsf{mathpazo} or \textsf{mathptmx} with the option \texttt{slantedGreek}).
+% When running through \LuaLaTeX\ or \XeLaTeX\ you can also get this result
+% with the option \mbox{\texttt{math-style=ISO}} provided
+% by the \textsf{unicode-math} package~\cite{UNIC}.
+%
+% Furthermore there are several packages that provide the uppercase Greek letters
+% in italic and have also options to typeset the lowercase Greek
+% letters in upright shape.
+% Notably, let us mention
+% \mbox{\textsf{mathdesign}}~\cite{DESIGN},
+% \mbox{\textsf{kpfonts}}~\cite{KPF},
+% \mbox{\textsf{fourier}}~\cite{FOUR}, but also
+% \mbox{\textsf{pxgreeks}} (using \textsf{pxfonts}~\cite{PX}), \mbox{\textsf{txgreeks}}
+% (using \textsf{txfonts}~\cite{TX}),
+% \mbox{\textsf{libertinust1math}}~\cite{LIB}, \mbox{\textsf{libgreek}}, etc.
+% A special mention goes to \textsf{lgrmath} of Jean-François Burnol~\cite{LGR}
+% which allows the use of any Greek LGR-encoded font in math mode,
+% an idea taken up in \textsf{mathgreeks}.
+% Also note \textsf{newtxmath}~\cite{NTX} which has several font options.
+% For upright lowercase letters, we have the nice \textsf{upgreek}~\cite{GREEK} package.
+%
+% \medskip
+% The interest of \textsf{mathgreeks} lies in being able to choose the Greek letters font
+% from one of these packages or from a TrueType or OpenType font installed on your computer.
+% The package sets Greek letters in the desired font and shape
+% and enables to change font or shape dynamically within the document.
+%
+% \section{Options and settings}
+%
+% \subsection{Package options}
+%
+% When calling the package, there are three types of options:
+% \begin{itemize}
+% \item Font options,
+% \item Shape options (the style),
+% \item Additional options.
+% \end{itemize}
+% These options use the `\texttt{key=value}' mechanism.
+% When a default value is set, the key can be used without specifying a value
+% (which will then be the default value).
+% Some keys represent booleans with the default value being `\texttt{true}'.
+%
+% \bigskip
+% The first table, in two parts, presents the different keys corresponding to font options,
+% the list of possible values (complete when it is reduced).
+% The default value is indicated in bold, the second part consist in boolean options.
+% Results are presented in section~\ref{examples}.
+%
+% \begin{table}[h]
+% \begin{center}\ttfamily
+% \begin{tabular}{ll}
+% \hline
+% \vstrut{2ex}\normalfont{Option} & \normalfont{Values} \\
+% \hline
+% lgrmath & Alegreya-LF, Cochineal-LF, \textbf{fcm}\ldots \\
+% fontspec & FreeSerif, \textbf{GFS Didot}, Cambria\ldots \\
+% unicode-math & \textbf{Latin Modern Math}, STIX Two Math\ldots \\
+% upgreek & Euler, \textbf{Symbol}, Symbolsmallscale \\
+% mathdesign & Utopia, Garamond, \textbf{Charter} \\
+% kpfonts & \textbf{normal}, light \\
+% \hline
+% \end{tabular}
+% \hspace{1cm}
+% \begin{tabular}{l}
+% \hline
+% \vstrut{2ex}\normalfont{Booleans} \\
+% \hline
+% fourier \\
+% pxfonts \\
+% txfonts \\
+% libertinus \\
+% concrete \\
+% cmbright \\
+% \hline
+% \end{tabular}
+% \end{center}
+% \caption{font options\label{table:font}}
+% \end{table}
+% The \texttt{fontspec} and \texttt{unicode-math} options require loading
+% the corresponding packages, and these can only work when running through
+% \LuaLaTeX\ (or \XeLaTeX).
+% The fontspec option allows for the use of most TrueType or OpenType
+% fonts installed on your computer,
+% those that have Greek letters.
+%
+% When calling "\boldmath" (outside the math environment), you get the letters in bold face,
+% but the command "\mathbf" doesn't work here.
+%
+% \bigskip
+% The second table below presents the shape options. If the shape option
+% is not specified, the italic shape is chosen by default, meaning that the commands
+% "\alpha", "\beta", \ldots, "\Delta", "\Gamma"\ldots will produce the same result
+% as the corresponding "\it"\meta{letter} commands.
+%
+% \begin{table}[h]
+% \begin{center}
+% \begin{tabular}{ll}
+% \hline
+% \vstrut{2ex}\normalfont{Option} & \normalfont{Description} \\
+% \hline
+% \texttt{greekup} & lowercase letters in upright shape \\
+% \texttt{Greekup} & uppercase letters in upright shape \\
+% \texttt{TeX} & lowercase=italic, uppercase=upright \\
+% \texttt{ISO} & lowercase=italic, uppercase=italic \\
+% \texttt{upright} & lowercase=upright, uppercase=upright \\
+% \texttt{style} & possible values: \texttt{TeX}, \texttt{ISO}, \texttt{upright} \\
+% \hline
+% \end{tabular}
+% \end{center}
+% \caption{shape options\label{table:shape}}
+% \end{table}
+%
+% \begin{itemize}
+% \item Except for \texttt{style}, all these options are booleans.
+% \item The \texttt{Greekup} option est initialized to \texttt{true} (corresponding
+% to the \texttt{TeX} style).
+% \item The \texttt{style=ISO} option produces the same result as the simple
+% \texttt{ISO} option, and the same applies to the other two styles
+% (\texttt{TeX}, \texttt{upright}).
+% \item To get lowercase letters in upright shape and uppercase letters in italic,
+% activate \begin{center}\texttt{greekup=true,Greekup=false}.\end{center}
+% \end{itemize}
+%
+% \smallskip
+% The following list presents the additional options, which are also booleans:
+% \begin{description}
+% \item[\texttt{savegreeks}] Saves the letters corresponding to the original commands
+% "\alpha", "\beta"\ldots so that they remain accessible through the commands
+% "\backalpha", "\backbeta"\ldots
+% \item[\texttt{otherfonts}] Allows dynamic font switching (see next section)
+% for later use of \texttt{lgrmath}, \texttt{fourier}, \texttt{libertinus} or \texttt{upgreek}.
+% \item[\texttt{lowercase}] This option is initialized to \texttt{true};
+% \texttt{lowercase=false} allows keeping the original lowercase Greek letters
+% without redefining the commands "\alpha", "\beta"\ldots
+% \item[\texttt{uppercase}] This option is initialized to \texttt{true};
+% \texttt{uppercase=false} allows keeping the original uppercase Greek letters
+% without redefining the commands "\Gamma", "\Delta"\ldots
+% \end{description}
+%
+% \subsection{Dynamic settings commands}
+%
+% There are two command for dynamic settings:
+% \begin{description}
+% \item[] "\setmathgreeks"
+% This command takes a mandatory parameter which is a list of
+% `\texttt{key=value}' settings among the shape options presented
+% in table~\ref{table:shape} (the other options are not usable in this command).
+% This allows modifying these settings in the body of the document,
+% with a global effect, or local if the command is called in an environment
+% or a group (delimited by braces).
+%
+% \item[] "\mathgreeksfont"
+% This command allows modifying the font of Greek letters throughout the document,
+% with a global or local effect.
+% The possible options fall into two categories:
+% \begin{center}
+% \texttt{fontspec}, \texttt{unicode-math}, \\
+% \texttt{enc}, \texttt{fam}, \texttt{series}, \texttt{shape}.
+% \end{center}
+% The \texttt{fontspec} and \texttt{unicode-math} options are identical
+% to those in table~\ref{table:font}.
+% The other previous font options (\texttt{lgrmath}, \texttt{mathdesign}, etc.)\@
+% are not usable in "\mathgreeksfont".
+% However, these fonts can be obtained by specifying the encoding (option \texttt{enc}),
+% family (option \texttt{fam}), series and shape: the New Font Selection Scheme (NFSS).
+% The series defines the `boldness' and has a default value: \texttt{series=m} (medium).
+% For the shape, the default value is \texttt{shape=it};
+% \texttt{enc} and \texttt{fam} have no default value.
+% For example,
+% \begin{center}
+% "\mathgreeksfont{enc=OML,fam=mdbch,shape=n}"
+% \end{center}
+% will produce upright letters from the Charter font provided by \textsf{mathdesign}.
+% For each font option seen previously,
+% the following examples (section~\ref{examples}) indicates
+% the values to give to \texttt{enc}, \texttt{fam}, and \texttt{shape}.
+% The font definition by NFSS attributes will not produce specific commands for italics
+% "\it"\meta{letter} or for upright letters "\up"\meta{letter}.
+% Only the commands "\alpha", "\beta"\ldots will be redefined according to the
+% selected shape.
+%
+% If you use the \texttt{fontspec} or \texttt{unicode-math} option,
+% these second kind of options have no effect.
+%
+% Notice that the encoding obtained by the package font options is faster, moreover
+% the command "\boldmath" doesn't work anymore
+% when changing the font with \texttt{enc}, \texttt{fam} and \texttt{shape},
+% but you can obtain the boldface
+% letters with \texttt{series=b}, or \texttt{series=bx} (bold extended).
+%
+% \end{description}
+%
+% \section{Examples} \label{examples}
+% \begin{description}
+% \item[] "\greektable"
+% The examples in this section are obtained with the "\greektable" command.
+% This command generates a table with two rows: the first contains the lowercase letters
+% obtained with "\alpha", \ldots, "\omega", and the second contains variants
+% "\varepsilon", "\vartheta"\ldots of certain letters as well as the uppercase letters
+% obtained with "\Gamma", "\Delta", \ldots, "\Omega"
+% (for those who differ from their Latin equivalent).
+% \end{description}
+%
+% \subsection{PostScript font options}
+%
+% The \texttt{upgreek} option, as its name suggests, produces only upright letters,
+% and the \texttt{Euler} font does not have the variants "\varrho" and "\varsigma".
+% The \texttt{Symbolsmallscale} font is identical to Symbol but reduced in size by 90\,\%.
+% \texttt{mathdesign=Garamond} yields a virtual font
+% that may not always work.
+%
+% \newlength\legendwidth
+% \setlength\legendwidth{3.2cm}
+% \newcommand*\doublerows[1]{\multirow{2}{\legendwidth}[-1.5ex]{\bfseries#1}}
+
+% \begin{center}
+% \begin{tabular}{|l|@{}c@{}|c@{$\;$}c@{}c|}
+% \hline
+% \makebox[\legendwidth][l]{\textbf{upgreek=...}} & \makebox[8.4cm]{Résult}
+% & \makebox[1cm]{enc} & \makebox[1cm]{fam} & shape \\
+% \hline
+% \textbf{Symbol}
+% & \mathgreeksfont{enc=U,fam=psy,shape=n}\greektable
+% & U & psy & n \\
+% \hline
+% \textbf{Symbolsmallscale}
+% & \mathgreeksfont{enc=U,fam=fsy,shape=n} \greektable
+% & U & fsy & n \\
+% \hline
+% \textbf{Euler}
+% & \mathgreeksfont{enc=U,fam=eur,shape=n} \greektable
+% & U & eur & n \\
+% \hline
+% \end{tabular}
+% \end{center}
+%
+% \begin{center}
+% \begin{tabular}{|l|@{}c@{}|c@{$\;$}c@{}c|}
+% \hline
+% \textbf{mathdesign=...} & \makebox[8.4cm]{Résult} & enc & fam & shape \\
+% \hline
+% \doublerows{Utopia}
+% & \mathgreeksfont{enc=OML,fam=mdput} \greektable
+% & OML & mdput & it \\
+% & \mathgreeksfont{enc=OML,fam=mdput,shape=n} \greektable
+% & OML & mdput & n \\
+% \hline
+% \doublerows{Garamond}
+% & \mathgreeksfont{enc=OML,fam=mdugm} \greektable
+% & OML & mdugm & it \\
+% & \mathgreeksfont{enc=OML,fam=mdugm,shape=n} \greektable
+% & OML & mdugm & n \\
+% \hline
+% \doublerows{Charter}
+% & \mathgreeksfont{enc=OML,fam=mdbch} \greektable
+% & OML & mdbch & it \\
+% & \mathgreeksfont{enc=OML,fam=mdbch,shape=n} \greektable
+% & OML & mdbch & n \\
+% \hline
+% \end{tabular}
+% \end{center}
+%
+% \begin{center}
+% \begin{tabular}{|l|@{}c@{}|c@{$\;$}c@{}c|}
+% \hline
+% \textbf{kpfonts=...} & \makebox[8.4cm]{Résult} & enc & fam & shape \\
+% \hline
+% \doublerows{normal}
+% & \mathgreeksfont{enc=OML,fam=jkp} \greektable
+% & OML & jkp & it \\
+% & \mathgreeksfont{enc=U,fam=jkpmia} \greektable
+% & U & jkpmia & it \\
+% \hline
+% \doublerows{light}
+% & \mathgreeksfont{enc=OML,fam=jkpl} \greektable
+% & OML & jkpl & it \\
+% & \mathgreeksfont{enc=U,fam=jkplmia} \greektable
+% & U & jkplmia & it \\
+% \hline
+% \end{tabular}
+% \end{center}
+%
+% \begin{center}
+% \begin{tabular}{|l|@{}c@{}|c@{$\;$}c@{}c|}
+% \hline
+% Boolean options & \makebox[8.2cm]{Résult} & enc & fam & shape \\
+% \hline
+% \doublerows{fourier}
+% & \mathgreeksfont{enc=FML,fam=futmi} \greektable
+% & FML & futmi & it \\
+% & \mathgreeksfont{enc=FML,fam=futm} \greektable
+% & FML & futm & it \\
+% \hline
+% % \doublerows{pxfonts}
+% & \mathgreeksfont{enc=OML,fam=pxmi} \greektable
+% & OML & pxmi & it \\
+% & \mathgreeksfont{enc=U,fam=pxmia} \greektable
+% & U & pxmia & it \\
+% \hline
+% \doublerows{txfonts}
+% & \mathgreeksfont{enc=OML,fam=txmi} \greektable
+% & OML & txmi & it \\
+% & \mathgreeksfont{enc=U,fam=txmia} \greektable
+% & U & txmia & it \\
+% \hline
+% \doublerows{libertinus}
+% & \mathgreeksfont{enc=LS1,fam=libertinust1math} \greektable
+% & LS1 & * & it \\
+% & \mathgreeksfont{enc=LS1,fam=libertinust1math,shape=n} \greektable
+% & LS1 & * & n \\
+% \hline
+% \textbf{concrete}
+% & \mathgreeksfont{enc=OML,fam=ccm} \greektable
+% & OML & ccl & it \\
+% \hline
+% \textbf{cmbright}
+% & \mathgreeksfont{enc=OML,fam=cmbrm} \greektable
+% & OML & cmbrm & it \\
+% \hline
+% \end{tabular}
+% \end{center}
+% \emph{* The asterisk for the} \texttt{libertinus} \emph{value corresponds to the}
+% \texttt{libertinust1math} \emph{family, a name too long to appear in this table.}
+%
+% \subsection{The \texttt{lgrmath} option}
+%
+% The \texttt{lgrmath} option, inspired by the eponymous package developed by J.F. Burnol,
+% has a large number of possible values. We present here only a few.
+% The documentation of the \textsf{lgrmath} package~\cite{LGR} explains how
+% to list and consult the fonts available on your distribution with the LGR encoding.
+% One can also consult with profit the documentation of \textsf{cb-fonts}\cite{CB},
+% the Greek fonts of Claudio Beccari.
+%
+% With the \texttt{lgrmath} option, the alternative commands for the variants
+% produce the same glyphs as those of the normal letters except for "\varsigma".
+%
+% We have not presented here the third column previously indicating the values for
+% \texttt{enc}, \texttt{fam}, and \texttt{shape} because, for this entire section,
+% we have \texttt{enc=LGR}, \texttt{fam=\meta{font-name}}, the name of the font presented,
+% and \texttt{shape=it}, for the italic shape, or \texttt{shape=n}, for the upright shape.
+% Example:
+% \begin{center}
+% "\mathgreeksfont{enc=LGR,fam=Alegreya-LF,shape=n}"
+% \end{center}
+%
+%\setlength\legendwidth{4cm}
+% \newcommand\lgrtbl[1]{%
+% \doublerows{#1}
+% & \mathgreeksfont{enc=LGR,fam=#1} \greektable \\
+% & \mathgreeksfont{enc=LGR,fam=#1,shape=n} \greektable \\
+% \hline
+% }
+%
+% \begin{center}
+% \begin{tabular}{|l|c|}
+% \hline
+% \textbf{lgrmath=...} & Résult \\
+% \hline
+% \lgrtbl{Alegreya-LF}
+% \lgrtbl{Cochineal-LF}
+% \lgrtbl{LibertinusSans-LF}
+% \lgrtbl{NotoSerif-LF}
+% \lgrtbl{NotoSans-LF}
+% \lgrtbl{droidserif}
+% \lgrtbl{fcm}
+% \lgrtbl{gentium}
+% \lgrtbl{llcmss}
+% \end{tabular}
+% \end{center}
+%
+% \ifluatex
+% \subsection{The \texttt{fontspec} option}
+%
+% Most TrueType or OpenType fonts can be used here.
+% ^^A Needs the \textsf{fontspec} package and must be run through \LuaLaTeX\ or \XeLaTeX.
+% Some of the fonts below are not free, and some do not have the variants
+% "\varepsilon"\ldots for example Arial, Times New Roman.
+%
+% \newcommand\fontspectbl[2][fontspec]{%
+% \doublerows{#2}
+% & \mathgreeksfont{#1=#2}
+% \setmathgreeks{style=ISO} \greektable \\
+% & \mathgreeksfont{fontspec=#2}
+% \setmathgreeks{style=upright} \greektable \\
+% \hline
+% }
+%
+% \begin{center}
+% \begin{tabular}{|l|c|}
+% \hline
+% \textbf{fontspec=...} & Résult \\
+% \hline
+% \fontspectbl{DejaVu Serif}
+% \fontspectbl{DejaVu Sans}
+% \fontspectbl{FreeSerif}
+% \fontspectbl{FreeSans}
+% \fontspectbl{GFS Artemisia}
+% \fontspectbl{GFS Didot}
+% \fontspectbl{Liberation Serif}
+% \fontspectbl{Liberation Sans}
+% \end{tabular}
+% \end{center}
+%
+% \begin{center}
+% \begin{tabular}{|l|c|}
+% \hline
+% \textbf{fontspec=...} & Résult \\
+% \hline
+% \fontspectbl{Linux Libertine O}
+% ^^A\fontspectbl{Linux Biolinum O}
+% \fontspectbl{Arial}
+% \fontspectbl{Cambria}
+% \fontspectbl{Palatino Linotype}
+% \fontspectbl{Times New Roman}
+% \end{tabular}
+% \end{center}
+%
+%
+% \subsection{The \texttt{unicode-math} option}
+%
+% \begin{center}
+% \begin{tabular}{|l|c|}
+% \hline
+% \textbf{unicode-math=...} & Résult \\
+% \hline
+% \fontspectbl[unicode-math]{Latin Modern Math}
+% \fontspectbl[unicode-math]{STIX Two Math}
+% \fontspectbl[unicode-math]{Fira Math}
+% \end{tabular}
+% \end{center}
+%
+% \else
+% \typeout{This is a short version of the documentation.
+% Use LuaLaTeX to get the complete version}
+% \fi
+%
+% \StopEventually{
+% \begin{thebibliography}{20}
+% \begin{raggedright}
+% \bibitem{ICTNS} \emph{On the Use of Italic and up Fonts for Symbols in Scientific Text},
+% I.M.~Mills and W.V.~Metanomski, ICTNS (Interdivisional Committee
+% on Terminology, Nomenclature and Symbols), dec 1999,
+% \url{https://old.iupac.org/standing/idcns/italic-roman_dec99.pdf}.
+% \bibitem{UNIC} \emph{Experimental Unicode mathematical typesetting:
+% The \textsf{unicode-math} package}, Will Robertson, Philipp Stephani, Joseph Wright,
+% Khaled Hosny, and others, CTAN, v0.8r 2023/08/13.
+% \bibitem{FSPEC} \emph{The \textsf{fontspec} package -- Font selection for \XeLaTeX\
+% and \LuaLaTeX}, Will Robertson, CTAN, v2.9b 2024/04/27.
+% \bibitem{FIXM} \emph{The \textsf{fixmath} package for \LaTeXe}, Walter Schmidt,
+% CTAN, v0.9 2000/04/11.
+% \bibitem{ISOM} \emph{\textsf{isomath} -- Mathematical style for science and technology},
+% Günter Milde, CTAN, v0.6.1 2012/09/04.
+% \bibitem{PMISO} \emph{\textsf{PM-ISOmath}, The Poor Man ISO math bundle},
+% the \textsf{pm-isomath} package by Claudio Beccari, CTAN, v1.2.00 2021/08/04.
+% \bibitem{GREEK} \emph{The \textsf{upgreek} package for \LaTeXe}, Walter Schmidt,
+% CTAN, v2.0 2003/02/12.
+% \bibitem{DESIGN} \emph{The \textsf{mathdesign} package},
+% Paul Pichaureau, CTAN, v2.31 2013/08/29.
+% \bibitem{KPF} \emph{\textsf{Kp-Fonts} -- The Johannes Kepler project},
+% Christophe Caignaert, CTAN, v3.34 20/09/2022.
+% \bibitem{FOUR} \textsf{Fourier-GUT\hspace{-0.1em}\emph{enberg}},
+% Michel Bovani, CTAN, v1.3 2005/01/30.
+% \bibitem{PX} \emph{\textsf{PX Fonts} -- Palatino-like fonts in support of mathematics},
+% Young Ryu, CTAN, 2000/12/14.
+% \bibitem{TX} \emph{\textsf{TX Fonts} -- Times-like fonts in support of mathematics},
+% Young Ryu, CTAN, 2000/12/15.
+% \bibitem{CB} \emph{The CB Greek fonts}, Claudio Beccari, CTAN, 2008/01/01.
+% \bibitem{PXG} \emph{The \textsf{pxgreeks} package}, Jean-François Burnol,
+% CTAN v1.0 2011/03/16.
+% \bibitem{TXG} \emph{The \textsf{txgreeks} package}, Jean-François Burnol,
+% CTAN v1.0 2011/03/16.
+% \bibitem{LIBG} \emph{The \textsf{libgreek} package}, Jean-François Burnol,
+% CTAN v1.1 2022/11/11.
+% \bibitem{LGR} \emph{The \textsf{lgrmath} package}, Jean-François B., CTAN, v1.0 2022/11/16.
+% \bibitem{NTX} \emph{New TX font package}, Micahel Sharpe, CTAN, v1.735 2024/03/01.
+% \bibitem{LIB} \emph{The LibertinusT1 Math Package}, Michael Sharpe, CTAN,
+% v2.0.4 2024/01/14.
+% \bibitem{CHEM} \emph{\textsf{chemgreek} -- Upright Greek letters in chemistry},
+% Clemens Niederberger, CTAN, v1.1a 2020/01/16.
+% \end{raggedright}
+% \end{thebibliography}
+%}
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+\RequirePackage{kvoptions}
+%\SetupKeyvalOptions{family=mgr} % mathgreeks by default
+
+\DeclareStringOption{lgrmath}[fcm]
+\newif\ifmathgreeks at lgrmath
+\AddToKeyvalOption*{lgrmath}{\mathgreeks at lgrmathtrue}
+\DeclareStringOption{fontspec}[GFS Didot]
+\newif\ifmathgreeks at fontspec
+\AddToKeyvalOption*{fontspec}{\mathgreeks at fontspectrue}
+\newif\ifmathgreeks at unicodemath
+\define at key{mathgreeks}{unicode-math}[Latin Modern Math]{
+ \newcommand*{\mathgreeks at unicodemath}{#1}
+ \mathgreeks at unicodemathtrue}
+\DeclareStringOption{upgreek}[Symbol]
+\newif\ifmathgreeks at upgreek
+\AddToKeyvalOption*{upgreek}{\mathgreeks at upgreektrue
+ \mathgreeks at Greekuptrue\mathgreeks at greekuptrue}
+\DeclareStringOption{mathdesign}[Charter]
+\newif\ifmathgreeks at mathdesign
+\AddToKeyvalOption*{mathdesign}{\mathgreeks at mathdesigntrue}
+\DeclareBoolOption{fourier}% false by default
+\DeclareStringOption{kpfonts}[normal]
+\newif\ifmathgreeks at kpfonts
+\AddToKeyvalOption*{kpfonts}{\mathgreeks at kpfontstrue}
+\DeclareBoolOption{pxfonts}
+\DeclareBoolOption{txfonts}
+\DeclareBoolOption{libertinus}
+\DeclareBoolOption{concrete}
+\DeclareBoolOption{cmbright}
+
+\DeclareBoolOption{savegreeks}
+\DeclareBoolOption{otherfonts}
+\DeclareBoolOption[true]{lowercase}
+\DeclareBoolOption[true]{uppercase}
+
+% dynamic options
+\DeclareBoolOption[true]{Greekup}
+\DeclareBoolOption{greekup}
+\DeclareBoolOption{upright}
+\AddToKeyvalOption*{upright}{\mathgreeks at Greekuptrue
+ \mathgreeks at greekuptrue}
+\DeclareBoolOption{ISO}
+\AddToKeyvalOption*{ISO}{\mathgreeks at Greekupfalse
+ \mathgreeks at greekupfalse}
+\DeclareBoolOption{TeX}
+\AddToKeyvalOption*{TeX}{\mathgreeks at Greekuptrue
+ \mathgreeks at greekupfalse}
+\DeclareStringOption{style}
+\AddToKeyvalOption*{style}{\setkeys{mathgreeks}{\mathgreeks at style}}
+
+\DeclareDefaultOption{\PackageError{mathgreeks}{%
+ Option key `\CurrentOptionKey' undefined}{}}
+\ProcessLocalKeyvalOptions* % \setkeys is done here
+
+\RequirePackage{etoolbox} % provides \AtEndPreamble
+
+\newif\ifkp at upRm % from kpgonts, bugs if after \ifmathgreeks at kpfonts
+\newif\iflibus at sansmath % from libertinust1math
+\newif\ifmathgreeks at Symbol % for codes definition
+\newif\ifmathgreeks at itgreek % for fonts without upright shape
+\newif\ifmathgreeks at font % if font option at package call
+\mathgreeks at fonttrue
+
+
+%%%%%%%%%%%%%%%% INITIAL SETTINGS %%%%%%%%%%%%%%%
+
+\ifmathgreeks at otherfonts
+ \DeclareFontEncoding{LGR}{}{}
+ \DeclareFontEncoding{FML}{}{}
+ \DeclareFontSubstitution{FML}{futm}{m}{it}
+ \DeclareFontEncoding{LS1}{}{}
+ \DeclareFontSubstitution{LS1}{libertinust1math}{m}{n}
+
+ % from the upgreek package
+ \DeclareFontFamily{U}{eur}{\skewchar\font'177}
+ \DeclareFontShape{U}{eur}{m}{n}{%
+ <-6> eurm5 <6-8> eurm7 <8-> eurm10}{}
+ \DeclareFontShape{U}{eur}{b}{n}{%
+ <-6> eurb5 <6-8> eurb7 <8-> eurb10}{}
+ \DeclareFontFamily{U}{fsy}{}
+ \DeclareFontShape{U}{fsy}{m}{n}{<->s*[.9]psyr}{}
+
+\fi
+
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{lgrmath}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{fontspec}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{unicodemath}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{upgreek}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{mathdesign}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{fourier}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{kpfonts}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{pxfonts}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{txfonts}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{savegreeks}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{otherfonts}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{lowercase}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{uppercase}
+
+
+\AtEndPreamble{\AtBeginDocument{
+ \@ifundefined{text}{\RequirePackage{amstext}}{}
+
+ \ifmathgreeks at lgrmath
+ \DeclareFontEncoding{LGR}{}{}
+ \DeclareSymbolFont{mgr at it}{LGR}{\mathgreeks at lgrmath}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{LGR}{\mathgreeks at lgrmath}{b}{it}
+ \DeclareSymbolFont{mgr at up}{LGR}{\mathgreeks at lgrmath}{m}{n}
+ \SetSymbolFont{mgr at up}{bold}{LGR}{\mathgreeks at lgrmath}{b}{n}
+
+ \else\ifmathgreeks at fontspec
+ \@ifpackageloaded{fontspec}{}{
+ \PackageError{mathgreeks}{`fontspec' or `unicodemath'
+ options need the fontspec package\MessageBreak
+ which must be run with LuaLaTeX or XeLaTeX}{}
+ }
+ \newfontfamily\MathGreeksFont{\mathgreeks at fontspec}%
+ [NFSSFamily=mgru]
+ \DeclareSymbolFont{mgr at it}{TU}{mgru}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{TU}{mgru}{b}{it}
+ \DeclareSymbolFont{mgr at up}{TU}{mgru}{m}{n}
+ \SetSymbolFont{mgr at it}{bold}{TU}{mgru}{b}{n}
+
+ \else\ifmathgreeks at unicodemath
+ \@ifpackageloaded{unicode-math}{}{
+ \PackageError{mathgreeks}{`unicodemath' option needs
+ the unicode-math package\MessageBreak
+ which must be run with LuaLaTeX or XeLaTeX}{}
+ }
+ \setmathfont{\mathgreeks at unicodemath}[range=it/{greek,Greek}]
+ \setmathfont{\mathgreeks at unicodemath}[range=up/{greek,Greek}]
+ \mathgreeks at fontspectrue % for \mgr at CodeGreeks
+ \let\mgr at UnicodeGreek\mgr at UnicodemathGreek
+
+ \else\ifmathgreeks at upgreek
+ \ifdefstring{\mathgreeks at upgreek}{Euler}{
+ \DeclareFontFamily{U}{eur}{\skewchar\font'177}
+ \DeclareFontShape{U}{eur}{m}{n}{%
+ <-6> eurm5 <6-8> eurm7 <8-> eurm10}{}
+ \DeclareFontShape{U}{eur}{b}{n}{%
+ <-6> eurb5 <6-8> eurb7 <8-> eurb10}{}
+ \DeclareSymbolFont{mgr at up}{U}{eur}{m}{n}
+ \SetSymbolFont{mgr at up}{bold}{U}{eur}{b}{n}
+ }{
+ \ifdefstring{\mathgreeks at upgreek}{Symbol}{
+ \DeclareSymbolFont{mgr at up}{U}{psy}{m}{n} % no bold face
+ \mathgreeks at Symboltrue
+ }{
+ \ifdefstring{\mathgreeks at upgreek}{Symbolsmallscale}{
+ \DeclareFontFamily{U}{fsy}{}
+ \DeclareFontShape{U}{fsy}{m}{n}{<->s*[.9]psyr}{}
+ \DeclareSymbolFont{mgr at up}{U}{fsy}{m}{n}
+ \mathgreeks at Symboltrue
+ }{
+ \PackageError{mathgreeks}{Invalid value
+ `\mathgreeks at upgreek' with `upgreek' key}{With `upgreek'
+ possible values are: Euler, Symbol, Symbolsmallscale.}
+ }}}
+
+ \else\ifmathgreeks at mathdesign
+ \ifdefstring{\mathgreeks at mathdesign}{Utopia}{
+ \DeclareSymbolFont{mgr at it}{OML}{mdput}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{mdput}{b}{it}
+ \DeclareSymbolFont{mgr at up}{OML}{mdput}{m}{n}
+ \SetSymbolFont{mgr at up}{bold}{OML}{mdput}{b}{n}
+ }{
+ \ifdefstring{\mathgreeks at mathdesign}{Garamond}{
+ \DeclareSymbolFont{mgr at it}{OML}{mdugm}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{mdugm}{b}{it}
+ \DeclareSymbolFont{mgr at up}{OML}{mdugm}{m}{n}
+ \SetSymbolFont{mgr at up}{bold}{OML}{mdugm}{b}{n}
+ }{
+ \ifdefstring{\mathgreeks at mathdesign}{Charter}{
+ \DeclareSymbolFont{mgr at it}{OML}{mdbch}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{mdbch}{b}{it}
+ \DeclareSymbolFont{mgr at up}{OML}{mdbch}{m}{n}
+ \SetSymbolFont{mgr at up}{bold}{OML}{mdbch}{b}{n}
+ }{
+ \PackageError{mathgreeks}{Invalid value
+ `\mathgreeks at mathdesign' with `mathdesign' key}{With
+ `mathdesign' possible values are:
+ Utopia, Garamond, Charter.}
+ }}}
+
+ \else\ifmathgreeks at fourier
+ \DeclareFontEncoding{FML}{}{}
+ \DeclareFontSubstitution{FML}{futm}{m}{it}
+ \DeclareSymbolFont{mgr at it}{FML}{futmi}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{FML}{futmi}{b}{it}
+ \DeclareSymbolFont{mgr at up}{FML}{futm}{m}{it}
+ \SetSymbolFont{mgr at up}{bold}{FML}{futm}{b}{it}
+
+ \else\ifmathgreeks at kpfonts
+ \ifdefstring{\mathgreeks at kpfonts}{normal}{
+ \DeclareSymbolFont{mgr at it}{OML}{jkp}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{jkp}{bx}{it}
+ \DeclareSymbolFont{mgr at up}{U}{jkpmia}{m}{it}
+ \SetSymbolFont{mgr at up}{bold}{U}{jkpmia}{bx}{it}
+ }{
+ \ifdefstring{\mathgreeks at kpfonts}{light}{
+ \DeclareSymbolFont{mgr at it}{OML}{jkpl}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{jkpl}{bx}{it}
+ \DeclareSymbolFont{mgr at up}{U}{jkplmia}{m}{it}
+ \SetSymbolFont{mgr at up}{bold}{U}{jkplmia}{bx}{it}
+ }{
+ \PackageError{mathgreeks}{Invalid value
+ `\mathgreeks at kpfonts' with `kpfonts' key}{With
+ `kpfonts' possible values are: normal, light.}
+ }}
+
+ \else\ifmathgreeks at pxfonts % no font option specified
+ \DeclareSymbolFont{mgr at it}{OML}{pxmi}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{pxmi}{bx}{it}
+ \DeclareSymbolFont{mgr at up}{U}{pxmia}{m}{it}
+ \SetSymbolFont{mgr at up}{bold}{U}{pxmia}{bx}{it}
+
+ \else\ifmathgreeks at txfonts
+ \DeclareSymbolFont{mgr at it}{OML}{txmi}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{txmi}{bx}{it}
+ \DeclareSymbolFont{mgr at up}{U}{txmia}{m}{it}
+ \SetSymbolFont{mgr at up}{bold}{U}{txmia}{bx}{it}
+
+ \else\ifmathgreeks at libertinus
+ \DeclareFontEncoding{LS1}{}{}
+ \DeclareFontSubstitution{LS1}{libertinust1math}{m}{n}
+ \DeclareSymbolFont{mgr at it}{LS1}{libertinust1math}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{LS1}{libertinust1math}{m}{it}
+ \DeclareSymbolFont{mgr at up}{LS1}{libertinust1math}{m}{n}
+ \SetSymbolFont{mgr at up}{bold}{LS1}{libertinust1math}{m}{n}
+
+ \else\ifmathgreeks at concrete
+ \DeclareSymbolFont{mgr at it}{OML}{ccm}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{ccm}{b}{it}
+ \mathgreeks at itgreektrue
+
+ \else\ifmathgreeks at cmbright
+ \DeclareSymbolFont{mgr at it}{OML}{cmbrm}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{cmbrm}{b}{it}
+ \mathgreeks at itgreektrue
+
+ \else
+ \PackageWarningNoLine{mathgreeks}{No font option specified}
+ \mathgreeks at fontfalse
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+
+ \ifmathgreeks at savegreeks \SaveGreeks \fi
+
+ \ifmathgreeks at font
+ \ifmathgreeks at upgreek
+ \mathgreeks at Greekuptrue \mathgreeks at greekuptrue
+ \PackageWarningNoLine{mathgreeks}{Commands \string \italpha,
+ \string\itbeta... \MessageBreak
+ not available with the `upgreek' option}
+ \else
+ \mgr at CodeGreeks{it}
+ \fi
+ \ifmathgreeks at itgreek
+ \mathgreeks at Greekupfalse \mathgreeks at greekupfalse
+ \PackageWarningNoLine{mathgreeks}{Commands \string \upalpha,
+ \string\upbeta... \MessageBreak
+ not available with `concrete' or 'cmbright}
+ \else
+ \mgr at CodeGreeks{up}
+ \fi
+ \mgr at DefaultGreeks
+ \fi
+}}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%% MACROS %%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\setmathgreeks#1{\setkeys{mathgreeks}{#1}\unskip
+ \ifmathgreeks at upgreek
+ \mathgreeks at Greekuptrue
+ \mathgreeks at greekuptrue
+ \PackageWarning{mathgreeks}{Style is set to `upright'
+ \MessageBreak with the `upgreek' option}
+ \fi
+ \mgr at DefaultGreeks\ignorespaces
+}
+
+
+\def\re at DeclareMathSymbol#1#2#3#4{% from kpfonts, pxfonts, txfonts
+ \let#1=\undefined
+ \DeclareMathSymbol{#1}{#2}{#3}{#4}}
+
+%\def\re at DeclareMathSymbol#1#2#3#4{% from newtxmath
+%\if\relax\noexpand#1\let#1=\undefined \fi
+%\DeclareMathSymbol{#1}{#2}{#3}{#4}}
+
+\newcommand{\mgr at CodeGreek}[3]{% #1 = it or up
+ \expandafter\re at DeclareMathSymbol\csname#1#2\endcsname%
+ {\mathalpha}{mgr@#1}{#3}
+}
+
+\newcommand{\mgr at UnicodeGreek}[3]{%
+ \expandafter\Umathchardef\csname#1#2\endcsname="7 % mathalpha
+ \csname symmgr@#1\endcsname #3
+}
+
+\def\mgr at UnicodemathGreek#1#2#3{\unskip
+ \expandafter\DeclareRobustCommand\csname#1#2\endcsname
+ {\csname sym#1\endcsname{\symbol{#3}}}\ignorespaces
+}
+
+\newcommand{\mgr at CodeGreeks}[1]{% #1 = it or up
+ \ifmathgreeks at lgrmath % LGR encoding
+ \mgr at CodeGreek{#1}{Gamma}{71}
+ \mgr at CodeGreek{#1}{Delta}{68}
+ \mgr at CodeGreek{#1}{Theta}{74}
+ \mgr at CodeGreek{#1}{Lambda}{76}
+ \mgr at CodeGreek{#1}{Xi}{88}
+ \mgr at CodeGreek{#1}{Pi}{80}
+ \mgr at CodeGreek{#1}{Sigma}{83}
+ \mgr at CodeGreek{#1}{Upsilon}{85}
+ \mgr at CodeGreek{#1}{Phi}{70}
+ \mgr at CodeGreek{#1}{Psi}{89}
+ \mgr at CodeGreek{#1}{Omega}{87}
+ \mgr at CodeGreek{#1}{alpha}{97}
+ \mgr at CodeGreek{#1}{beta}{98}
+ \mgr at CodeGreek{#1}{gamma}{103}
+ \mgr at CodeGreek{#1}{delta}{100}
+ \mgr at CodeGreek{#1}{epsilon}{101}
+ \mgr at CodeGreek{#1}{zeta}{122}
+ \mgr at CodeGreek{#1}{eta}{104}
+ \mgr at CodeGreek{#1}{theta}{106}
+ \mgr at CodeGreek{#1}{iota}{105}
+ \mgr at CodeGreek{#1}{kappa}{107}
+ \mgr at CodeGreek{#1}{lambda}{108}
+ \mgr at CodeGreek{#1}{mu}{109}
+ \mgr at CodeGreek{#1}{nu}{110}
+ \mgr at CodeGreek{#1}{xi}{120}
+ \mgr at CodeGreek{#1}{pi}{112}
+ \mgr at CodeGreek{#1}{rho}{114}
+ \mgr at CodeGreek{#1}{sigma}{115}
+ \mgr at CodeGreek{#1}{tau}{116}
+ \mgr at CodeGreek{#1}{upsilon}{117}
+ \mgr at CodeGreek{#1}{phi}{102}
+ \mgr at CodeGreek{#1}{chi}{113}
+ \mgr at CodeGreek{#1}{psi}{121}
+ \mgr at CodeGreek{#1}{omega}{119}
+ \mgr at CodeGreek{#1}{varepsilon}{101} % = epsilon
+ \mgr at CodeGreek{#1}{vartheta}{106} % = theta
+ \mgr at CodeGreek{#1}{varpi}{112} % = pi
+ \mgr at CodeGreek{#1}{varrho}{114} % = rho
+ \mgr at CodeGreek{#1}{varsigma}{99}
+ \mgr at CodeGreek{#1}{varphi}{102} % = phi
+ \else\ifmathgreeks at fontspec % unicode encoding
+ \mgr at UnicodeGreek{#1}{Gamma}{"0393}
+ \mgr at UnicodeGreek{#1}{Delta}{"0394}
+ \mgr at UnicodeGreek{#1}{Theta}{"0398}
+ \mgr at UnicodeGreek{#1}{Lambda}{"039B}
+ \mgr at UnicodeGreek{#1}{Xi}{"039E}
+ \mgr at UnicodeGreek{#1}{Pi}{"03A0}
+ \mgr at UnicodeGreek{#1}{Sigma}{"03A3}
+ \mgr at UnicodeGreek{#1}{Upsilon}{"03A5}
+ \mgr at UnicodeGreek{#1}{Phi}{"03A6}
+ \mgr at UnicodeGreek{#1}{Psi}{"03A8}
+ \mgr at UnicodeGreek{#1}{Omega}{"03A9}
+ \mgr at UnicodeGreek{#1}{alpha}{"03B1}
+ \mgr at UnicodeGreek{#1}{beta}{"03B2}
+ \mgr at UnicodeGreek{#1}{gamma}{"03B3}
+ \mgr at UnicodeGreek{#1}{delta}{"03B4}
+ \mgr at UnicodeGreek{#1}{epsilon}{"03B5}
+ \mgr at UnicodeGreek{#1}{zeta}{"03B6}
+ \mgr at UnicodeGreek{#1}{eta}{"03B7}
+ \mgr at UnicodeGreek{#1}{theta}{"03B8}
+ \mgr at UnicodeGreek{#1}{iota}{"03B9}
+ \mgr at UnicodeGreek{#1}{kappa}{"03BA}
+ \mgr at UnicodeGreek{#1}{lambda}{"03BB}
+ \mgr at UnicodeGreek{#1}{mu}{"03BC}
+ \mgr at UnicodeGreek{#1}{nu}{"03BD}
+ \mgr at UnicodeGreek{#1}{xi}{"03BE} % not omicron
+ \mgr at UnicodeGreek{#1}{pi}{"03C0}
+ \mgr at UnicodeGreek{#1}{rho}{"03C1}
+ \mgr at UnicodeGreek{#1}{sigma}{"03C3}
+ \mgr at UnicodeGreek{#1}{tau}{"03C4}
+ \mgr at UnicodeGreek{#1}{upsilon}{"03C5}
+ \mgr at UnicodeGreek{#1}{phi}{"03C6}
+ \mgr at UnicodeGreek{#1}{chi}{"03C7}
+ \mgr at UnicodeGreek{#1}{psi}{"03C8}
+ \mgr at UnicodeGreek{#1}{omega}{"03C9}
+ \mgr at UnicodeGreek{#1}{varepsilon}{"03F5}
+ \mgr at UnicodeGreek{#1}{vartheta}{"03D1}
+ \mgr at UnicodeGreek{#1}{varpi}{"03D6}
+ \mgr at UnicodeGreek{#1}{varrho}{"03F1}
+ \mgr at UnicodeGreek{#1}{varsigma}{"03C2}
+ \mgr at UnicodeGreek{#1}{varphi}{"03D5}
+ \else\ifmathgreeks at Symbol % Symbol encoding
+ \mgr at CodeGreek{#1}{Gamma}{`G}
+ \mgr at CodeGreek{#1}{Delta}{`D}
+ \mgr at CodeGreek{#1}{Theta}{`Q}
+ \mgr at CodeGreek{#1}{Lambda}{`L}
+ \mgr at CodeGreek{#1}{Xi}{`X}
+ \mgr at CodeGreek{#1}{Pi}{`P}
+ \mgr at CodeGreek{#1}{Sigma}{`S}
+ \mgr at CodeGreek{#1}{Upsilon}{`U}
+ \mgr at CodeGreek{#1}{Phi}{`F}
+ \mgr at CodeGreek{#1}{Psi}{`Y}
+ \mgr at CodeGreek{#1}{Omega}{`W}
+ \mgr at CodeGreek{#1}{alpha}{`a}
+ \mgr at CodeGreek{#1}{beta}{`b}
+ \mgr at CodeGreek{#1}{gamma}{`g}
+ \mgr at CodeGreek{#1}{delta}{`d}
+ \mgr at CodeGreek{#1}{epsilon}{`e}
+ \mgr at CodeGreek{#1}{zeta}{`z}
+ \mgr at CodeGreek{#1}{eta}{`h}
+ \mgr at CodeGreek{#1}{theta}{`q}
+ \mgr at CodeGreek{#1}{iota}{`i}
+ \mgr at CodeGreek{#1}{kappa}{`k}
+ \mgr at CodeGreek{#1}{lambda}{`l}
+ \mgr at CodeGreek{#1}{mu}{`m}
+ \mgr at CodeGreek{#1}{nu}{`n}
+ \mgr at CodeGreek{#1}{xi}{`x}
+ \mgr at CodeGreek{#1}{pi}{`p}
+ \mgr at CodeGreek{#1}{rho}{`r}
+ \mgr at CodeGreek{#1}{sigma}{`s}
+ \mgr at CodeGreek{#1}{tau}{`t}
+ \mgr at CodeGreek{#1}{upsilon}{`u}
+ \mgr at CodeGreek{#1}{phi}{`f}
+ \mgr at CodeGreek{#1}{chi}{`c}
+ \mgr at CodeGreek{#1}{psi}{`y}
+ \mgr at CodeGreek{#1}{omega}{`w}
+ \mgr at CodeGreek{#1}{varepsilon}{`u} % = epsilon
+ \mgr at CodeGreek{#1}{vartheta}{`J}
+ \mgr at CodeGreek{#1}{varpi}{`v}
+ \mgr at CodeGreek{#1}{varrho}{`r} % = rho
+ \mgr at CodeGreek{#1}{varsigma}{`s} % = sigma
+ \mgr at CodeGreek{#1}{varphi}{`j}
+ \else % OML (or U) encoding
+ \mgr at CodeGreek{#1}{Gamma}{"00}
+ \mgr at CodeGreek{#1}{Delta}{"01}
+ \mgr at CodeGreek{#1}{Theta}{"02}
+ \mgr at CodeGreek{#1}{Lambda}{"03}
+ \mgr at CodeGreek{#1}{Xi}{"04}
+ \mgr at CodeGreek{#1}{Pi}{"05}
+ \mgr at CodeGreek{#1}{Sigma}{"06}
+ \mgr at CodeGreek{#1}{Upsilon}{"07}
+ \mgr at CodeGreek{#1}{Phi}{"08}
+ \mgr at CodeGreek{#1}{Psi}{"09}
+ \mgr at CodeGreek{#1}{Omega}{"0A}
+ \mgr at CodeGreek{#1}{alpha}{"0B}
+ \mgr at CodeGreek{#1}{beta}{"0C}
+ \mgr at CodeGreek{#1}{gamma}{"0D}
+ \mgr at CodeGreek{#1}{delta}{"0E}
+ \mgr at CodeGreek{#1}{epsilon}{"0F}
+ \mgr at CodeGreek{#1}{zeta}{"10}
+ \mgr at CodeGreek{#1}{eta}{"11}
+ \mgr at CodeGreek{#1}{theta}{"12}
+ \mgr at CodeGreek{#1}{iota}{"13}
+ \mgr at CodeGreek{#1}{kappa}{"14}
+ \mgr at CodeGreek{#1}{lambda}{"15}
+ \mgr at CodeGreek{#1}{mu}{"16}
+ \mgr at CodeGreek{#1}{nu}{"17}
+ \mgr at CodeGreek{#1}{xi}{"18}
+ \mgr at CodeGreek{#1}{pi}{"19}
+ \mgr at CodeGreek{#1}{rho}{"1A}
+ \mgr at CodeGreek{#1}{sigma}{"1B}
+ \mgr at CodeGreek{#1}{tau}{"1C}
+ \mgr at CodeGreek{#1}{upsilon}{"1D}
+ \mgr at CodeGreek{#1}{phi}{"1E}
+ \mgr at CodeGreek{#1}{chi}{"1F}
+ \mgr at CodeGreek{#1}{psi}{"20}
+ \mgr at CodeGreek{#1}{omega}{"21}
+ \mgr at CodeGreek{#1}{varepsilon}{"22}
+ \mgr at CodeGreek{#1}{vartheta}{"23}
+ \mgr at CodeGreek{#1}{varpi}{"24}
+ \mgr at CodeGreek{#1}{varrho}{"25}
+ \mgr at CodeGreek{#1}{varsigma}{"26}
+ \mgr at CodeGreek{#1}{varphi}{"27}
+ %\mgr at CodeGreek{#1}{varkappa}{"FE}
+ \fi\fi\fi
+}
+
+\newcommand\mgr at DefaultGreeks{%
+ \ifmathgreeks at uppercase
+ \ifmathgreeks at Greekup
+ \let\Gamma\upGamma
+ \let\Delta\upDelta
+ \let\Theta\upTheta
+ \let\Lambda\upLambda
+ \let\Xi\upXi
+ \let\Pi\upPi
+ \let\Sigma\upSigma
+ \let\Upsilon\upUpsilon
+ \let\Phi\upPhi
+ \let\Psi\upPsi
+ \let\Omega\upOmega
+ \else
+ \let\Gamma\itGamma
+ \let\Delta\itDelta
+ \let\Theta\itTheta
+ \let\Lambda\itLambda
+ \let\Xi\itXi
+ \let\Pi\itPi
+ \let\Sigma\itSigma
+ \let\Upsilon\itUpsilon
+ \let\Phi\itPhi
+ \let\Psi\itPsi
+ \let\Omega\itOmega
+ \fi\fi
+ \ifmathgreeks at lowercase
+ \ifmathgreeks at greekup
+ \let\alpha\upalpha
+ \let\beta\upbeta
+ \let\gamma\upgamma
+ \let\delta\updelta
+ \let\epsilon\upepsilon
+ \let\zeta\upzeta
+ \let\eta\upeta
+ \let\theta\uptheta
+ \let\iota\upiota
+ \let\kappa\upkappa
+ \let\lambda\uplambda
+ \let\mu\upmu
+ \let\nu\upnu
+ \let\xi\upxi
+ \let\pi\uppi
+ \let\rho\uprho
+ \let\sigma\upsigma
+ \let\tau\uptau
+ \let\upsilon\upupsilon
+ \let\phi\upphi
+ \let\chi\upchi
+ \let\psi\uppsi
+ \let\omega\upomega
+ \let\varepsilon\upvarepsilon
+ \let\vartheta\upvartheta
+ \let\varpi\upvarpi
+ \let\varrho\upvarrho
+ \let\varsigma\upvarsigma
+ \let\varphi\upvarphi
+ \else
+ \let\alpha\italpha
+ \let\beta\itbeta
+ \let\gamma\itgamma
+ \let\delta\itdelta
+ \let\epsilon\itepsilon
+ \let\zeta\itzeta
+ \let\eta\iteta
+ \let\theta\ittheta
+ \let\iota\itiota
+ \let\kappa\itkappa
+ \let\lambda\itlambda
+ \let\mu\itmu
+ \let\nu\itnu
+ \let\xi\itxi
+ \let\pi\itpi
+ \let\rho\itrho
+ \let\sigma\itsigma
+ \let\tau\ittau
+ \let\upsilon\itupsilon
+ \let\phi\itphi
+ \let\chi\itchi
+ \let\psi\itpsi
+ \let\omega\itomega
+ \let\varepsilon\itvarepsilon
+ \let\vartheta\itvartheta
+ \let\varpi\itvarpi
+ \let\varrho\itvarrho
+ \let\varsigma\itvarsigma
+ \let\varphi\itvarphi
+ \fi\fi
+}
+
+\providecommand\SaveGreeks{%
+ \let\backGamma\Gamma
+ \let\backDelta\Delta
+ \let\backTheta\Theta
+ \let\backLambda\Lambda
+ \let\backXi\Xi
+ \let\backPi\Pi
+ \let\backSigma\Sigma
+ \let\backUpsilon\Upsilon
+ \let\backPhi\Phi
+ \let\backPsi\Psi
+ \let\backOmega\Omega
+ \let\backalpha\alpha
+ \let\backbeta\beta
+ \let\backgamma\gamma
+ \let\backdelta\delta
+ \let\backepsilon\epsilon
+ \let\backzeta\zeta
+ \let\backeta\eta
+ \let\backtheta\theta
+ \let\backiota\iota
+ \let\backkappa\kappa
+ \let\backlambda\lambda
+ \let\backmu\mu
+ \let\backnu\nu
+ \let\backxi\xi
+ \let\backpi\pi
+ \let\backrho\rho
+ \let\backsigma\sigma
+ \let\backtau\tau
+ \let\backupsilon\upsilon
+ \let\backphi\phi
+ \let\backchi\chi
+ \let\backpsi\psi
+ \let\backomega\omega
+ \let\backvarepsilon\varepsilon
+ \let\backvartheta\vartheta
+ \let\backvarpi\varpi
+ \let\backvarrtho\varrho
+ \let\backvarsigma\varsigma
+ \let\backvarphi\varphi
+}
+
+
+%%%%%%%%%%%%%% Macros for changing font dynamically %%%%%%%%%%%%%
+
+\newif\ifmgrfont at unicodemath
+\define at key{mgrfont}{unicode-math}[Latin Modern Math]{%
+ \def\mgrfont at unicodemath{#1}\mgrfont at unicodemathtrue}
+\newif\ifmgrfont at fontspec
+\define at key{mgrfont}{fontspec}[GFS Didot]{%
+ \def\mgrfont at fontspec{#1}\mgrfont at fontspectrue}
+\define at key{mgrfont}{enc}{\def\mgrfont at enc{#1}}
+\define at key{mgrfont}{fam}{\def\mgrfont at fam{#1}}
+\newcommand*\mgrfont at series{m} % default value
+\define at key{mgrfont}{series}{\renewcommand*\mgrfont at series{#1}}
+\newcommand*\mgrfont at shape{it} % default value
+\define at key{mgrfont}{shape}{\renewcommand*\mgrfont at shape{#1}}
+
+\def\mathgreeksfont#1{%
+ \mgrfont at unicodemathfalse
+ \mgrfont at fontspecfalse
+ \renewcommand*\mgrfont at series{m}
+ \renewcommand*\mgrfont at shape{it}
+ \mathgreeks at lgrmathfalse
+ \mathgreeks at fontspecfalse
+ \mathgreeks at Symbolfalse
+ \mathgreeks at upgreekfalse
+ \setkeys{mgrfont}{#1}
+ \ifmgrfont at unicodemath
+ \setmathfont{\mgrfont at unicodemath}[range=it/{greek,Greek}]
+ \setmathfont{\mgrfont at unicodemath}[range=up/{greek,Greek}]
+ \let\mgr at UnicodeGreek\mgr at UnicodemathGreek
+ \mathgreeks at fontspectrue % for \mgr at CodeGreeks
+ \mgr at CodeGreeks{it}
+ \mgr at CodeGreeks{up}
+ \mgr at DefaultGreeks
+ \else\ifmgrfont at fontspec
+ \let\MathGreeksFont\relax
+ \newfontfamily\MathGreeksFont{\mgrfont at fontspec}
+ \let\mgr at UnicodeGreek\mgr at NewUnicodeGreek
+ \mathgreeks at fontspectrue
+ \mgr at CodeGreeks{it}
+ \mgr at CodeGreeks{up}
+ \mgr at DefaultGreeks
+ \else
+ \let\mgr at CodeGreek\mgr at NewCodeGreek
+ \ifdefstring{\mgrfont at enc}{LGR}{
+ \mathgreeks at lgrmathtrue
+ }{
+ \ifdefstring{\mgrfont at fam}{psy}{
+ \mathgreeks at Symboltrue
+ }{
+ \ifdefstring{\mgrfont at fam}{fsy}{
+ \mathgreeks at Symboltrue
+ }{
+ }}}
+ \mgr at CodeGreeks{}
+ \fi\fi
+}
+
+\def\mgr at NewCodeGreek#1#2#3{\unskip
+ \expandafter\DeclareRobustCommand\csname#1#2\endcsname
+ {\mathalpha{\text{\usefont{\mgrfont at enc}{\mgrfont at fam}
+ {\mgrfont at series}{\mgrfont at shape}\symbol{#3}}
+ }}\ignorespaces
+}
+
+\def\mgr at NewUnicodeGreek#1#2#3{\unskip % only with fontspec
+ \expandafter\DeclareRobustCommand\csname#1#2\endcsname
+ {\mathalpha{\text{\csname#1shape\endcsname%
+ \MathGreeksFont\symbol{#3}}
+ }}\ignorespaces
+}
+
+\providecommand\greektable{
+ $\begin{array}{c}
+ \begin{array}{*{23}{@{\;}c}@{\;}}
+ \alpha & \beta & \gamma & \delta & \epsilon & \zeta & \eta &
+ \theta & \iota & \kappa & \lambda & \mu & \nu & \xi & \pi &
+ \rho & \sigma & \tau & \upsilon & \phi & \chi & \psi & \omega
+ \end{array}
+ \\
+ \begin{array}{*{18}{@{\;}c}@{\;}}
+ \varepsilon & \vartheta & \varpi & \varrho & \varsigma & \varphi
+ & | &
+ \Gamma & \Delta & \Theta & \Lambda & \Xi & \Pi & \Sigma &
+ \Upsilon & \Phi & \Psi & \Omega
+ \end{array}
+ \end{array}$
+}
+
+% \end{macrocode}
+% \Finale
+\endinput
Property changes on: trunk/Master/texmf-dist/source/latex/mathgreeks/mathgreeks.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/mathgreeks/mathgreeks.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathgreeks/mathgreeks.ins (rev 0)
+++ trunk/Master/texmf-dist/source/latex/mathgreeks/mathgreeks.ins 2024-05-01 20:14:50 UTC (rev 71146)
@@ -0,0 +1,56 @@
+%%
+%% Copyright (C) 2024 by Antoine Missier <antoine.missier at ac-toulouse.fr>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/mathgreeks}
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2024 by Antoine Missier <antoine.missier at ac-toulouse.fr>
+
+This file may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3 of this license
+or (at your option) any later version. The latest version of this
+license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of LaTeX version
+2005/12/01 or later.
+
+\endpreamble
+
+\generate{\file{mathgreeks.sty}{\from{mathgreeks.dtx}{package}}}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* files into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* mathgreeks.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file *}
+\Msg{* mathgreeks.dtx through LuaLaTeX *}
+\Msg{* (or LaTeX for a shorter version). *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*************************************************************}
+
+\endbatchfile
Added: trunk/Master/texmf-dist/tex/latex/mathgreeks/mathgreeks.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mathgreeks/mathgreeks.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/mathgreeks/mathgreeks.sty 2024-05-01 20:14:50 UTC (rev 71146)
@@ -0,0 +1,715 @@
+%%
+%% This is file `mathgreeks.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% mathgreeks.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2024 by Antoine Missier <antoine.missier at ac-toulouse.fr>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[2005/12/01]
+\ProvidesPackage{mathgreeks}
+ [2024/04/30 v1.0 .dtx Math Greek letters]
+
+\RequirePackage{kvoptions}
+
+\DeclareStringOption{lgrmath}[fcm]
+\newif\ifmathgreeks at lgrmath
+\AddToKeyvalOption*{lgrmath}{\mathgreeks at lgrmathtrue}
+\DeclareStringOption{fontspec}[GFS Didot]
+\newif\ifmathgreeks at fontspec
+\AddToKeyvalOption*{fontspec}{\mathgreeks at fontspectrue}
+\newif\ifmathgreeks at unicodemath
+\define at key{mathgreeks}{unicode-math}[Latin Modern Math]{
+ \newcommand*{\mathgreeks at unicodemath}{#1}
+ \mathgreeks at unicodemathtrue}
+\DeclareStringOption{upgreek}[Symbol]
+\newif\ifmathgreeks at upgreek
+\AddToKeyvalOption*{upgreek}{\mathgreeks at upgreektrue
+ \mathgreeks at Greekuptrue\mathgreeks at greekuptrue}
+\DeclareStringOption{mathdesign}[Charter]
+\newif\ifmathgreeks at mathdesign
+\AddToKeyvalOption*{mathdesign}{\mathgreeks at mathdesigntrue}
+\DeclareBoolOption{fourier}% false by default
+\DeclareStringOption{kpfonts}[normal]
+\newif\ifmathgreeks at kpfonts
+\AddToKeyvalOption*{kpfonts}{\mathgreeks at kpfontstrue}
+\DeclareBoolOption{pxfonts}
+\DeclareBoolOption{txfonts}
+\DeclareBoolOption{libertinus}
+\DeclareBoolOption{concrete}
+\DeclareBoolOption{cmbright}
+
+\DeclareBoolOption{savegreeks}
+\DeclareBoolOption{otherfonts}
+\DeclareBoolOption[true]{lowercase}
+\DeclareBoolOption[true]{uppercase}
+
+\DeclareBoolOption[true]{Greekup}
+\DeclareBoolOption{greekup}
+\DeclareBoolOption{upright}
+\AddToKeyvalOption*{upright}{\mathgreeks at Greekuptrue
+ \mathgreeks at greekuptrue}
+\DeclareBoolOption{ISO}
+\AddToKeyvalOption*{ISO}{\mathgreeks at Greekupfalse
+ \mathgreeks at greekupfalse}
+\DeclareBoolOption{TeX}
+\AddToKeyvalOption*{TeX}{\mathgreeks at Greekuptrue
+ \mathgreeks at greekupfalse}
+\DeclareStringOption{style}
+\AddToKeyvalOption*{style}{\setkeys{mathgreeks}{\mathgreeks at style}}
+
+\DeclareDefaultOption{\PackageError{mathgreeks}{%
+ Option key `\CurrentOptionKey' undefined}{}}
+\ProcessLocalKeyvalOptions* % \setkeys is done here
+
+\RequirePackage{etoolbox} % provides \AtEndPreamble
+
+\newif\ifkp at upRm % from kpgonts, bugs if after \ifmathgreeks at kpfonts
+\newif\iflibus at sansmath % from libertinust1math
+\newif\ifmathgreeks at Symbol % for codes definition
+\newif\ifmathgreeks at itgreek % for fonts without upright shape
+\newif\ifmathgreeks at font % if font option at package call
+\mathgreeks at fonttrue
+
+%%%%%%%%%%%%%%%% INITIAL SETTINGS %%%%%%%%%%%%%%%
+
+\ifmathgreeks at otherfonts
+ \DeclareFontEncoding{LGR}{}{}
+ \DeclareFontEncoding{FML}{}{}
+ \DeclareFontSubstitution{FML}{futm}{m}{it}
+ \DeclareFontEncoding{LS1}{}{}
+ \DeclareFontSubstitution{LS1}{libertinust1math}{m}{n}
+
+ % from the upgreek package
+ \DeclareFontFamily{U}{eur}{\skewchar\font'177}
+ \DeclareFontShape{U}{eur}{m}{n}{%
+ <-6> eurm5 <6-8> eurm7 <8-> eurm10}{}
+ \DeclareFontShape{U}{eur}{b}{n}{%
+ <-6> eurb5 <6-8> eurb7 <8-> eurb10}{}
+ \DeclareFontFamily{U}{fsy}{}
+ \DeclareFontShape{U}{fsy}{m}{n}{<->s*[.9]psyr}{}
+
+\fi
+
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{lgrmath}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{fontspec}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{unicodemath}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{upgreek}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{mathdesign}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{fourier}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{kpfonts}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{pxfonts}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{txfonts}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{savegreeks}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{otherfonts}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{lowercase}
+\DisableKeyvalOption[action=warning,package=mathgreeks]{mathgreeks}{uppercase}
+
+\AtEndPreamble{\AtBeginDocument{
+ \@ifundefined{text}{\RequirePackage{amstext}}{}
+
+ \ifmathgreeks at lgrmath
+ \DeclareFontEncoding{LGR}{}{}
+ \DeclareSymbolFont{mgr at it}{LGR}{\mathgreeks at lgrmath}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{LGR}{\mathgreeks at lgrmath}{b}{it}
+ \DeclareSymbolFont{mgr at up}{LGR}{\mathgreeks at lgrmath}{m}{n}
+ \SetSymbolFont{mgr at up}{bold}{LGR}{\mathgreeks at lgrmath}{b}{n}
+
+ \else\ifmathgreeks at fontspec
+ \@ifpackageloaded{fontspec}{}{
+ \PackageError{mathgreeks}{`fontspec' or `unicodemath'
+ options need the fontspec package\MessageBreak
+ which must be run with LuaLaTeX or XeLaTeX}{}
+ }
+ \newfontfamily\MathGreeksFont{\mathgreeks at fontspec}%
+ [NFSSFamily=mgru]
+ \DeclareSymbolFont{mgr at it}{TU}{mgru}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{TU}{mgru}{b}{it}
+ \DeclareSymbolFont{mgr at up}{TU}{mgru}{m}{n}
+ \SetSymbolFont{mgr at it}{bold}{TU}{mgru}{b}{n}
+
+ \else\ifmathgreeks at unicodemath
+ \@ifpackageloaded{unicode-math}{}{
+ \PackageError{mathgreeks}{`unicodemath' option needs
+ the unicode-math package\MessageBreak
+ which must be run with LuaLaTeX or XeLaTeX}{}
+ }
+ \setmathfont{\mathgreeks at unicodemath}[range=it/{greek,Greek}]
+ \setmathfont{\mathgreeks at unicodemath}[range=up/{greek,Greek}]
+ \mathgreeks at fontspectrue % for \mgr at CodeGreeks
+ \let\mgr at UnicodeGreek\mgr at UnicodemathGreek
+
+ \else\ifmathgreeks at upgreek
+ \ifdefstring{\mathgreeks at upgreek}{Euler}{
+ \DeclareFontFamily{U}{eur}{\skewchar\font'177}
+ \DeclareFontShape{U}{eur}{m}{n}{%
+ <-6> eurm5 <6-8> eurm7 <8-> eurm10}{}
+ \DeclareFontShape{U}{eur}{b}{n}{%
+ <-6> eurb5 <6-8> eurb7 <8-> eurb10}{}
+ \DeclareSymbolFont{mgr at up}{U}{eur}{m}{n}
+ \SetSymbolFont{mgr at up}{bold}{U}{eur}{b}{n}
+ }{
+ \ifdefstring{\mathgreeks at upgreek}{Symbol}{
+ \DeclareSymbolFont{mgr at up}{U}{psy}{m}{n} % no bold face
+ \mathgreeks at Symboltrue
+ }{
+ \ifdefstring{\mathgreeks at upgreek}{Symbolsmallscale}{
+ \DeclareFontFamily{U}{fsy}{}
+ \DeclareFontShape{U}{fsy}{m}{n}{<->s*[.9]psyr}{}
+ \DeclareSymbolFont{mgr at up}{U}{fsy}{m}{n}
+ \mathgreeks at Symboltrue
+ }{
+ \PackageError{mathgreeks}{Invalid value
+ `\mathgreeks at upgreek' with `upgreek' key}{With `upgreek'
+ possible values are: Euler, Symbol, Symbolsmallscale.}
+ }}}
+
+ \else\ifmathgreeks at mathdesign
+ \ifdefstring{\mathgreeks at mathdesign}{Utopia}{
+ \DeclareSymbolFont{mgr at it}{OML}{mdput}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{mdput}{b}{it}
+ \DeclareSymbolFont{mgr at up}{OML}{mdput}{m}{n}
+ \SetSymbolFont{mgr at up}{bold}{OML}{mdput}{b}{n}
+ }{
+ \ifdefstring{\mathgreeks at mathdesign}{Garamond}{
+ \DeclareSymbolFont{mgr at it}{OML}{mdugm}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{mdugm}{b}{it}
+ \DeclareSymbolFont{mgr at up}{OML}{mdugm}{m}{n}
+ \SetSymbolFont{mgr at up}{bold}{OML}{mdugm}{b}{n}
+ }{
+ \ifdefstring{\mathgreeks at mathdesign}{Charter}{
+ \DeclareSymbolFont{mgr at it}{OML}{mdbch}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{mdbch}{b}{it}
+ \DeclareSymbolFont{mgr at up}{OML}{mdbch}{m}{n}
+ \SetSymbolFont{mgr at up}{bold}{OML}{mdbch}{b}{n}
+ }{
+ \PackageError{mathgreeks}{Invalid value
+ `\mathgreeks at mathdesign' with `mathdesign' key}{With
+ `mathdesign' possible values are:
+ Utopia, Garamond, Charter.}
+ }}}
+
+ \else\ifmathgreeks at fourier
+ \DeclareFontEncoding{FML}{}{}
+ \DeclareFontSubstitution{FML}{futm}{m}{it}
+ \DeclareSymbolFont{mgr at it}{FML}{futmi}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{FML}{futmi}{b}{it}
+ \DeclareSymbolFont{mgr at up}{FML}{futm}{m}{it}
+ \SetSymbolFont{mgr at up}{bold}{FML}{futm}{b}{it}
+
+ \else\ifmathgreeks at kpfonts
+ \ifdefstring{\mathgreeks at kpfonts}{normal}{
+ \DeclareSymbolFont{mgr at it}{OML}{jkp}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{jkp}{bx}{it}
+ \DeclareSymbolFont{mgr at up}{U}{jkpmia}{m}{it}
+ \SetSymbolFont{mgr at up}{bold}{U}{jkpmia}{bx}{it}
+ }{
+ \ifdefstring{\mathgreeks at kpfonts}{light}{
+ \DeclareSymbolFont{mgr at it}{OML}{jkpl}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{jkpl}{bx}{it}
+ \DeclareSymbolFont{mgr at up}{U}{jkplmia}{m}{it}
+ \SetSymbolFont{mgr at up}{bold}{U}{jkplmia}{bx}{it}
+ }{
+ \PackageError{mathgreeks}{Invalid value
+ `\mathgreeks at kpfonts' with `kpfonts' key}{With
+ `kpfonts' possible values are: normal, light.}
+ }}
+
+ \else\ifmathgreeks at pxfonts % no font option specified
+ \DeclareSymbolFont{mgr at it}{OML}{pxmi}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{pxmi}{bx}{it}
+ \DeclareSymbolFont{mgr at up}{U}{pxmia}{m}{it}
+ \SetSymbolFont{mgr at up}{bold}{U}{pxmia}{bx}{it}
+
+ \else\ifmathgreeks at txfonts
+ \DeclareSymbolFont{mgr at it}{OML}{txmi}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{txmi}{bx}{it}
+ \DeclareSymbolFont{mgr at up}{U}{txmia}{m}{it}
+ \SetSymbolFont{mgr at up}{bold}{U}{txmia}{bx}{it}
+
+ \else\ifmathgreeks at libertinus
+ \DeclareFontEncoding{LS1}{}{}
+ \DeclareFontSubstitution{LS1}{libertinust1math}{m}{n}
+ \DeclareSymbolFont{mgr at it}{LS1}{libertinust1math}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{LS1}{libertinust1math}{m}{it}
+ \DeclareSymbolFont{mgr at up}{LS1}{libertinust1math}{m}{n}
+ \SetSymbolFont{mgr at up}{bold}{LS1}{libertinust1math}{m}{n}
+
+ \else\ifmathgreeks at concrete
+ \DeclareSymbolFont{mgr at it}{OML}{ccm}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{ccm}{b}{it}
+ \mathgreeks at itgreektrue
+
+ \else\ifmathgreeks at cmbright
+ \DeclareSymbolFont{mgr at it}{OML}{cmbrm}{m}{it}
+ \SetSymbolFont{mgr at it}{bold}{OML}{cmbrm}{b}{it}
+ \mathgreeks at itgreektrue
+
+ \else
+ \PackageWarningNoLine{mathgreeks}{No font option specified}
+ \mathgreeks at fontfalse
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+
+ \ifmathgreeks at savegreeks \SaveGreeks \fi
+
+ \ifmathgreeks at font
+ \ifmathgreeks at upgreek
+ \mathgreeks at Greekuptrue \mathgreeks at greekuptrue
+ \PackageWarningNoLine{mathgreeks}{Commands \string \italpha,
+ \string\itbeta... \MessageBreak
+ not available with the `upgreek' option}
+ \else
+ \mgr at CodeGreeks{it}
+ \fi
+ \ifmathgreeks at itgreek
+ \mathgreeks at Greekupfalse \mathgreeks at greekupfalse
+ \PackageWarningNoLine{mathgreeks}{Commands \string \upalpha,
+ \string\upbeta... \MessageBreak
+ not available with `concrete' or 'cmbright}
+ \else
+ \mgr at CodeGreeks{up}
+ \fi
+ \mgr at DefaultGreeks
+ \fi
+}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%% MACROS %%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\setmathgreeks#1{\setkeys{mathgreeks}{#1}\unskip
+ \ifmathgreeks at upgreek
+ \mathgreeks at Greekuptrue
+ \mathgreeks at greekuptrue
+ \PackageWarning{mathgreeks}{Style is set to `upright'
+ \MessageBreak with the `upgreek' option}
+ \fi
+ \mgr at DefaultGreeks\ignorespaces
+}
+
+\def\re at DeclareMathSymbol#1#2#3#4{% from kpfonts, pxfonts, txfonts
+ \let#1=\undefined
+ \DeclareMathSymbol{#1}{#2}{#3}{#4}}
+
+
+\newcommand{\mgr at CodeGreek}[3]{% #1 = it or up
+ \expandafter\re at DeclareMathSymbol\csname#1#2\endcsname%
+ {\mathalpha}{mgr@#1}{#3}
+}
+
+\newcommand{\mgr at UnicodeGreek}[3]{%
+ \expandafter\Umathchardef\csname#1#2\endcsname="7 % mathalpha
+ \csname symmgr@#1\endcsname #3
+}
+
+\def\mgr at UnicodemathGreek#1#2#3{\unskip
+ \expandafter\DeclareRobustCommand\csname#1#2\endcsname
+ {\csname sym#1\endcsname{\symbol{#3}}}\ignorespaces
+}
+
+\newcommand{\mgr at CodeGreeks}[1]{% #1 = it or up
+ \ifmathgreeks at lgrmath % LGR encoding
+ \mgr at CodeGreek{#1}{Gamma}{71}
+ \mgr at CodeGreek{#1}{Delta}{68}
+ \mgr at CodeGreek{#1}{Theta}{74}
+ \mgr at CodeGreek{#1}{Lambda}{76}
+ \mgr at CodeGreek{#1}{Xi}{88}
+ \mgr at CodeGreek{#1}{Pi}{80}
+ \mgr at CodeGreek{#1}{Sigma}{83}
+ \mgr at CodeGreek{#1}{Upsilon}{85}
+ \mgr at CodeGreek{#1}{Phi}{70}
+ \mgr at CodeGreek{#1}{Psi}{89}
+ \mgr at CodeGreek{#1}{Omega}{87}
+ \mgr at CodeGreek{#1}{alpha}{97}
+ \mgr at CodeGreek{#1}{beta}{98}
+ \mgr at CodeGreek{#1}{gamma}{103}
+ \mgr at CodeGreek{#1}{delta}{100}
+ \mgr at CodeGreek{#1}{epsilon}{101}
+ \mgr at CodeGreek{#1}{zeta}{122}
+ \mgr at CodeGreek{#1}{eta}{104}
+ \mgr at CodeGreek{#1}{theta}{106}
+ \mgr at CodeGreek{#1}{iota}{105}
+ \mgr at CodeGreek{#1}{kappa}{107}
+ \mgr at CodeGreek{#1}{lambda}{108}
+ \mgr at CodeGreek{#1}{mu}{109}
+ \mgr at CodeGreek{#1}{nu}{110}
+ \mgr at CodeGreek{#1}{xi}{120}
+ \mgr at CodeGreek{#1}{pi}{112}
+ \mgr at CodeGreek{#1}{rho}{114}
+ \mgr at CodeGreek{#1}{sigma}{115}
+ \mgr at CodeGreek{#1}{tau}{116}
+ \mgr at CodeGreek{#1}{upsilon}{117}
+ \mgr at CodeGreek{#1}{phi}{102}
+ \mgr at CodeGreek{#1}{chi}{113}
+ \mgr at CodeGreek{#1}{psi}{121}
+ \mgr at CodeGreek{#1}{omega}{119}
+ \mgr at CodeGreek{#1}{varepsilon}{101} % = epsilon
+ \mgr at CodeGreek{#1}{vartheta}{106} % = theta
+ \mgr at CodeGreek{#1}{varpi}{112} % = pi
+ \mgr at CodeGreek{#1}{varrho}{114} % = rho
+ \mgr at CodeGreek{#1}{varsigma}{99}
+ \mgr at CodeGreek{#1}{varphi}{102} % = phi
+ \else\ifmathgreeks at fontspec % unicode encoding
+ \mgr at UnicodeGreek{#1}{Gamma}{"0393}
+ \mgr at UnicodeGreek{#1}{Delta}{"0394}
+ \mgr at UnicodeGreek{#1}{Theta}{"0398}
+ \mgr at UnicodeGreek{#1}{Lambda}{"039B}
+ \mgr at UnicodeGreek{#1}{Xi}{"039E}
+ \mgr at UnicodeGreek{#1}{Pi}{"03A0}
+ \mgr at UnicodeGreek{#1}{Sigma}{"03A3}
+ \mgr at UnicodeGreek{#1}{Upsilon}{"03A5}
+ \mgr at UnicodeGreek{#1}{Phi}{"03A6}
+ \mgr at UnicodeGreek{#1}{Psi}{"03A8}
+ \mgr at UnicodeGreek{#1}{Omega}{"03A9}
+ \mgr at UnicodeGreek{#1}{alpha}{"03B1}
+ \mgr at UnicodeGreek{#1}{beta}{"03B2}
+ \mgr at UnicodeGreek{#1}{gamma}{"03B3}
+ \mgr at UnicodeGreek{#1}{delta}{"03B4}
+ \mgr at UnicodeGreek{#1}{epsilon}{"03B5}
+ \mgr at UnicodeGreek{#1}{zeta}{"03B6}
+ \mgr at UnicodeGreek{#1}{eta}{"03B7}
+ \mgr at UnicodeGreek{#1}{theta}{"03B8}
+ \mgr at UnicodeGreek{#1}{iota}{"03B9}
+ \mgr at UnicodeGreek{#1}{kappa}{"03BA}
+ \mgr at UnicodeGreek{#1}{lambda}{"03BB}
+ \mgr at UnicodeGreek{#1}{mu}{"03BC}
+ \mgr at UnicodeGreek{#1}{nu}{"03BD}
+ \mgr at UnicodeGreek{#1}{xi}{"03BE} % not omicron
+ \mgr at UnicodeGreek{#1}{pi}{"03C0}
+ \mgr at UnicodeGreek{#1}{rho}{"03C1}
+ \mgr at UnicodeGreek{#1}{sigma}{"03C3}
+ \mgr at UnicodeGreek{#1}{tau}{"03C4}
+ \mgr at UnicodeGreek{#1}{upsilon}{"03C5}
+ \mgr at UnicodeGreek{#1}{phi}{"03C6}
+ \mgr at UnicodeGreek{#1}{chi}{"03C7}
+ \mgr at UnicodeGreek{#1}{psi}{"03C8}
+ \mgr at UnicodeGreek{#1}{omega}{"03C9}
+ \mgr at UnicodeGreek{#1}{varepsilon}{"03F5}
+ \mgr at UnicodeGreek{#1}{vartheta}{"03D1}
+ \mgr at UnicodeGreek{#1}{varpi}{"03D6}
+ \mgr at UnicodeGreek{#1}{varrho}{"03F1}
+ \mgr at UnicodeGreek{#1}{varsigma}{"03C2}
+ \mgr at UnicodeGreek{#1}{varphi}{"03D5}
+ \else\ifmathgreeks at Symbol % Symbol encoding
+ \mgr at CodeGreek{#1}{Gamma}{`G}
+ \mgr at CodeGreek{#1}{Delta}{`D}
+ \mgr at CodeGreek{#1}{Theta}{`Q}
+ \mgr at CodeGreek{#1}{Lambda}{`L}
+ \mgr at CodeGreek{#1}{Xi}{`X}
+ \mgr at CodeGreek{#1}{Pi}{`P}
+ \mgr at CodeGreek{#1}{Sigma}{`S}
+ \mgr at CodeGreek{#1}{Upsilon}{`U}
+ \mgr at CodeGreek{#1}{Phi}{`F}
+ \mgr at CodeGreek{#1}{Psi}{`Y}
+ \mgr at CodeGreek{#1}{Omega}{`W}
+ \mgr at CodeGreek{#1}{alpha}{`a}
+ \mgr at CodeGreek{#1}{beta}{`b}
+ \mgr at CodeGreek{#1}{gamma}{`g}
+ \mgr at CodeGreek{#1}{delta}{`d}
+ \mgr at CodeGreek{#1}{epsilon}{`e}
+ \mgr at CodeGreek{#1}{zeta}{`z}
+ \mgr at CodeGreek{#1}{eta}{`h}
+ \mgr at CodeGreek{#1}{theta}{`q}
+ \mgr at CodeGreek{#1}{iota}{`i}
+ \mgr at CodeGreek{#1}{kappa}{`k}
+ \mgr at CodeGreek{#1}{lambda}{`l}
+ \mgr at CodeGreek{#1}{mu}{`m}
+ \mgr at CodeGreek{#1}{nu}{`n}
+ \mgr at CodeGreek{#1}{xi}{`x}
+ \mgr at CodeGreek{#1}{pi}{`p}
+ \mgr at CodeGreek{#1}{rho}{`r}
+ \mgr at CodeGreek{#1}{sigma}{`s}
+ \mgr at CodeGreek{#1}{tau}{`t}
+ \mgr at CodeGreek{#1}{upsilon}{`u}
+ \mgr at CodeGreek{#1}{phi}{`f}
+ \mgr at CodeGreek{#1}{chi}{`c}
+ \mgr at CodeGreek{#1}{psi}{`y}
+ \mgr at CodeGreek{#1}{omega}{`w}
+ \mgr at CodeGreek{#1}{varepsilon}{`u} % = epsilon
+ \mgr at CodeGreek{#1}{vartheta}{`J}
+ \mgr at CodeGreek{#1}{varpi}{`v}
+ \mgr at CodeGreek{#1}{varrho}{`r} % = rho
+ \mgr at CodeGreek{#1}{varsigma}{`s} % = sigma
+ \mgr at CodeGreek{#1}{varphi}{`j}
+ \else % OML (or U) encoding
+ \mgr at CodeGreek{#1}{Gamma}{"00}
+ \mgr at CodeGreek{#1}{Delta}{"01}
+ \mgr at CodeGreek{#1}{Theta}{"02}
+ \mgr at CodeGreek{#1}{Lambda}{"03}
+ \mgr at CodeGreek{#1}{Xi}{"04}
+ \mgr at CodeGreek{#1}{Pi}{"05}
+ \mgr at CodeGreek{#1}{Sigma}{"06}
+ \mgr at CodeGreek{#1}{Upsilon}{"07}
+ \mgr at CodeGreek{#1}{Phi}{"08}
+ \mgr at CodeGreek{#1}{Psi}{"09}
+ \mgr at CodeGreek{#1}{Omega}{"0A}
+ \mgr at CodeGreek{#1}{alpha}{"0B}
+ \mgr at CodeGreek{#1}{beta}{"0C}
+ \mgr at CodeGreek{#1}{gamma}{"0D}
+ \mgr at CodeGreek{#1}{delta}{"0E}
+ \mgr at CodeGreek{#1}{epsilon}{"0F}
+ \mgr at CodeGreek{#1}{zeta}{"10}
+ \mgr at CodeGreek{#1}{eta}{"11}
+ \mgr at CodeGreek{#1}{theta}{"12}
+ \mgr at CodeGreek{#1}{iota}{"13}
+ \mgr at CodeGreek{#1}{kappa}{"14}
+ \mgr at CodeGreek{#1}{lambda}{"15}
+ \mgr at CodeGreek{#1}{mu}{"16}
+ \mgr at CodeGreek{#1}{nu}{"17}
+ \mgr at CodeGreek{#1}{xi}{"18}
+ \mgr at CodeGreek{#1}{pi}{"19}
+ \mgr at CodeGreek{#1}{rho}{"1A}
+ \mgr at CodeGreek{#1}{sigma}{"1B}
+ \mgr at CodeGreek{#1}{tau}{"1C}
+ \mgr at CodeGreek{#1}{upsilon}{"1D}
+ \mgr at CodeGreek{#1}{phi}{"1E}
+ \mgr at CodeGreek{#1}{chi}{"1F}
+ \mgr at CodeGreek{#1}{psi}{"20}
+ \mgr at CodeGreek{#1}{omega}{"21}
+ \mgr at CodeGreek{#1}{varepsilon}{"22}
+ \mgr at CodeGreek{#1}{vartheta}{"23}
+ \mgr at CodeGreek{#1}{varpi}{"24}
+ \mgr at CodeGreek{#1}{varrho}{"25}
+ \mgr at CodeGreek{#1}{varsigma}{"26}
+ \mgr at CodeGreek{#1}{varphi}{"27}
+ %\mgr at CodeGreek{#1}{varkappa}{"FE}
+ \fi\fi\fi
+}
+
+\newcommand\mgr at DefaultGreeks{%
+ \ifmathgreeks at uppercase
+ \ifmathgreeks at Greekup
+ \let\Gamma\upGamma
+ \let\Delta\upDelta
+ \let\Theta\upTheta
+ \let\Lambda\upLambda
+ \let\Xi\upXi
+ \let\Pi\upPi
+ \let\Sigma\upSigma
+ \let\Upsilon\upUpsilon
+ \let\Phi\upPhi
+ \let\Psi\upPsi
+ \let\Omega\upOmega
+ \else
+ \let\Gamma\itGamma
+ \let\Delta\itDelta
+ \let\Theta\itTheta
+ \let\Lambda\itLambda
+ \let\Xi\itXi
+ \let\Pi\itPi
+ \let\Sigma\itSigma
+ \let\Upsilon\itUpsilon
+ \let\Phi\itPhi
+ \let\Psi\itPsi
+ \let\Omega\itOmega
+ \fi\fi
+ \ifmathgreeks at lowercase
+ \ifmathgreeks at greekup
+ \let\alpha\upalpha
+ \let\beta\upbeta
+ \let\gamma\upgamma
+ \let\delta\updelta
+ \let\epsilon\upepsilon
+ \let\zeta\upzeta
+ \let\eta\upeta
+ \let\theta\uptheta
+ \let\iota\upiota
+ \let\kappa\upkappa
+ \let\lambda\uplambda
+ \let\mu\upmu
+ \let\nu\upnu
+ \let\xi\upxi
+ \let\pi\uppi
+ \let\rho\uprho
+ \let\sigma\upsigma
+ \let\tau\uptau
+ \let\upsilon\upupsilon
+ \let\phi\upphi
+ \let\chi\upchi
+ \let\psi\uppsi
+ \let\omega\upomega
+ \let\varepsilon\upvarepsilon
+ \let\vartheta\upvartheta
+ \let\varpi\upvarpi
+ \let\varrho\upvarrho
+ \let\varsigma\upvarsigma
+ \let\varphi\upvarphi
+ \else
+ \let\alpha\italpha
+ \let\beta\itbeta
+ \let\gamma\itgamma
+ \let\delta\itdelta
+ \let\epsilon\itepsilon
+ \let\zeta\itzeta
+ \let\eta\iteta
+ \let\theta\ittheta
+ \let\iota\itiota
+ \let\kappa\itkappa
+ \let\lambda\itlambda
+ \let\mu\itmu
+ \let\nu\itnu
+ \let\xi\itxi
+ \let\pi\itpi
+ \let\rho\itrho
+ \let\sigma\itsigma
+ \let\tau\ittau
+ \let\upsilon\itupsilon
+ \let\phi\itphi
+ \let\chi\itchi
+ \let\psi\itpsi
+ \let\omega\itomega
+ \let\varepsilon\itvarepsilon
+ \let\vartheta\itvartheta
+ \let\varpi\itvarpi
+ \let\varrho\itvarrho
+ \let\varsigma\itvarsigma
+ \let\varphi\itvarphi
+ \fi\fi
+}
+
+\providecommand\SaveGreeks{%
+ \let\backGamma\Gamma
+ \let\backDelta\Delta
+ \let\backTheta\Theta
+ \let\backLambda\Lambda
+ \let\backXi\Xi
+ \let\backPi\Pi
+ \let\backSigma\Sigma
+ \let\backUpsilon\Upsilon
+ \let\backPhi\Phi
+ \let\backPsi\Psi
+ \let\backOmega\Omega
+ \let\backalpha\alpha
+ \let\backbeta\beta
+ \let\backgamma\gamma
+ \let\backdelta\delta
+ \let\backepsilon\epsilon
+ \let\backzeta\zeta
+ \let\backeta\eta
+ \let\backtheta\theta
+ \let\backiota\iota
+ \let\backkappa\kappa
+ \let\backlambda\lambda
+ \let\backmu\mu
+ \let\backnu\nu
+ \let\backxi\xi
+ \let\backpi\pi
+ \let\backrho\rho
+ \let\backsigma\sigma
+ \let\backtau\tau
+ \let\backupsilon\upsilon
+ \let\backphi\phi
+ \let\backchi\chi
+ \let\backpsi\psi
+ \let\backomega\omega
+ \let\backvarepsilon\varepsilon
+ \let\backvartheta\vartheta
+ \let\backvarpi\varpi
+ \let\backvarrtho\varrho
+ \let\backvarsigma\varsigma
+ \let\backvarphi\varphi
+}
+
+%%%%%%%%%%%%%% Macros for changing font dynamically %%%%%%%%%%%%%
+
+\newif\ifmgrfont at unicodemath
+\define at key{mgrfont}{unicode-math}[Latin Modern Math]{%
+ \def\mgrfont at unicodemath{#1}\mgrfont at unicodemathtrue}
+\newif\ifmgrfont at fontspec
+\define at key{mgrfont}{fontspec}[GFS Didot]{%
+ \def\mgrfont at fontspec{#1}\mgrfont at fontspectrue}
+\define at key{mgrfont}{enc}{\def\mgrfont at enc{#1}}
+\define at key{mgrfont}{fam}{\def\mgrfont at fam{#1}}
+\newcommand*\mgrfont at series{m} % default value
+\define at key{mgrfont}{series}{\renewcommand*\mgrfont at series{#1}}
+\newcommand*\mgrfont at shape{it} % default value
+\define at key{mgrfont}{shape}{\renewcommand*\mgrfont at shape{#1}}
+
+\def\mathgreeksfont#1{%
+ \mgrfont at unicodemathfalse
+ \mgrfont at fontspecfalse
+ \renewcommand*\mgrfont at series{m}
+ \renewcommand*\mgrfont at shape{it}
+ \mathgreeks at lgrmathfalse
+ \mathgreeks at fontspecfalse
+ \mathgreeks at Symbolfalse
+ \mathgreeks at upgreekfalse
+ \setkeys{mgrfont}{#1}
+ \ifmgrfont at unicodemath
+ \setmathfont{\mgrfont at unicodemath}[range=it/{greek,Greek}]
+ \setmathfont{\mgrfont at unicodemath}[range=up/{greek,Greek}]
+ \let\mgr at UnicodeGreek\mgr at UnicodemathGreek
+ \mathgreeks at fontspectrue % for \mgr at CodeGreeks
+ \mgr at CodeGreeks{it}
+ \mgr at CodeGreeks{up}
+ \mgr at DefaultGreeks
+ \else\ifmgrfont at fontspec
+ \let\MathGreeksFont\relax
+ \newfontfamily\MathGreeksFont{\mgrfont at fontspec}
+ \let\mgr at UnicodeGreek\mgr at NewUnicodeGreek
+ \mathgreeks at fontspectrue
+ \mgr at CodeGreeks{it}
+ \mgr at CodeGreeks{up}
+ \mgr at DefaultGreeks
+ \else
+ \let\mgr at CodeGreek\mgr at NewCodeGreek
+ \ifdefstring{\mgrfont at enc}{LGR}{
+ \mathgreeks at lgrmathtrue
+ }{
+ \ifdefstring{\mgrfont at fam}{psy}{
+ \mathgreeks at Symboltrue
+ }{
+ \ifdefstring{\mgrfont at fam}{fsy}{
+ \mathgreeks at Symboltrue
+ }{
+ }}}
+ \mgr at CodeGreeks{}
+ \fi\fi
+}
+
+\def\mgr at NewCodeGreek#1#2#3{\unskip
+ \expandafter\DeclareRobustCommand\csname#1#2\endcsname
+ {\mathalpha{\text{\usefont{\mgrfont at enc}{\mgrfont at fam}
+ {\mgrfont at series}{\mgrfont at shape}\symbol{#3}}
+ }}\ignorespaces
+}
+
+\def\mgr at NewUnicodeGreek#1#2#3{\unskip % only with fontspec
+ \expandafter\DeclareRobustCommand\csname#1#2\endcsname
+ {\mathalpha{\text{\csname#1shape\endcsname%
+ \MathGreeksFont\symbol{#3}}
+ }}\ignorespaces
+}
+
+\providecommand\greektable{
+ $\begin{array}{c}
+ \begin{array}{*{23}{@{\;}c}@{\;}}
+ \alpha & \beta & \gamma & \delta & \epsilon & \zeta & \eta &
+ \theta & \iota & \kappa & \lambda & \mu & \nu & \xi & \pi &
+ \rho & \sigma & \tau & \upsilon & \phi & \chi & \psi & \omega
+ \end{array}
+ \\
+ \begin{array}{*{18}{@{\;}c}@{\;}}
+ \varepsilon & \vartheta & \varpi & \varrho & \varsigma & \varphi
+ & | &
+ \Gamma & \Delta & \Theta & \Lambda & \Xi & \Pi & \Sigma &
+ \Upsilon & \Phi & \Psi & \Omega
+ \end{array}
+ \end{array}$
+}
+
+\endinput
+%%
+%% End of file `mathgreeks.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex/mathgreeks/mathgreeks.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2024-05-01 20:13:51 UTC (rev 71145)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2024-05-01 20:14:50 UTC (rev 71146)
@@ -548,7 +548,8 @@
matapli matc3 matc3mem match_parens
math-into-latex-4 mathabx mathabx-type1 mathalpha mathastext
mathcommand mathcomp mathdesign mathdots mathexam
- mathfam256 mathfixs mathfont mathlig mathpartir mathpazo mathpunctspace
+ mathfam256 mathfixs mathfont mathgreeks
+ mathlig mathpartir mathpazo mathpunctspace
mathsemantics mathspec mathtools matlab-prettifier mathspic maths-symbols
matrix-skeleton mattens maybemath maze
mcaption mceinleger mcexam mcf2graph mcite mciteplus mcmthesis
Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2024-05-01 20:13:51 UTC (rev 71145)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc 2024-05-01 20:14:50 UTC (rev 71146)
@@ -883,6 +883,7 @@
depend mathexam
depend mathfam256
depend mathfont
+depend mathgreeks
depend maybemath
depend mcaption
depend mceinleger
Added: trunk/Master/tlpkg/tlpsrc/mathgreeks.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.