summaryrefslogtreecommitdiff
path: root/macros/unicodetex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-09-27 03:01:03 +0000
committerNorbert Preining <norbert@preining.info>2023-09-27 03:01:03 +0000
commitddf6d4e181f87c112f2d86ecbb7c3af314ce548a (patch)
tree252575a8001245f3764001afef64ba67dac759bb /macros/unicodetex
parent48486f016a3101e6a13547bf0d44e210fedfbacf (diff)
CTAN sync 202309270301
Diffstat (limited to 'macros/unicodetex')
-rw-r--r--macros/unicodetex/latex/beaulivre/README.md174
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre.cls17
-rw-r--r--macros/unicodetex/latex/einfart/README.md175
-rw-r--r--macros/unicodetex/latex/einfart/einfart.cls17
-rw-r--r--macros/unicodetex/latex/lebhart/README.md175
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart.cls17
-rw-r--r--macros/unicodetex/latex/simplivre/README.md174
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre.cls17
8 files changed, 716 insertions, 50 deletions
diff --git a/macros/unicodetex/latex/beaulivre/README.md b/macros/unicodetex/latex/beaulivre/README.md
index 7ae628f855..243c0ec3fe 100644
--- a/macros/unicodetex/latex/beaulivre/README.md
+++ b/macros/unicodetex/latex/beaulivre/README.md
@@ -14,11 +14,175 @@ This is part of the `colorist` class series.
Compared with usual document classes, it has the following features:
-- Several carefully designed styles
-- Native multi-language support: Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish
- > In particular, for simplified Chinese, traditional Chinese and Japanese, the fonts of the corresponding glyphs can be automatically switched
-- Ready-to-use theorem-like environments, with clever referencing support
-- ... and so much more...
+- Several carefully designed styles.
+- Native multilingual support: Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish.
+ > In particular, for simplified Chinese, traditional Chinese and Japanese, the fonts of the corresponding glyphs can be automatically switched.
+- Ready-to-use theorem-type environments, with clever referencing supported.
+- Support both the standard and the AMS writing fashion.
+- ... and much more...
+
+## Required fonts
+
+The current document class requires the following open-source fonts that are not included in the standard TeX collection:
+
+- The Source Han font series at [Adobe Fonts](https://github.com/adobe-fonts). More specifically:
+ - Source Han Serif, [go to its Release page](https://github.com/adobe-fonts/source-han-serif/releases).
+ - Source Han Sans, [go to its Release page](https://github.com/adobe-fonts/source-han-sans/releases).
+ - Source Han Mono, [go to its Release page](https://github.com/adobe-fonts/source-han-mono/releases).
+ > It is recommended to download the Super-OTC version, so that the download size would be smaller.
+
+## Improvements to the current font configuration
+
+> The code in this section is rather experimental and may constantly get changed. The author uses these lines of code in his daily documents, but since it involves non-free fonts and/or uses complex Lua patches, the code below cannot be integrated into the published version.
+
+If you are willing to use LuaLaTeX, then the following aspects may help you further improve the current font configuration.
+
+- If you have the font `Palatino Linotype` installed, then replacing the default `TeXGyrePagellaX` using the following code gives you slightly better result:
+ ```latex
+ \directlua
+ {
+ fonts.handlers.otf.addfeature
+ {
+ name = "palatino-linotype-fix",
+ type = "kern",
+ data =
+ {
+ ["r"] = { ["ê"] = 120 },
+ ["v"] = { ["ê"] = 180 },
+ ["w"] = { ["ê"] = 180 },
+ ["y"] = { ["ê"] = 180 },
+ },
+ }
+ }
+ \setmainfont{Palatino Linotype}
+ [
+ Numbers = OldStyle ,
+ RawFeature = +palatino-linotype-fix
+ ]
+ ```
+- If you have the font `Palatino Sans LT Pro` installed, then replacing the default `mathsf` font with this gives more pleasant visual effect:
+ ```latex
+ \setmathsf{Palatino Sans LT Pro}
+ \setmathfont{PalatinoSansLTPro-LightIta}[range=sfit]
+ ```
+- The default configuration for math fonts has some imperfections. The following code helps to improve it. But for this you need to modify the `.cls` file itself and then maintain your local version of it. Here is how:
+ - First, add this definition at the beginning of the font configuration.
+ ```latex
+ \ExplSyntaxOff
+ % https://tex.stackexchange.com/a/505003
+ \def\mathkern@fix@for@lua
+ {
+ \directlua
+ {
+ local mathkerns = {
+ ["Asana-Math"] = {
+ [0x1D447] = {% T
+ bottomright = {
+ {height=0,kern=-120},
+ },
+ },
+ [0x1D449] = {% V
+ bottomright = {
+ {height=0,kern=-120},
+ },
+ },
+ [0x1D44A] = {% W
+ bottomright = {
+ {height=0,kern=-30},
+ },
+ },
+ [0x1D453] = {% f
+ bottomright = {
+ {height=0,kern=-135},
+ },
+ },
+ [0x1D44F] = {% b
+ topright = {
+ {height=0,kern=75},
+ },
+ },
+ },
+ ["KpMath-Regular"] = {
+ [0x1D6FD] = {% \beta
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ [0x1D6FF] = {% \delta
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ [0x1D702] = {% \eta
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ [0x1D703] = {% \theta
+ bottomright = {
+ {height=0,kern=10},
+ },
+ },
+ [0x1D714] = {% \omega
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ },
+ }
+ local function initmathkern(tfmdata)
+ local values = mathkerns[tfmdata.properties.psname]
+ if not values then return end
+ for cp, value in next, values do
+ local tcp = type(cp)
+ if tcp == 'string' then
+ cp = tfmdata.resources.unicodes[cp]
+ end
+ local char = tfmdata.characters[cp]
+ if char then
+ local mathkern = char.mathkerns
+ if not mathkern then
+ mathkern = {}
+ char.mathkerns = mathkern
+ end
+ for corner, v in next, value do
+ mathkern[corner] = v
+ end
+ end
+ end
+ end
+ fonts.constructors.newfeatures'otf'.register{
+ name = 'mathkern',
+ description = 'Overwrite mathkern values',
+ initializers = {
+ base = initmathkern,
+ },
+ }
+ }
+ }
+ \ExplSyntaxOn
+ ```
+ - Then, just before `\RequirePackage { unicode-math }`, add these lines:
+ ```latex
+ \sys_if_engine_luatex:T
+ {
+ \mathkern@fix@for@lua
+ }
+ ```
+ - Finally, replace `\setmathfont { KpMath-Regular.otf }` with `\setmathfont [ RawFeature = mathkern ] { KpMath-Regular.otf }`, and replace
+ ```latex
+ \setmathfont { texgyrepagella-math.otf }
+ [
+ range = { it / { Latin, latin }, bfit / { Latin, latin }, up / num, bfup / num }
+ ]
+ ```
+ with
+ ```latex
+ \setmathfont [ RawFeature = mathkern ] { Asana-Math.otf }
+ [
+ range = { it / { Latin, latin }, bfit / { Latin, latin }, up / num, bfup / num }
+ ]
+ ```
# License
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre.cls b/macros/unicodetex/latex/beaulivre/beaulivre.cls
index 6a88c6e949..7b7fae8298 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre.cls
+++ b/macros/unicodetex/latex/beaulivre/beaulivre.cls
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{beaulivre}
- {2023/07/14} {}
+ {2023/09/26} {}
{A colorful book style}
\tl_const:Nn \l__colorclass_base_class_tl { book }
@@ -392,8 +392,8 @@
[
UprightFont = *-Regular,
BoldFont = *-Bold,
- ItalicFont = *-Regular,
- BoldItalicFont = *-Bold,
+ ItalicFont = *-ExtraLight,
+ BoldItalicFont = *-SemiBold,
]
}
{
@@ -457,8 +457,8 @@
[
UprightFont = *-Regular,
BoldFont = *-Bold,
- ItalicFont = *-Regular,
- BoldItalicFont = *-Bold,
+ ItalicFont = *-ExtraLight,
+ BoldItalicFont = *-SemiBold,
]
}
{
@@ -522,8 +522,8 @@
[
UprightFont = *-Regular,
BoldFont = *-Bold,
- ItalicFont = *-Regular,
- BoldItalicFont = *-Bold,
+ ItalicFont = *-ExtraLight,
+ BoldItalicFont = *-SemiBold,
]
}
{
@@ -590,18 +590,21 @@
\cs_set:Nn \colorclass_cjk_sffamily: { \CJKfamily { SCsans } }
\cs_set:Nn \colorclass_cjk_ttfamily: { \CJKfamily { SCmono } }
\CJKfamily { SCmain }
+ \hook_gput_code:nnn { normalfont } { colorclass } { \CJKfamily{SCmain} }
}
\AddLanguageSetting [tchinese]
{
\cs_set:Nn \colorclass_cjk_sffamily: { \CJKfamily { TCsans } }
\cs_set:Nn \colorclass_cjk_ttfamily: { \CJKfamily { TCmono } }
\CJKfamily { TCmain }
+ \hook_gput_code:nnn { normalfont } { colorclass } { \CJKfamily{TCmain} }
}
\AddLanguageSetting [japanese]
{
\cs_set:Nn \colorclass_cjk_sffamily: { \CJKfamily { JPsans } }
\cs_set:Nn \colorclass_cjk_ttfamily: { \CJKfamily { JPmono } }
\CJKfamily { JPmain }
+ \hook_gput_code:nnn { normalfont } { colorclass } { \CJKfamily{JPmain} }
}
}
diff --git a/macros/unicodetex/latex/einfart/README.md b/macros/unicodetex/latex/einfart/README.md
index a7ac3720e3..9c56ae78a7 100644
--- a/macros/unicodetex/latex/einfart/README.md
+++ b/macros/unicodetex/latex/einfart/README.md
@@ -14,12 +14,175 @@ This is part of the `minimalist` class series.
Compared with usual document classes, it has the following features:
-- Several carefully designed styles
-- Native multi-language support: Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish
- > In particular, for simplified Chinese, traditional Chinese and Japanese, the fonts of the corresponding glyphs can be automatically switched
-- Ready-to-use theorem-like environments, with clever referencing support
-- Support both the standard and the AMS writing fashion
-- ... and so much more...
+- Several carefully designed styles.
+- Native multilingual support: Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish.
+ > In particular, for simplified Chinese, traditional Chinese and Japanese, the fonts of the corresponding glyphs can be automatically switched.
+- Ready-to-use theorem-type environments, with clever referencing supported.
+- Support both the standard and the AMS writing fashion.
+- ... and much more...
+
+## Required fonts
+
+The current document class requires the following open-source fonts that are not included in the standard TeX collection:
+
+- The Source Han font series at [Adobe Fonts](https://github.com/adobe-fonts). More specifically:
+ - Source Han Serif, [go to its Release page](https://github.com/adobe-fonts/source-han-serif/releases).
+ - Source Han Sans, [go to its Release page](https://github.com/adobe-fonts/source-han-sans/releases).
+ - Source Han Mono, [go to its Release page](https://github.com/adobe-fonts/source-han-mono/releases).
+ > It is recommended to download the Super-OTC version, so that the download size would be smaller.
+
+## Improvements to the current font configuration
+
+> The code in this section is rather experimental and may constantly get changed. The author uses these lines of code in his daily documents, but since it involves non-free fonts and/or uses complex Lua patches, the code below cannot be integrated into the published version.
+
+If you are willing to use LuaLaTeX, then the following aspects may help you further improve the current font configuration.
+
+- If you have the font `Palatino Linotype` installed, then replacing the default `TeXGyrePagellaX` using the following code gives you slightly better result:
+ ```latex
+ \directlua
+ {
+ fonts.handlers.otf.addfeature
+ {
+ name = "palatino-linotype-fix",
+ type = "kern",
+ data =
+ {
+ ["r"] = { ["ê"] = 120 },
+ ["v"] = { ["ê"] = 180 },
+ ["w"] = { ["ê"] = 180 },
+ ["y"] = { ["ê"] = 180 },
+ },
+ }
+ }
+ \setmainfont{Palatino Linotype}
+ [
+ Numbers = OldStyle ,
+ RawFeature = +palatino-linotype-fix
+ ]
+ ```
+- If you have the font `Palatino Sans LT Pro` installed, then replacing the default `mathsf` font with this gives more pleasant visual effect:
+ ```latex
+ \setmathsf{Palatino Sans LT Pro}
+ \setmathfont{PalatinoSansLTPro-LightIta}[range=sfit]
+ ```
+- The default configuration for math fonts has some imperfections. The following code helps to improve it. But for this you need to modify the `.cls` file itself and then maintain your local version of it. Here is how:
+ - First, add this definition at the beginning of the font configuration.
+ ```latex
+ \ExplSyntaxOff
+ % https://tex.stackexchange.com/a/505003
+ \def\mathkern@fix@for@lua
+ {
+ \directlua
+ {
+ local mathkerns = {
+ ["Asana-Math"] = {
+ [0x1D447] = {% T
+ bottomright = {
+ {height=0,kern=-120},
+ },
+ },
+ [0x1D449] = {% V
+ bottomright = {
+ {height=0,kern=-120},
+ },
+ },
+ [0x1D44A] = {% W
+ bottomright = {
+ {height=0,kern=-30},
+ },
+ },
+ [0x1D453] = {% f
+ bottomright = {
+ {height=0,kern=-135},
+ },
+ },
+ [0x1D44F] = {% b
+ topright = {
+ {height=0,kern=75},
+ },
+ },
+ },
+ ["KpMath-Regular"] = {
+ [0x1D6FD] = {% \beta
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ [0x1D6FF] = {% \delta
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ [0x1D702] = {% \eta
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ [0x1D703] = {% \theta
+ bottomright = {
+ {height=0,kern=10},
+ },
+ },
+ [0x1D714] = {% \omega
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ },
+ }
+ local function initmathkern(tfmdata)
+ local values = mathkerns[tfmdata.properties.psname]
+ if not values then return end
+ for cp, value in next, values do
+ local tcp = type(cp)
+ if tcp == 'string' then
+ cp = tfmdata.resources.unicodes[cp]
+ end
+ local char = tfmdata.characters[cp]
+ if char then
+ local mathkern = char.mathkerns
+ if not mathkern then
+ mathkern = {}
+ char.mathkerns = mathkern
+ end
+ for corner, v in next, value do
+ mathkern[corner] = v
+ end
+ end
+ end
+ end
+ fonts.constructors.newfeatures'otf'.register{
+ name = 'mathkern',
+ description = 'Overwrite mathkern values',
+ initializers = {
+ base = initmathkern,
+ },
+ }
+ }
+ }
+ \ExplSyntaxOn
+ ```
+ - Then, just before `\RequirePackage { unicode-math }`, add these lines:
+ ```latex
+ \sys_if_engine_luatex:T
+ {
+ \mathkern@fix@for@lua
+ }
+ ```
+ - Finally, replace `\setmathfont { KpMath-Regular.otf }` with `\setmathfont [ RawFeature = mathkern ] { KpMath-Regular.otf }`, and replace
+ ```latex
+ \setmathfont { texgyrepagella-math.otf }
+ [
+ range = { it / { Latin, latin }, bfit / { Latin, latin }, up / num, bfup / num }
+ ]
+ ```
+ with
+ ```latex
+ \setmathfont [ RawFeature = mathkern ] { Asana-Math.otf }
+ [
+ range = { it / { Latin, latin }, bfit / { Latin, latin }, up / num, bfup / num }
+ ]
+ ```
# License
diff --git a/macros/unicodetex/latex/einfart/einfart.cls b/macros/unicodetex/latex/einfart/einfart.cls
index fe78ffcbff..7f3514badd 100644
--- a/macros/unicodetex/latex/einfart/einfart.cls
+++ b/macros/unicodetex/latex/einfart/einfart.cls
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{einfart}
- {2023/09/21} {}
+ {2023/09/26} {}
{A simple and clear article style}
\tl_const:Nn \l__minimclass_base_class_tl { article }
@@ -410,8 +410,8 @@
[
UprightFont = *-Regular,
BoldFont = *-Bold,
- ItalicFont = *-Regular,
- BoldItalicFont = *-Bold,
+ ItalicFont = *-ExtraLight,
+ BoldItalicFont = *-SemiBold,
]
}
{
@@ -475,8 +475,8 @@
[
UprightFont = *-Regular,
BoldFont = *-Bold,
- ItalicFont = *-Regular,
- BoldItalicFont = *-Bold,
+ ItalicFont = *-ExtraLight,
+ BoldItalicFont = *-SemiBold,
]
}
{
@@ -540,8 +540,8 @@
[
UprightFont = *-Regular,
BoldFont = *-Bold,
- ItalicFont = *-Regular,
- BoldItalicFont = *-Bold,
+ ItalicFont = *-ExtraLight,
+ BoldItalicFont = *-SemiBold,
]
}
{
@@ -608,18 +608,21 @@
\cs_set:Nn \minimclass_cjk_sffamily: { \CJKfamily { SCsans } }
\cs_set:Nn \minimclass_cjk_ttfamily: { \CJKfamily { SCmono } }
\CJKfamily { SCmain }
+ \hook_gput_code:nnn { normalfont } { minimclass } { \CJKfamily{SCmain} }
}
\AddLanguageSetting [tchinese]
{
\cs_set:Nn \minimclass_cjk_sffamily: { \CJKfamily { TCsans } }
\cs_set:Nn \minimclass_cjk_ttfamily: { \CJKfamily { TCmono } }
\CJKfamily { TCmain }
+ \hook_gput_code:nnn { normalfont } { minimclass } { \CJKfamily{TCmain} }
}
\AddLanguageSetting [japanese]
{
\cs_set:Nn \minimclass_cjk_sffamily: { \CJKfamily { JPsans } }
\cs_set:Nn \minimclass_cjk_ttfamily: { \CJKfamily { JPmono } }
\CJKfamily { JPmain }
+ \hook_gput_code:nnn { normalfont } { minimclass } { \CJKfamily{JPmain} }
}
% \tl_gset:Nn \g_minimalist_title_font_common_tl { \minimclass_cjk_sffamily: }
diff --git a/macros/unicodetex/latex/lebhart/README.md b/macros/unicodetex/latex/lebhart/README.md
index 6ede054a38..ed7bd0e2b1 100644
--- a/macros/unicodetex/latex/lebhart/README.md
+++ b/macros/unicodetex/latex/lebhart/README.md
@@ -14,12 +14,175 @@ This is part of the `colorist` class series.
Compared with usual document classes, it has the following features:
-- Several carefully designed styles
-- Native multi-language support: Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish
- > In particular, for simplified Chinese, traditional Chinese and Japanese, the fonts of the corresponding glyphs can be automatically switched
-- Ready-to-use theorem-like environments, with clever referencing support
-- Support both the standard and the AMS writing fashion
-- ... and so much more...
+- Several carefully designed styles.
+- Native multilingual support: Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish.
+ > In particular, for simplified Chinese, traditional Chinese and Japanese, the fonts of the corresponding glyphs can be automatically switched.
+- Ready-to-use theorem-type environments, with clever referencing supported.
+- Support both the standard and the AMS writing fashion.
+- ... and much more...
+
+## Required fonts
+
+The current document class requires the following open-source fonts that are not included in the standard TeX collection:
+
+- The Source Han font series at [Adobe Fonts](https://github.com/adobe-fonts). More specifically:
+ - Source Han Serif, [go to its Release page](https://github.com/adobe-fonts/source-han-serif/releases).
+ - Source Han Sans, [go to its Release page](https://github.com/adobe-fonts/source-han-sans/releases).
+ - Source Han Mono, [go to its Release page](https://github.com/adobe-fonts/source-han-mono/releases).
+ > It is recommended to download the Super-OTC version, so that the download size would be smaller.
+
+## Improvements to the current font configuration
+
+> The code in this section is rather experimental and may constantly get changed. The author uses these lines of code in his daily documents, but since it involves non-free fonts and/or uses complex Lua patches, the code below cannot be integrated into the published version.
+
+If you are willing to use LuaLaTeX, then the following aspects may help you further improve the current font configuration.
+
+- If you have the font `Palatino Linotype` installed, then replacing the default `TeXGyrePagellaX` using the following code gives you slightly better result:
+ ```latex
+ \directlua
+ {
+ fonts.handlers.otf.addfeature
+ {
+ name = "palatino-linotype-fix",
+ type = "kern",
+ data =
+ {
+ ["r"] = { ["ê"] = 120 },
+ ["v"] = { ["ê"] = 180 },
+ ["w"] = { ["ê"] = 180 },
+ ["y"] = { ["ê"] = 180 },
+ },
+ }
+ }
+ \setmainfont{Palatino Linotype}
+ [
+ Numbers = OldStyle ,
+ RawFeature = +palatino-linotype-fix
+ ]
+ ```
+- If you have the font `Palatino Sans LT Pro` installed, then replacing the default `mathsf` font with this gives more pleasant visual effect:
+ ```latex
+ \setmathsf{Palatino Sans LT Pro}
+ \setmathfont{PalatinoSansLTPro-LightIta}[range=sfit]
+ ```
+- The default configuration for math fonts has some imperfections. The following code helps to improve it. But for this you need to modify the `.cls` file itself and then maintain your local version of it. Here is how:
+ - First, add this definition at the beginning of the font configuration.
+ ```latex
+ \ExplSyntaxOff
+ % https://tex.stackexchange.com/a/505003
+ \def\mathkern@fix@for@lua
+ {
+ \directlua
+ {
+ local mathkerns = {
+ ["Asana-Math"] = {
+ [0x1D447] = {% T
+ bottomright = {
+ {height=0,kern=-120},
+ },
+ },
+ [0x1D449] = {% V
+ bottomright = {
+ {height=0,kern=-120},
+ },
+ },
+ [0x1D44A] = {% W
+ bottomright = {
+ {height=0,kern=-30},
+ },
+ },
+ [0x1D453] = {% f
+ bottomright = {
+ {height=0,kern=-135},
+ },
+ },
+ [0x1D44F] = {% b
+ topright = {
+ {height=0,kern=75},
+ },
+ },
+ },
+ ["KpMath-Regular"] = {
+ [0x1D6FD] = {% \beta
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ [0x1D6FF] = {% \delta
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ [0x1D702] = {% \eta
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ [0x1D703] = {% \theta
+ bottomright = {
+ {height=0,kern=10},
+ },
+ },
+ [0x1D714] = {% \omega
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ },
+ }
+ local function initmathkern(tfmdata)
+ local values = mathkerns[tfmdata.properties.psname]
+ if not values then return end
+ for cp, value in next, values do
+ local tcp = type(cp)
+ if tcp == 'string' then
+ cp = tfmdata.resources.unicodes[cp]
+ end
+ local char = tfmdata.characters[cp]
+ if char then
+ local mathkern = char.mathkerns
+ if not mathkern then
+ mathkern = {}
+ char.mathkerns = mathkern
+ end
+ for corner, v in next, value do
+ mathkern[corner] = v
+ end
+ end
+ end
+ end
+ fonts.constructors.newfeatures'otf'.register{
+ name = 'mathkern',
+ description = 'Overwrite mathkern values',
+ initializers = {
+ base = initmathkern,
+ },
+ }
+ }
+ }
+ \ExplSyntaxOn
+ ```
+ - Then, just before `\RequirePackage { unicode-math }`, add these lines:
+ ```latex
+ \sys_if_engine_luatex:T
+ {
+ \mathkern@fix@for@lua
+ }
+ ```
+ - Finally, replace `\setmathfont { KpMath-Regular.otf }` with `\setmathfont [ RawFeature = mathkern ] { KpMath-Regular.otf }`, and replace
+ ```latex
+ \setmathfont { texgyrepagella-math.otf }
+ [
+ range = { it / { Latin, latin }, bfit / { Latin, latin }, up / num, bfup / num }
+ ]
+ ```
+ with
+ ```latex
+ \setmathfont [ RawFeature = mathkern ] { Asana-Math.otf }
+ [
+ range = { it / { Latin, latin }, bfit / { Latin, latin }, up / num, bfup / num }
+ ]
+ ```
# License
diff --git a/macros/unicodetex/latex/lebhart/lebhart.cls b/macros/unicodetex/latex/lebhart/lebhart.cls
index 1e4e760f70..d36b7718d1 100644
--- a/macros/unicodetex/latex/lebhart/lebhart.cls
+++ b/macros/unicodetex/latex/lebhart/lebhart.cls
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{lebhart}
- {2023/07/14} {}
+ {2023/09/26} {}
{A colorful article style}
\tl_const:Nn \l__colorclass_base_class_tl { article }
@@ -392,8 +392,8 @@
[
UprightFont = *-Regular,
BoldFont = *-Bold,
- ItalicFont = *-Regular,
- BoldItalicFont = *-Bold,
+ ItalicFont = *-ExtraLight,
+ BoldItalicFont = *-SemiBold,
]
}
{
@@ -457,8 +457,8 @@
[
UprightFont = *-Regular,
BoldFont = *-Bold,
- ItalicFont = *-Regular,
- BoldItalicFont = *-Bold,
+ ItalicFont = *-ExtraLight,
+ BoldItalicFont = *-SemiBold,
]
}
{
@@ -522,8 +522,8 @@
[
UprightFont = *-Regular,
BoldFont = *-Bold,
- ItalicFont = *-Regular,
- BoldItalicFont = *-Bold,
+ ItalicFont = *-ExtraLight,
+ BoldItalicFont = *-SemiBold,
]
}
{
@@ -590,18 +590,21 @@
\cs_set:Nn \colorclass_cjk_sffamily: { \CJKfamily { SCsans } }
\cs_set:Nn \colorclass_cjk_ttfamily: { \CJKfamily { SCmono } }
\CJKfamily { SCmain }
+ \hook_gput_code:nnn { normalfont } { colorclass } { \CJKfamily{SCmain} }
}
\AddLanguageSetting [tchinese]
{
\cs_set:Nn \colorclass_cjk_sffamily: { \CJKfamily { TCsans } }
\cs_set:Nn \colorclass_cjk_ttfamily: { \CJKfamily { TCmono } }
\CJKfamily { TCmain }
+ \hook_gput_code:nnn { normalfont } { colorclass } { \CJKfamily{TCmain} }
}
\AddLanguageSetting [japanese]
{
\cs_set:Nn \colorclass_cjk_sffamily: { \CJKfamily { JPsans } }
\cs_set:Nn \colorclass_cjk_ttfamily: { \CJKfamily { JPmono } }
\CJKfamily { JPmain }
+ \hook_gput_code:nnn { normalfont } { colorclass } { \CJKfamily{JPmain} }
}
}
diff --git a/macros/unicodetex/latex/simplivre/README.md b/macros/unicodetex/latex/simplivre/README.md
index 2b6b50b385..d4ecf7e948 100644
--- a/macros/unicodetex/latex/simplivre/README.md
+++ b/macros/unicodetex/latex/simplivre/README.md
@@ -14,11 +14,175 @@ This is part of the `minimalist` class series.
Compared with usual document classes, it has the following features:
-- Several carefully designed styles
-- Native multi-language support: Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish
- > In particular, for simplified Chinese, traditional Chinese and Japanese, the fonts of the corresponding glyphs can be automatically switched
-- Ready-to-use theorem-like environments, with clever referencing support
-- ... and so much more...
+- Several carefully designed styles.
+- Native multilingual support: Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish.
+ > In particular, for simplified Chinese, traditional Chinese and Japanese, the fonts of the corresponding glyphs can be automatically switched.
+- Ready-to-use theorem-type environments, with clever referencing supported.
+- Support both the standard and the AMS writing fashion.
+- ... and much more...
+
+## Required fonts
+
+The current document class requires the following open-source fonts that are not included in the standard TeX collection:
+
+- The Source Han font series at [Adobe Fonts](https://github.com/adobe-fonts). More specifically:
+ - Source Han Serif, [go to its Release page](https://github.com/adobe-fonts/source-han-serif/releases).
+ - Source Han Sans, [go to its Release page](https://github.com/adobe-fonts/source-han-sans/releases).
+ - Source Han Mono, [go to its Release page](https://github.com/adobe-fonts/source-han-mono/releases).
+ > It is recommended to download the Super-OTC version, so that the download size would be smaller.
+
+## Improvements to the current font configuration
+
+> The code in this section is rather experimental and may constantly get changed. The author uses these lines of code in his daily documents, but since it involves non-free fonts and/or uses complex Lua patches, the code below cannot be integrated into the published version.
+
+If you are willing to use LuaLaTeX, then the following aspects may help you further improve the current font configuration.
+
+- If you have the font `Palatino Linotype` installed, then replacing the default `TeXGyrePagellaX` using the following code gives you slightly better result:
+ ```latex
+ \directlua
+ {
+ fonts.handlers.otf.addfeature
+ {
+ name = "palatino-linotype-fix",
+ type = "kern",
+ data =
+ {
+ ["r"] = { ["ê"] = 120 },
+ ["v"] = { ["ê"] = 180 },
+ ["w"] = { ["ê"] = 180 },
+ ["y"] = { ["ê"] = 180 },
+ },
+ }
+ }
+ \setmainfont{Palatino Linotype}
+ [
+ Numbers = OldStyle ,
+ RawFeature = +palatino-linotype-fix
+ ]
+ ```
+- If you have the font `Palatino Sans LT Pro` installed, then replacing the default `mathsf` font with this gives more pleasant visual effect:
+ ```latex
+ \setmathsf{Palatino Sans LT Pro}
+ \setmathfont{PalatinoSansLTPro-LightIta}[range=sfit]
+ ```
+- The default configuration for math fonts has some imperfections. The following code helps to improve it. But for this you need to modify the `.cls` file itself and then maintain your local version of it. Here is how:
+ - First, add this definition at the beginning of the font configuration.
+ ```latex
+ \ExplSyntaxOff
+ % https://tex.stackexchange.com/a/505003
+ \def\mathkern@fix@for@lua
+ {
+ \directlua
+ {
+ local mathkerns = {
+ ["Asana-Math"] = {
+ [0x1D447] = {% T
+ bottomright = {
+ {height=0,kern=-120},
+ },
+ },
+ [0x1D449] = {% V
+ bottomright = {
+ {height=0,kern=-120},
+ },
+ },
+ [0x1D44A] = {% W
+ bottomright = {
+ {height=0,kern=-30},
+ },
+ },
+ [0x1D453] = {% f
+ bottomright = {
+ {height=0,kern=-135},
+ },
+ },
+ [0x1D44F] = {% b
+ topright = {
+ {height=0,kern=75},
+ },
+ },
+ },
+ ["KpMath-Regular"] = {
+ [0x1D6FD] = {% \beta
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ [0x1D6FF] = {% \delta
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ [0x1D702] = {% \eta
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ [0x1D703] = {% \theta
+ bottomright = {
+ {height=0,kern=10},
+ },
+ },
+ [0x1D714] = {% \omega
+ bottomright = {
+ {height=0,kern=30},
+ },
+ },
+ },
+ }
+ local function initmathkern(tfmdata)
+ local values = mathkerns[tfmdata.properties.psname]
+ if not values then return end
+ for cp, value in next, values do
+ local tcp = type(cp)
+ if tcp == 'string' then
+ cp = tfmdata.resources.unicodes[cp]
+ end
+ local char = tfmdata.characters[cp]
+ if char then
+ local mathkern = char.mathkerns
+ if not mathkern then
+ mathkern = {}
+ char.mathkerns = mathkern
+ end
+ for corner, v in next, value do
+ mathkern[corner] = v
+ end
+ end
+ end
+ end
+ fonts.constructors.newfeatures'otf'.register{
+ name = 'mathkern',
+ description = 'Overwrite mathkern values',
+ initializers = {
+ base = initmathkern,
+ },
+ }
+ }
+ }
+ \ExplSyntaxOn
+ ```
+ - Then, just before `\RequirePackage { unicode-math }`, add these lines:
+ ```latex
+ \sys_if_engine_luatex:T
+ {
+ \mathkern@fix@for@lua
+ }
+ ```
+ - Finally, replace `\setmathfont { KpMath-Regular.otf }` with `\setmathfont [ RawFeature = mathkern ] { KpMath-Regular.otf }`, and replace
+ ```latex
+ \setmathfont { texgyrepagella-math.otf }
+ [
+ range = { it / { Latin, latin }, bfit / { Latin, latin }, up / num, bfup / num }
+ ]
+ ```
+ with
+ ```latex
+ \setmathfont [ RawFeature = mathkern ] { Asana-Math.otf }
+ [
+ range = { it / { Latin, latin }, bfit / { Latin, latin }, up / num, bfup / num }
+ ]
+ ```
# License
diff --git a/macros/unicodetex/latex/simplivre/simplivre.cls b/macros/unicodetex/latex/simplivre/simplivre.cls
index a12190f60b..5bf6da66dd 100644
--- a/macros/unicodetex/latex/simplivre/simplivre.cls
+++ b/macros/unicodetex/latex/simplivre/simplivre.cls
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{simplivre}
- {2023/09/21} {}
+ {2023/09/26} {}
{A simple and clear book style}
\tl_const:Nn \l__minimclass_base_class_tl { book }
@@ -410,8 +410,8 @@
[
UprightFont = *-Regular,
BoldFont = *-Bold,
- ItalicFont = *-Regular,
- BoldItalicFont = *-Bold,
+ ItalicFont = *-ExtraLight,
+ BoldItalicFont = *-SemiBold,
]
}
{
@@ -475,8 +475,8 @@
[
UprightFont = *-Regular,
BoldFont = *-Bold,
- ItalicFont = *-Regular,
- BoldItalicFont = *-Bold,
+ ItalicFont = *-ExtraLight,
+ BoldItalicFont = *-SemiBold,
]
}
{
@@ -540,8 +540,8 @@
[
UprightFont = *-Regular,
BoldFont = *-Bold,
- ItalicFont = *-Regular,
- BoldItalicFont = *-Bold,
+ ItalicFont = *-ExtraLight,
+ BoldItalicFont = *-SemiBold,
]
}
{
@@ -608,18 +608,21 @@
\cs_set:Nn \minimclass_cjk_sffamily: { \CJKfamily { SCsans } }
\cs_set:Nn \minimclass_cjk_ttfamily: { \CJKfamily { SCmono } }
\CJKfamily { SCmain }
+ \hook_gput_code:nnn { normalfont } { minimclass } { \CJKfamily{SCmain} }
}
\AddLanguageSetting [tchinese]
{
\cs_set:Nn \minimclass_cjk_sffamily: { \CJKfamily { TCsans } }
\cs_set:Nn \minimclass_cjk_ttfamily: { \CJKfamily { TCmono } }
\CJKfamily { TCmain }
+ \hook_gput_code:nnn { normalfont } { minimclass } { \CJKfamily{TCmain} }
}
\AddLanguageSetting [japanese]
{
\cs_set:Nn \minimclass_cjk_sffamily: { \CJKfamily { JPsans } }
\cs_set:Nn \minimclass_cjk_ttfamily: { \CJKfamily { JPmono } }
\CJKfamily { JPmain }
+ \hook_gput_code:nnn { normalfont } { minimclass } { \CJKfamily{JPmain} }
}
% \tl_gset:Nn \g_minimalist_title_font_common_tl { \minimclass_cjk_sffamily: }