summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/metalogox/metalogox.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/metalogox/metalogox.dtx')
-rw-r--r--macros/latex/contrib/metalogox/metalogox.dtx117
1 files changed, 102 insertions, 15 deletions
diff --git a/macros/latex/contrib/metalogox/metalogox.dtx b/macros/latex/contrib/metalogox/metalogox.dtx
index b036b6685f..471107229a 100644
--- a/macros/latex/contrib/metalogox/metalogox.dtx
+++ b/macros/latex/contrib/metalogox/metalogox.dtx
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{metalogox}
-%<package> [2024/01/12 v1.02 Extends the metalogo package with font detection.]
+%<package> [2024/01/19 v1.03 Extends the metalogo package with font detection.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -127,6 +127,7 @@ pageanchor=true,
\usepackage{\mypackagename}
+\makeatletter
\newcommand*{\onetex}[3]{%
\usefont{T1}{#1}{m}{#3}%
\adjustlogos{default}%
@@ -136,6 +137,7 @@ pageanchor=true,
\autoadjustlogos%
\LaTeXe \\
}
+\makeatother
\newcommand*{\textblue}[1]{\textcolor{blue!70!black}{#1}}
@@ -158,6 +160,10 @@ pageanchor=true,
% \changes{v1.01}{2023/01/03}{\ 2023/01/03}
% \changes{v1.02}{2024/01/12}{Updated contact info.}
% \changes{v1.02}{2024/01/12}{\ 2024/01/12}
+% \changes{v1.03}{2024/01/18}{Improved TOC change log and index entries.}
+% \changes{v1.03}{2024/01/18}{Added Atkinson Hyperlegible, Charis SIL, Cuprum,
+% Eczar, Ibarra, Inria, Inter, MLModern, Nunito, Oswald.}
+% \changes{v1.03}{2024/01/19}{2024/01/19}
@@ -192,11 +198,11 @@ pageanchor=true,
% Font & Default & \pkg{metalogox} \\ \midrule
% Latin Modern & \onetex{lmr}{lmodern}{n}
% Erewhon & \onetex{erewhon-TLF}{utopia}{n}
-% Libre Caslon & \onetex{LibreCaslonText-TLF}{baskerville}{n}
+% Libre Caslon & \onetex{LibreCsln-TLF}{baskerville}{n}
% IM Fell English & \onetex{IMFELLEnglish-TLF}{baskerville}{n}
% Coelacanth & \onetex{Coelacanth-TLF}{coelacanth}{n}
% Alegreya & \onetex{Alegreya-TLF}{alegreya}{n}
-% Helvetica & \onetex{phv}{helvetica}{sf}
+% Helvetica & \onetex{phv}{helvetica}{n}
% Antiqua & \onetex{uaq}{antiqua}{n}
% \bottomrule
% \end{tabular}
@@ -342,10 +348,23 @@ pageanchor=true,
%
% \item Since the same settings are usually shared by many fonts,
% some logos may not be perfect.
+%
+% \item If a font is not known by \pkg{metalogox} then a warning is issued,
+% and a few common options are recommended.
+%
+% \item Please contact the author of \pkg{metalogox} if an unknown font is found,
+% \margintag{Unknown font?}
+% especially if it is a common font, as sometimes the font family names
+% are changed. See the contact link on the title page of this document.
% \end{itemize}
%
%
-% \StopEventually{\PrintChanges\PrintIndex}
+% \StopEventually{
+% \appendix
+% \GlossaryPrologue{\section{Change History}}
+% \PrintChanges
+% \IndexPrologue{\section{Index}}
+% \PrintIndex}
%
% \clearpage
%
@@ -1149,6 +1168,14 @@ pageanchor=true,
%
% \subsection{Font detection}
%
+
+% \DescribeBoolean{MLX@@foundfont} Found the font?
+% \changes{v1.03}{2024/01/18}{Warning if font was not found.}
+% \begin{macrocode}
+\newbool{MLX@@foundfont}
+% \end{macrocode}
+
+
% \begin{macro}{\MLX@@detectvariant}
% \marg{1: family} \marg{2: variant} \marg{3: name} \marg{4: setting}
%
@@ -1156,9 +1183,11 @@ pageanchor=true,
%
% (The doubled |@| is to distinguish this from a valid \pkg{metalogox} option.)
%
+% \changes{v1.03}{2024/01/18}{Warning if font was not found.}
% \begin{macrocode}
\newcommand*{\MLX@@detectvariant}[4]{%
\ifdefstring{\MLX@@thisfont}{#1#2}{%
+ \booltrue{MLX@@foundfont}%
\PackageInfo{metalogox}{Detected #1#2, #3. Using #4}%
\adjustlogos{#4}%
}{}%
@@ -1185,6 +1214,7 @@ pageanchor=true,
\MLX@@detectvariant{#1}{Condensed-OsF}{#2}{#3}%
\MLX@@detectvariant{#1}{Condensed-TOsF}{#2}{#3}%
\MLX@@detectvariant{#1}{(0)}{#2}{#3}%
+\MLX@@detectvariant{#1}{(1)}{#2}{#3}%
}
% \end{macrocode}
% \end{macro}
@@ -1196,6 +1226,12 @@ pageanchor=true,
% \begin{macrocode}
\NewDocumentCommand{\autoadjustlogos}{s}{%
% \end{macrocode}
+%
+% Not yet discovered the font:
+% \begin{macrocode}
+\boolfalse{MLX@@foundfont}%
+% \end{macrocode}
+%
% If starred, use the text body font, else use the local font:
% \begin{macrocode}
\IfBooleanTF{#1}{%
@@ -1204,15 +1240,19 @@ pageanchor=true,
\edef\MLX@@thisfont{\f@family}%
}%
% \end{macrocode}
+%
% Announce the desired font:
% \begin{macrocode}
\PackageInfo{metalogox}{Searching for \MLX@@thisfont}%
% \end{macrocode}
+%
% Default if nothing is found:
% \begin{macrocode}
\adjustlogos{lmodern}%
% \end{macrocode}
+%
% Seach a list of possibilities:
+% \changes{v1.03}{2024/01/19}{Updated many fonts for changed family names.}
% \begin{macrocode}
\MLX@@detectone{AccanthisADFStdNoThree}{accanthis}{accanthis}%
\MLX@@detectone{AccanthisADFStdNo3}{accanthis}{accanthis}%
@@ -1224,8 +1264,12 @@ pageanchor=true,
\MLX@@detectone{AntykwaPoltawskiego}{antpolt}{antpolt}%
\MLX@@detectone{antt}{anttor}{antpolt}%%
\MLX@@detectone{AntykwaTorunska}{anttor}{antpolt}%
+\MLX@@detectone{ArchivZero-OsF}{Archiv0}{helvetica}%
+\MLX@@detectone{Archiv0(0)}{Archiv0}{helvetica}%
\MLX@@detectone{fav}{arev}{vera}%
\MLX@@detectone{Arimo}{Arimo}{helvetica}%
+\MLX@@detectone{atkinsn-LF}{Atkinson Hyperlegible}{helvetica}%
+\MLX@@detectone{AtkinsonHyperlegible(0)}{Atkinson Hyperlegible}{helvetica}%
\MLX@@detectone{pag}{Avant Garde}{avantgarde}%
\MLX@@detectone{qag}{tgadventor}{avantgarde}%
\MLX@@detectone{ybv}{baskervald}{baskerville}%
@@ -1243,14 +1287,17 @@ pageanchor=true,
\MLX@@detectone{Cabin}{Cabin}{helvetica}%
\MLX@@detectone{CabinCondensed}{CabinCondensed}{helvetica}%
\MLX@@detectone{Caladea}{caladea}{baskerville}%
-\MLX@@detectone{fca}{cantarell}{helvetica}%
+\MLX@@detectone{cantarell}{cantarell}{helvetica}%
+\MLX@@detectone{Crlt}{Carlito}{crimson}%
\MLX@@detectone{Carlito}{Carlito}{crimson}%
+\MLX@@detectone{charssil}{CharisSIL}{times}%
+\MLX@@detectone{CharisSIL}{CharisSIL}{times}%
\MLX@@detectone{mdbch}{mdbch - Math Design Bitstream Charter}{charter}%
\MLX@@detectone{Chivo}{Chivo}{helvetica}%
\MLX@@detectone{ClearSans}{Clear Sans}{helvetica}%
\MLX@@detectone{Cochineal}{cochineal}{baskerville}%
\MLX@@detectone{Coelacanth}{coelacanth}{coelacanth}%
-\MLX@@detectone{fco}{comfortaa}{avantgarde}%
+\MLX@@detectone{comfortaa}{comfortaa}{avantgarde}%
\MLX@@detectone{ComicNeue}{comicneue}{avantgarde}%
\MLX@@detectone{cmbr}{Computer Modern Bright}{lmodern}%
\MLX@@detectone{lcmss}{Computer Modern Sans Quote}{lmodern}%
@@ -1260,17 +1307,20 @@ pageanchor=true,
\MLX@@detectone{CormorantGaramond}{CormorantGaramond}{garamond}%
\MLX@@detectone{Crimson}{crimson}{crimson}%
\MLX@@detectone{CrimsonPro}{CrimsonPro}{crimson}%
-% cyklop: default
+\MLX@@detectone{cpr}{Cuprum}{utopia}%
+\MLX@@detectone{Cuprum(0)}{Cuprum}{utopia}%
+\MLX@@detectone{cyklop}{Cyklop}{lmodern}%
\MLX@@detectone{DejaVuSerif}{DejaVuSerif}{vera}%
\MLX@@detectone{DejaVuSerifCondensed}{DejaVuSerif Condensed}{vera}%
\MLX@@detectone{DejaVuSans}{DejaVuSans}{verasans}%
-% drm: default
-\MLX@@detectone{fdr}{Droid Serif}{droidserif}%%
-\MLX@@detectone{fds}{Droid Sans}{droidsans}%%
+\MLX@@detectone{drm}{DRM}{lmodern}%
+\MLX@@detectone{droidserif}{Droid Serif}{droidserif}%%
+\MLX@@detectone{droidsans}{Droid Sans}{droidsans}%%
\MLX@@detectone{DroidSerif}{Droid Serif}{droidserif}%%
\MLX@@detectone{DroidSans}{Droid Sans}{droidsans}%%
\MLX@@detectone{EBGaramond}{EB Garamond}{garamond}%
\MLX@@detectone{EBGaramond12}{EB Garamond}{garamond}%
+\MLX@@detectone{Eczar(0)}{Eczar}{times}%
\MLX@@detectone{erewhon}{erewhon}{utopia}%
\MLX@@detectone{Erewhon-Regular}{erewhon}{utopia}%
\MLX@@detectone{fbb}{fbb}{baskerville}%
@@ -1283,12 +1333,12 @@ pageanchor=true,
\MLX@@detectone{futs}{fourier}{utopia}%
\MLX@@detectone{fnc}{fouriernc}{newcent}%
\MLX@@detectone{gentium}{gentium}{gentium}%
-\MLX@@detectone{Gentium}{gentium}{gentium}%
+\MLX@@detectone{GentiumPlus}{gentium}{gentium}%
\MLX@@detectone{artemisia}{gfsartemisia}{baskerville}%
\MLX@@detectone{GFSArtemisia}{gfsartemisia}{baskerville}%
\MLX@@detectone{artemisiaeuler}{gfsartemisia}{baskerville}%
\MLX@@detectone{bodoni}{gfsbodoni}{bodoni}%
-\MLX@@detectone{GFS Bodoni}{gfsbodoni}{bodoni}%
+\MLX@@detectone{GFSBodoni}{gfsbodoni}{bodoni}%
\MLX@@detectone{udidot}{gfsdidot}{didot}%
\MLX@@detectone{FreeSerif}{GNU Freeserif}{times}%
\MLX@@detectone{FreeSans}{GNU Freesans}{helvetica}%
@@ -1303,7 +1353,12 @@ pageanchor=true,
\MLX@@detectone{phv}{helvet}{helvetica}%
\MLX@@detectone{Heuristica}{heuristica}{utopia}%
\MLX@@detectone{heuristica}{heuristica}{utopia}%
+\MLX@@detectone{IbarraRealNova-LF}{Ibarra}{times}%
+\MLX@@detectone{IbarraRealNova(0)}{Ibarra}{times}%
\MLX@@detectone{IMFELLEnglish}{imfellEnglish}{baskerville}%
+\MLX@@detectone{InriaSans}{Inria Sans}{helvetica}%
+\MLX@@detectone{InriaSerif}{Inria Serif}{baskerville}%
+\MLX@@detectone{Inter}{Inter}{helvetica}%
\MLX@@detectone{iwona}{Iwona}{helvetica}%
\MLX@@detectone{Iwona}{Iwona}{helvetica}%
\MLX@@detectone{IwonaLight}{Iwona}{helvetica}%
@@ -1368,6 +1423,7 @@ pageanchor=true,
\MLX@@detectone{jkpxos}{kpfonts}{kpfonts}%
\MLX@@detectone{jkpxosn}{kpfonts}{kpfonts}%
\MLX@@detectone{jkpxvos}{kpfonts}{kpfonts}%
+\MLX@@detectone{JosefinSans}{Josefin}{lmodern}%
\MLX@@detectone{kurier}{Kurier}{helvetica}%
\MLX@@detectone{Kurier}{Kurier}{helvetica}%
\MLX@@detectone{KurierLight}{Kurier}{helvetica}%
@@ -1380,6 +1436,8 @@ pageanchor=true,
\MLX@@detectone{lato}{Lato}{helvetica}%
\MLX@@detectone{Lato}{Lato}{helvetica}%
\MLX@@detectone{lmr}{lmodern}{lmodern}%
+\MLX@@detectone{mlmr}{MLModern}{lmodern}%
+\MLX@@detectone{mlmss}{MLModern}{lmodern}%
\MLX@@detectone{lmss}{lmodern sans}{lmodernsans}%
\MLX@@detectone{lmssq}{lmodern sans}{lmodernsans}%
\MLX@@detectone{LatinModernRoman}{Latin Modern Roman}{lmodern}%
@@ -1391,9 +1449,11 @@ pageanchor=true,
\MLX@@detectone{LibertinusSans}{libertinus-type1}{helvetica}%
\MLX@@detectone{libertinusserif}{libertinus-otf}{libertinus}%
\MLX@@detectone{libertinussans}{libertinus-otf}{helvetica}%
+\MLX@@detectone{LibreBskvl}{librebaskerville}{baskerville}%
\MLX@@detectone{LibreBaskerville}{librebaskerville}{baskerville}%
\MLX@@detectone{LibreBodoni}{LibreBodoni}{librebodoni}%
-\MLX@@detectone{LibreCaslonText}{librecaslon}{baskerville}%
+\MLX@@detectone{LibreCaslonText}{Libre Caslon}{baskerville}%
+\MLX@@detectone{LibreCsln}{Libre Caslon}{baskerville}%
\MLX@@detectone{yly}{libris}{avantgarde}%
\MLX@@detectone{llcmss}{LX Fonts}{avantgarde}%
\MLX@@detectone{ptm}{mathptmx}{times}%
@@ -1401,6 +1461,8 @@ pageanchor=true,
\MLX@@detectone{bch}{mdbch}{charter}%
\MLX@@detectone{mdput}{mdput - Math Design Utopia}{utopia}%
\MLX@@detectone{mdugm}{mdugm - Math Design URW Garamond}{baskerville}%
+\MLX@@detectone{Merriwthr}{merriweather}{merriweather}%
+\MLX@@detectone{MerriwthrSans}{merriweather}{merriweather}%
\MLX@@detectone{Merriweather}{merriweather}{merriweather}%
\MLX@@detectone{MerriweatherSans}{merriweather}{merriweather}%
\MLX@@detectone{MintSpirit}{Mint Spirit}{avantgarde}%
@@ -1410,6 +1472,7 @@ pageanchor=true,
\MLX@@detectone{MontserratAlternates}{Montserrat}{helvetica}%
\MLX@@detectone{pnc}{newcent}{newcent}%
\MLX@@detectone{zpltlf}{newpxtext}{palatino}%
+\MLX@@detectone{minntx}{newtxtext}{times}%
\MLX@@detectone{ntxtlf}{newtxtext}{times}%
\MLX@@detectone{nimbussans}{nimbussans}{helvetica}%
\MLX@@detectone{NimbusSans}{nimbusserif}{helvetica}%
@@ -1419,9 +1482,14 @@ pageanchor=true,
\MLX@@detectone{zhv}{nimbussans}{helvetica}%
\MLX@@detectone{NotoSerif}{noto}{noto}%
\MLX@@detectone{NotoSans}{noto}{noto}%
+\MLX@@detectone{Nunito-TOsF}{Nunito}{helvetica}%
+\MLX@@detectone{Nunito(0)}{Nunito}{helvetica}%
\MLX@@detectone{OldStandard}{Old Standard}{didot}%
\MLX@@detectone{fosj}{opensans}{avantgarde}%
+\MLX@@detectone{opensans}{opensans}{avantgarde}%
\MLX@@detectone{OpenSans}{Open Sans}{avantgarde}%
+\MLX@@detectone{Zeroswald}{Oswald}{utopia}%
+\MLX@@detectone{Ovrlck}{Overlock}{avantgarde}% bug with XeLaTeX%
\MLX@@detectone{Overlock}{Overlock}{avantgarde}% bug with XeLaTeX%
\MLX@@detectone{panr}{pandora}{pandora}%
\MLX@@detectone{pss}{pandora}{pandora}%
@@ -1432,6 +1500,8 @@ pageanchor=true,
\MLX@@detectone{IBMPlexSans}{plex-sans}{plexsans}%
\MLX@@detectone{pxr}{pxfonts}{palatino}%
\MLX@@detectone{pxss}{pxfonts}{helvetica}%
+\MLX@@detectone{Quattro}{quattrocento}{quattrocento}%
+\MLX@@detectone{QuattroSans}{quattrocento}{quattrocento}%
\MLX@@detectone{Quattrocento}{quattrocento}{quattrocento}%
\MLX@@detectone{QuattrocentoSans}{quattrocento}{quattrocento}%
\MLX@@detectone{Raleway}{raleway}{helvetica}%
@@ -1449,6 +1519,7 @@ pageanchor=true,
\MLX@@detectone{stix}{stix}{times}%
\MLX@@detectone{stix2}{stix2}{times}%
\MLX@@detectone{STIXTwoText}{stix2}{times}%
+\MLX@@detectone{pbk}{bookman}{bookman}%
\MLX@@detectone{qbk}{tgbonum}{bookman}%
\MLX@@detectone{qhv}{tgheros}{helvetica}%
\MLX@@detectone{qpl}{tgpagella}{palatino}%
@@ -1461,6 +1532,7 @@ pageanchor=true,
\MLX@@detectone{TeXGyreSchola}{TeX Gyre Schola}{newcent}%
\MLX@@detectone{TeXGyreTermes}{TeX Gyre Termes}{times}%
\MLX@@detectone{txr}{txfonts}{times}%
+\MLX@@detectone{txss}{txfonts}{times}%
\MLX@@detectone{UniversalisADFStd}{Universalis ADF Std}{crimson}%
\MLX@@detectone{ugq}{URW Grotesk}{crimson}%
\MLX@@detectone{put}{utopia}{utopia}%
@@ -1477,6 +1549,23 @@ pageanchor=true,
\MLX@@detectone{yvoa}{venturisold}{venturis}%
\MLX@@detectone{XCharter}{XCharter}{charter}%
\MLX@@detectone{XITS}{XITS}{times}%
+% \end{macrocode}
+%
+% Warning if font was not found:
+% \changes{v1.03}{2024/01/18}{Warning if font was not found.}
+% \begin{macrocode}
+\ifbool{MLX@@foundfont}%
+ {}%
+ {%
+ \PackageWarningNoLine{metalogox}
+ {%
+ Did not find font \MLX@@thisfont.\MessageBreak
+ To improve \string\LaTeX, and related logos:\MessageBreak%
+ \string\usepackage[option]{metalogox}\MessageBreak%
+ Common options: times, bookman for serif,\MessageBreak%
+ helvetica, avantgarde for sans%
+ }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -1512,8 +1601,6 @@ pageanchor=true,
%
% \clearpage
% ^^A \pagestyle{plain}
-% \phantomsection
-% \addcontentsline{toc}{section}{Change History and \indexname}
%
% \pagestyle{plain}
%