From 0127da95c995c0eddf17ed6f660aaf2821909d36 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sun, 26 Apr 2026 11:51:56 +0200 Subject: [PATCH 1/3] Testing `\ensuremath`. --- README.md | 2 ++ example/lualatex/Symbols.tex | 20 +++++++-------- example/lualatex/document.tex | 46 ++++++++++++++++++++++++++++++++--- pytooling.sty | 23 ++++++++++-------- 4 files changed, 68 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 3a8bd60..3e13876 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ Installed additional tools are: ### Installed Fonts * Cabin +* DejaVu * Latin Modern (LM) * Libertinus (optimized `Linux Libertine` for LuaLaTeX) * [URW Type Foundy](https://en.wikipedia.org/wiki/URW_Type_Foundry) @@ -92,6 +93,7 @@ Installed additional tools are: * Nimbus Sans (`Helvetica` clone) * Nimbus Roman (`Times New Roman` clone) * ~~Palladio -> Palatino~~ +* Noto (No Tofu) ## Derived Variant Docker Images diff --git a/example/lualatex/Symbols.tex b/example/lualatex/Symbols.tex index 3acfda1..a5415b9 100644 --- a/example/lualatex/Symbols.tex +++ b/example/lualatex/Symbols.tex @@ -6,11 +6,11 @@ \chapter{Symbols} \item U+2264 Less-than or equal to ≤ \item U+2265 Greater-than or equal to ≥ \item U+00B1 Plus-minus sign ± - \item U+2190 \ensuremath{←} - \item U+2191 \ensuremath{↑} - \item U+2192 \ensuremath{→} - \item U+2193 \ensuremath{↓} - \item U+2194 \ensuremath{↔} + \item U+2190 ← + \item U+2191 ↑ + \item U+2192 → + \item U+2193 ↓ + \item U+2194 ↔ \item U+2195 %↕ \item U+2196 %↖ \item U+2197 %↗ @@ -46,10 +46,10 @@ \chapter{Symbols} \item U+21E0 %⇠ \item U+21E2 %⇢ \item U+21AA %↪ - \item U+27F2 circular arrow counterclockwise %⟲ - \item U+2B60 Leftwards Triangle-Headed Arrow %⭠ - \item U+2B61 Upwards Triangle-Headed Arrow %⭡ - \item U+2B62 Rightwards Triangle-Headed Arrow %⭢ - \item U+2B63 Downwards Triangle-Headed Arrow %⭣ + \item U+27F2 circular arrow counterclockwise ⟲ + \item U+2B60 Leftwards Triangle-Headed Arrow ⭠ + \item U+2B61 Upwards Triangle-Headed Arrow ⭡ + \item U+2B62 Rightwards Triangle-Headed Arrow ⭢ + \item U+2B63 Downwards Triangle-Headed Arrow ⭣ \end{itemize} \end{multicols} diff --git a/example/lualatex/document.tex b/example/lualatex/document.tex index e958dbb..ae725a6 100644 --- a/example/lualatex/document.tex +++ b/example/lualatex/document.tex @@ -41,9 +41,49 @@ \setmathfont{DejaVu Math TeX Gyre} %DejaVuMathTeXGyre-Regular \else % Set the fonts to Latin Modern (LaTeX font derived from Computer Modern) - \setmainfont{Latin Modern Roman} - \setsansfont{Latin Modern Sans} - \setmonofont{Latin Modern Mono} + \setmainfont{Latin Modern Roman}[ + SizeFeatures={ % Enable Optical/Design Sizes + {Size={-6}, Font=LM Roman 5}, + {Size={6-7}, Font=LM Roman 6}, + {Size={7-8}, Font=LM Roman 7}, + {Size={8-9}, Font=LM Roman 8}, + {Size={9-10}, Font=LM Roman 9}, + {Size={10-12}, Font=LM Roman 10}, + {Size={12-17}, Font=LM Roman 12}, + {Size={17-}, Font=LM Roman 17}, + }, + % Map Small Caps & Slanted + SmallCapsFont={Latin Modern Roman Caps}, + SlantedFont={Latin Modern Roman Slanted}, + SlantedFeatures={SmallCapsFont={Latin Modern Roman Caps}}, % LMR Caps are slanted-compatible + ItalicFont={Latin Modern Roman}, + ItalicFeatures={Style=Italic}, + BoldFont={Latin Modern Roman}, + BoldFeatures={Series=Bold} + ] + \setsansfont{Latin Modern Sans}[ + SizeFeatures={ % Enable Optical/Design Sizes + {Size={-9}, Font=LM Sans 8}, + {Size={9-10}, Font=LM Sans 9}, + {Size={10-12}, Font=LM Sans 10}, + {Size={12-17}, Font=LM Sans 12}, + {Size={17-}, Font=LM Sans 17}, + }, + ItalicFont={Latin Modern Sans}, + ItalicFeatures={Style=Oblique}, % LM Sans uses Oblique instead of cursive Italic + BoldFont={Latin Modern Sans}, + BoldFeatures={Series=Bold} + ] + \setmonofont{Latin Modern Mono}[ + SizeFeatures={ % Enable Optical/Design Sizes + {Size={-9}, Font=LM Mono 8}, + {Size={9-10}, Font=LM Mono 9}, + {Size={10-12}, Font=LM Mono 10}, + {Size={12-}, Font=LM Mono 12}, + }, + SmallCapsFont={Latin Modern Mono Caps}, + SlantedFont={Latin Modern Mono Slanted} + ] \setmathfont{Latin Modern Math} \fi \fi diff --git a/pytooling.sty b/pytooling.sty index 8d4190f..2adf726 100644 --- a/pytooling.sty +++ b/pytooling.sty @@ -9,19 +9,22 @@ designed for the LuaTeX engine. Please switch your compiler.} \fi -\newunicodechar{≤}{\ensuremath{\le}} -\newunicodechar{≥}{\ensuremath{\ge}} +\newunicodechar{≤}{\ensuremath{≤}} % \le +\newunicodechar{≥}{\ensuremath{≥}} % \ge \newunicodechar{±}{\ensuremath{\pm}} \newunicodechar{—}{---} \newunicodechar{…}{\dots} -%\newunicodechar{␣}{ } % open box = visible space U+2423 -\newunicodechar{⟲}{\ensuremath{\leftcirclearrowleft}} % circular arrow counterclockwise U+27F2 -%\newunicodechar{→}{\ensuremath{\rightarrow}} % Rightwards Arrow U+2192 -\newunicodechar{⭠}{\ensuremath{\arrowltog}} % Leftwards Triangle-Headed Arrow U+2B60 arrowbtog = Arrow Bottom To Gloss -\newunicodechar{⭡}{\ensuremath{\arrowutog}} % Upwards Triangle-Headed Arrow U+2B61 -%\newunicodechar{⭢}{\arrowbtog} % Rightwards Triangle-Headed Arrow U+2B62 -\newunicodechar{⭣}{\ensuremath{\arrowdtog}} % Downwards Triangle-Headed Arrow U+2B63 - +%\newunicodechar{␣}{ } % open box = visible space U+2423 +\newunicodechar{⟲}{\ensuremath{⟲}} % circular arrow counterclockwise U+27F2 +\newunicodechar{←}{\ensuremath{←}} % Leftwards Arrow U+2190 +\newunicodechar{↑}{\ensuremath{↑}} % Upwards Arrow U+2191 +\newunicodechar{→}{\ensuremath{→}} % Rightwards Arrow U+2192 +\newunicodechar{↓}{\ensuremath{↓}} % Downwards Arrow U+2193 +\newunicodechar{↔}{\ensuremath{↔}} % U+2194 +\newunicodechar{⭠}{\ensuremath{⭠}} % Leftwards Triangle-Headed Arrow U+2B60 +\newunicodechar{⭡}{\ensuremath{⭡}} % Upwards Triangle-Headed Arrow U+2B61 +\newunicodechar{⭢}{\ensuremath{⭢}} % Rightwards Triangle-Headed Arrow U+2B62 +\newunicodechar{⭣}{\ensuremath{⭣}} % Downwards Triangle-Headed Arrow U+2B63 \newunicodechar{🍎}{{\emojifont 🍎}} % red apple U+1F34E \newunicodechar{🍏}{{\emojifont 🍏}} % green apple U+1F34F \newunicodechar{🐧}{{\emojifont 🐧}} % penguin U+1F427 From e96bd24147dfe6573bb861bfa5d472a512a8a239 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sun, 26 Apr 2026 15:14:30 +0200 Subject: [PATCH 2/3] Configure Latin Modern. --- example/lualatex/document.tex | 60 ++++++++++++++++------------------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/example/lualatex/document.tex b/example/lualatex/document.tex index ae725a6..07902ee 100644 --- a/example/lualatex/document.tex +++ b/example/lualatex/document.tex @@ -42,47 +42,43 @@ \else % Set the fonts to Latin Modern (LaTeX font derived from Computer Modern) \setmainfont{Latin Modern Roman}[ - SizeFeatures={ % Enable Optical/Design Sizes - {Size={-6}, Font=LM Roman 5}, - {Size={6-7}, Font=LM Roman 6}, - {Size={7-8}, Font=LM Roman 7}, - {Size={8-9}, Font=LM Roman 8}, - {Size={9-10}, Font=LM Roman 9}, - {Size={10-12}, Font=LM Roman 10}, - {Size={12-17}, Font=LM Roman 12}, - {Size={17-}, Font=LM Roman 17}, + % Design Sizes: Use the correct file for the current font size + SizeFeatures={ + {Size={-6}, Font=LMRoman5-Regular}, + {Size={6-7}, Font=LMRoman6-Regular}, + {Size={7-8}, Font=LMRoman7-Regular}, + {Size={8-9}, Font=LMRoman8-Regular}, + {Size={9-10}, Font=LMRoman9-Regular}, + {Size={10-12}, Font=LMRoman10-Regular}, + {Size={12-17}, Font=LMRoman12-Regular}, + {Size={17-}, Font=LMRoman17-Regular}, }, - % Map Small Caps & Slanted + % Specific Small Caps font SmallCapsFont={Latin Modern Roman Caps}, + % Specific Slanted font (and its small caps) SlantedFont={Latin Modern Roman Slanted}, - SlantedFeatures={SmallCapsFont={Latin Modern Roman Caps}}, % LMR Caps are slanted-compatible - ItalicFont={Latin Modern Roman}, - ItalicFeatures={Style=Italic}, - BoldFont={Latin Modern Roman}, - BoldFeatures={Series=Bold} + SlantedFeatures={SmallCapsFont={LMRomanCaps10-Oblique}}, + % Standard Italic/Bold + ItalicFont={LMRoman10-Italic}, + BoldFont={LMRoman10-Bold}, + BoldItalicFont={LMRoman10-BoldItalic} ] \setsansfont{Latin Modern Sans}[ - SizeFeatures={ % Enable Optical/Design Sizes - {Size={-9}, Font=LM Sans 8}, - {Size={9-10}, Font=LM Sans 9}, - {Size={10-12}, Font=LM Sans 10}, - {Size={12-17}, Font=LM Sans 12}, - {Size={17-}, Font=LM Sans 17}, + SizeFeatures={ + {Size={-9}, Font=LMSans8-Regular}, + {Size={9-10}, Font=LMSans9-Regular}, + {Size={10-12}, Font=LMSans10-Regular}, + {Size={12-17}, Font=LMSans12-Regular}, + {Size={17-}, Font=LMSans17-Regular}, }, - ItalicFont={Latin Modern Sans}, - ItalicFeatures={Style=Oblique}, % LM Sans uses Oblique instead of cursive Italic - BoldFont={Latin Modern Sans}, - BoldFeatures={Series=Bold} + ItalicFont={LMSans10-Oblique}, % LM Sans uses Oblique as its Italic + BoldFont={LMSans10-Bold}, + BoldItalicFont={LMSans10-BoldOblique} ] \setmonofont{Latin Modern Mono}[ - SizeFeatures={ % Enable Optical/Design Sizes - {Size={-9}, Font=LM Mono 8}, - {Size={9-10}, Font=LM Mono 9}, - {Size={10-12}, Font=LM Mono 10}, - {Size={12-}, Font=LM Mono 12}, - }, SmallCapsFont={Latin Modern Mono Caps}, - SlantedFont={Latin Modern Mono Slanted} + SlantedFont={Latin Modern Mono Slanted}, + % LM Mono also has a "Light" and "Condensed" version available if needed ] \setmathfont{Latin Modern Math} \fi From e72b42d2f49a72aac4ee4bd161b503b9d354db7e Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 27 Apr 2026 01:03:10 +0200 Subject: [PATCH 3/3] Added 3 more unicode icons. --- example/lualatex/Icons.tex | 3 +++ example/lualatex/Symbols.tex | 10 +++++----- example/sphinx/Icons.rst | 3 +++ example/sphinx/Symbols.rst | 10 +++++----- pytooling.sty | 24 ++++++++++++++---------- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/example/lualatex/Icons.tex b/example/lualatex/Icons.tex index 69e12a8..5af87aa 100644 --- a/example/lualatex/Icons.tex +++ b/example/lualatex/Icons.tex @@ -36,6 +36,9 @@ \chapter{Unicode Icons} \item U+2699 Gear ⚙ \item U+26D4 No entry ⛔ \item U+274C Cross Mark ❌ + \item U+2753 Black Question Mark Ornament ❓ + \item U+2757 Heavy Exclamation Mark Symbol ❗ + \item U+2796 Heavy Minus Sign ➖ \item U+1F6AB No entry sign 🚫 \item U+1F6C7 Prohibited %🛇 \item U+26A0 Warning ⚠ diff --git a/example/lualatex/Symbols.tex b/example/lualatex/Symbols.tex index a5415b9..dd50c08 100644 --- a/example/lualatex/Symbols.tex +++ b/example/lualatex/Symbols.tex @@ -46,10 +46,10 @@ \chapter{Symbols} \item U+21E0 %⇠ \item U+21E2 %⇢ \item U+21AA %↪ - \item U+27F2 circular arrow counterclockwise ⟲ - \item U+2B60 Leftwards Triangle-Headed Arrow ⭠ - \item U+2B61 Upwards Triangle-Headed Arrow ⭡ - \item U+2B62 Rightwards Triangle-Headed Arrow ⭢ - \item U+2B63 Downwards Triangle-Headed Arrow ⭣ + \item U+27F2 circular arrow counterclockwise %⟲ + \item U+2B60 Leftwards Triangle-Headed Arrow %⭠ + \item U+2B61 Upwards Triangle-Headed Arrow %⭡ + \item U+2B62 Rightwards Triangle-Headed Arrow %⭢ + \item U+2B63 Downwards Triangle-Headed Arrow %⭣ \end{itemize} \end{multicols} diff --git a/example/sphinx/Icons.rst b/example/sphinx/Icons.rst index 6899b85..7cbebbb 100644 --- a/example/sphinx/Icons.rst +++ b/example/sphinx/Icons.rst @@ -37,6 +37,9 @@ Unicode Icons :U+2699 Gear: ⚙ :U+26D4 No entry: ⛔ :U+274C Cross Mark: ❌ +:U+2753 Black Question Mark Ornament: ❓ +:U+2757 Heavy Exclamation Mark Symbol: ❗ +:U+2796 Heavy Minus Sign: ➖ :U+1F6AB No entry sign: 🚫 :U+1F6C7 Prohibited: ??? :U+26A0 Warning: ⚠ diff --git a/example/sphinx/Symbols.rst b/example/sphinx/Symbols.rst index 978e84e..f296976 100644 --- a/example/sphinx/Symbols.rst +++ b/example/sphinx/Symbols.rst @@ -11,11 +11,11 @@ Symbols :U+2192 Rightward Arrow: → :U+2193 Downward Arrow: ↓ :U+2194: ↔ -:U+2195: ↕ -:U+2196: ↖ -:U+2197: ↗ -:U+2198: ↘ -:U+2199: ↙ +:U+2195: ??? +:U+2196: ??? +:U+2197: ??? +:U+2198: ??? +:U+2199: ??? :U+2921: ??? :U+2292: ??? :U+21A4: ??? diff --git a/pytooling.sty b/pytooling.sty index 2adf726..1ec4b87 100644 --- a/pytooling.sty +++ b/pytooling.sty @@ -15,16 +15,17 @@ \newunicodechar{—}{---} \newunicodechar{…}{\dots} %\newunicodechar{␣}{ } % open box = visible space U+2423 -\newunicodechar{⟲}{\ensuremath{⟲}} % circular arrow counterclockwise U+27F2 -\newunicodechar{←}{\ensuremath{←}} % Leftwards Arrow U+2190 -\newunicodechar{↑}{\ensuremath{↑}} % Upwards Arrow U+2191 -\newunicodechar{→}{\ensuremath{→}} % Rightwards Arrow U+2192 -\newunicodechar{↓}{\ensuremath{↓}} % Downwards Arrow U+2193 -\newunicodechar{↔}{\ensuremath{↔}} % U+2194 -\newunicodechar{⭠}{\ensuremath{⭠}} % Leftwards Triangle-Headed Arrow U+2B60 -\newunicodechar{⭡}{\ensuremath{⭡}} % Upwards Triangle-Headed Arrow U+2B61 -\newunicodechar{⭢}{\ensuremath{⭢}} % Rightwards Triangle-Headed Arrow U+2B62 -\newunicodechar{⭣}{\ensuremath{⭣}} % Downwards Triangle-Headed Arrow U+2B63 +\newunicodechar{⟲}{\ensuremath{\acwopencirclearrow}} % circular arrow counterclockwise U+27F2 +\newunicodechar{←}{\ensuremath{\leftarrow}} % Leftwards Arrow U+2190 +\newunicodechar{↑}{\ensuremath{\uparrow}} % Upwards Arrow U+2191 +\newunicodechar{→}{\ensuremath{\rightarrow}} % Rightwards Arrow U+2192 +\newunicodechar{↓}{\ensuremath{\downarrow}} % Downwards Arrow U+2193 +\newunicodechar{↔}{\ensuremath{\leftrightarrow}} % U+2194 +\newunicodechar{↕}{\ensuremath{\updowntarrow}} % U+2195 +%\newunicodechar{⭠}{\ensuremath{⭠}} % Leftwards Triangle-Headed Arrow U+2B60 +%\newunicodechar{⭡}{\ensuremath{⭡}} % Upwards Triangle-Headed Arrow U+2B61 +%\newunicodechar{⭢}{\ensuremath{⭢}} % Rightwards Triangle-Headed Arrow U+2B62 +%\newunicodechar{⭣}{\ensuremath{⭣}} % Downwards Triangle-Headed Arrow U+2B63 \newunicodechar{🍎}{{\emojifont 🍎}} % red apple U+1F34E \newunicodechar{🍏}{{\emojifont 🍏}} % green apple U+1F34F \newunicodechar{🐧}{{\emojifont 🐧}} % penguin U+1F427 @@ -59,6 +60,9 @@ \newunicodechar{⚙}{{\emojifont ⚙}} % Gear ⚙️ U+2699 \newunicodechar{⛔}{{\emojifont ⛔}} % No entry U+26D4 \newunicodechar{❌}{{\emojifont ❌}} % Cross Mark U+274C +\newunicodechar{❓}{{\emojifont ❓}} % Black Question Mark Ornament U+2753 +\newunicodechar{❗}{{\emojifont ❗}} % Heavy Exclamation Mark Symbol U+2757 +\newunicodechar{➖}{{\emojifont ➖}} % Heavy Minus Sign U+2796 \newunicodechar{🚫}{{\emojifont 🚫}} % No entry sign U+1F6AB \newunicodechar{🛇}{{\emojifont 🛇}} % Prohibited U+1F6C7 \newunicodechar{⚠}{{\emojifont ⚠}} % Warning U+26A0