summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/beaulivre
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/beaulivre')
-rw-r--r--Master/texmf-dist/tex/latex/beaulivre/beaulivre.cls210
1 files changed, 180 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/latex/beaulivre/beaulivre.cls b/Master/texmf-dist/tex/latex/beaulivre/beaulivre.cls
index d6f3ef19c4d..52192ad71a4 100644
--- a/Master/texmf-dist/tex/latex/beaulivre/beaulivre.cls
+++ b/Master/texmf-dist/tex/latex/beaulivre/beaulivre.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{beaulivre}
- [2021/07/30 A colorful book style]
+ [2021/08/08 A colorful book style]
\def\colorclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -116,6 +116,10 @@
\PassOptionsToPackage{no-math}{fontspec}
\RequirePackage{fontspec}
+
+\IfFileExists{colorist-font.tex}{
+ \input{colorist-font.tex}
+}{
\IfFontExistsTF{Palatino Linotype}{%
\setmainfont{Palatino Linotype}
[\if@colorclass@useosf Numbers = OldStyle\fi]
@@ -133,59 +137,205 @@
BoldItalicFont = SourceSansPro-BoldIt.otf ]
\setmonofont{NewCMMono10-Regular.otf}[
Scale = 1.05 ,
- BoldFont = NewCMMono10-Book.otf ,
+ BoldFont = NewCMMono10-Bold.otf ,
ItalicFont = NewCMMono10-Italic.otf ,
- BoldItalicFont = NewCMMono10-BookItalic.otf ]
+ BoldItalicFont = NewCMMono10-BoldOblique.otf ]
+}
\PassOptionsToPackage{fontset=none,scheme=plain}{ctex}
\RequirePackage{ctex}
-\WarningFilter{everysel}{Everysel is no longer required}
-\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{%
- \setCJKmainfont{FZYOUSK_507R--GBK1-0}[
- BoldFont = FZYOUSK_509R--GBK1-0 ,
- BoldFeatures = {FakeBold=4} ,
+
+\IfFileExists{colorist-font.cjk.tex}{
+ \input{colorist-font.cjk.tex}
+}{
+\IfFontExistsTF{SourceHanSerifSC-Regular}{%
+ \setCJKmainfont{SourceHanSerifSC-Regular}[
+ BoldFont = SourceHanSerifSC-Bold ,
ItalicFont = * ,
- BoldItalicFont = FZYOUSK_509R--GBK1-0 ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ BoldItalicFont = SourceHanSerifSC-Bold ]
}{
\setCJKmainfont{FandolSong-Regular.otf}[
BoldFont = FandolSong-Bold.otf ,
ItalicFont = FandolKai-Regular.otf ,
BoldItalicFont = FandolKai-Regular.otf ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ BoldItalicFeatures = {FakeBold=4} ]
}
-\IfFontExistsTF{FZYOUSK_507R--GBK1-0}{%
- \setCJKmonofont{FZYOUSK_507R--GBK1-0}[
- BoldFont = FZYOUSK_509R--GBK1-0 ,
- BoldFeatures = {FakeBold=4} ,
+
+\IfFontExistsTF{SourceHanSansSC-Regular}{%
+ \setCJKsansfont{SourceHanSansSC-Regular}[
+ BoldFont = SourceHanSansSC-Bold ,
ItalicFont = * ,
- BoldItalicFont = FZYOUSK_509R--GBK1-0 ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ BoldItalicFont = SourceHanSansSC-Bold ]
+}{
+ \setCJKsansfont{FandolHei-Regular.otf}[
+ BoldFont = FandolHei-Bold.otf ,
+ ItalicFont = * ,
+ BoldItalicFont = FandolHei-Bold.otf ]
+}
+
+\IfFontExistsTF{SourceHanMonoSC-Regular}{%
+ \setCJKmonofont{SourceHanMonoSC-Regular}[
+ BoldFont = SourceHanMonoSC-Medium ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanMonoSC-Medium ]
}{
\setCJKmonofont{FandolFang-Regular.otf}[
BoldFont = * ,
BoldFeatures = {FakeBold=4} ,
ItalicFont = * ,
BoldItalicFont = * ,
- BoldItalicFeatures = {FakeBold=4} ,
- SmallCapsFont = * ]
+ BoldItalicFeatures = {FakeBold=4} ]
+}
+
+\if@PJLlang@enable@CN
+\IfFontExistsTF{SourceHanSerifSC-Regular}{%
+ \setCJKfamilyfont{SCmain}{SourceHanSerifSC-Regular}[
+ BoldFont = SourceHanSerifSC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerifSC-Bold ]
+}{
+ \setCJKfamilyfont{SCmain}{FandolSong-Regular.otf}[
+ BoldFont = FandolSong-Bold.otf ,
+ ItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFeatures = {FakeBold=4} ]
+}
+\IfFontExistsTF{SourceHanSansSC-Regular}{%
+ \setCJKfamilyfont{SCsans}{SourceHanSansSC-Regular}[
+ BoldFont = SourceHanSansSC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSansSC-Bold ]
+}{
+ \setCJKfamilyfont{SCsans}{FandolHei-Regular.otf}[
+ BoldFont = FandolHei-Bold.otf ,
+ ItalicFont = * ,
+ BoldItalicFont = FandolHei-Bold.otf ]
}
-\IfFontExistsTF{FZYOUHK_506L--GBK1-0}{%
- \setCJKsansfont{FZYOUHK_506L--GBK1-0}[
- BoldFont = FZYOUHK_509R--GBK1-0 ,
+\IfFontExistsTF{SourceHanMonoSC-Regular}{%
+ \setCJKfamilyfont{SCmono}{SourceHanMonoSC-Regular}[
+ BoldFont = SourceHanMonoSC-Medium ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanMonoSC-Medium ]
+}{
+ \setCJKfamilyfont{SCmono}{FandolFang-Regular.otf}[
+ BoldFont = * ,
BoldFeatures = {FakeBold=4} ,
ItalicFont = * ,
- BoldItalicFont = FZYOUHK_509R--GBK1-0 ,
- SmallCapsFont = * ]
+ BoldItalicFont = * ,
+ BoldItalicFeatures = {FakeBold=4} ]
+}
+\fi
+
+\if@PJLlang@enable@TC
+\IfFontExistsTF{SourceHanSerifTC-Regular}{%
+ \setCJKfamilyfont{TCmain}{SourceHanSerifTC-Regular}[
+ BoldFont = SourceHanSerifTC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerifTC-Bold ]
}{
- \setCJKsansfont{FandolHei-Regular.otf}[
+ \setCJKfamilyfont{TCmain}{FandolSong-Regular.otf}[
+ BoldFont = FandolSong-Bold.otf ,
+ ItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFeatures = {FakeBold=4} ]
+}
+\IfFontExistsTF{SourceHanSansTC-Regular}{%
+ \setCJKfamilyfont{TCsans}{SourceHanSansTC-Regular}[
+ BoldFont = SourceHanSansTC-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSansTC-Bold ]
+}{
+ \setCJKfamilyfont{TCsans}{FandolHei-Regular.otf}[
BoldFont = FandolHei-Bold.otf ,
ItalicFont = * ,
- BoldItalicFont = FandolHei-Bold.otf ,
- SmallCapsFont = * ]
+ BoldItalicFont = FandolHei-Bold.otf ]
+}
+\IfFontExistsTF{SourceHanMonoTC-Regular}{%
+ \setCJKfamilyfont{TCmono}{SourceHanMonoTC-Regular}[
+ BoldFont = SourceHanMonoTC-Medium ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanMonoTC-Medium ]
+}{
+ \setCJKfamilyfont{TCmono}{FandolFang-Regular.otf}[
+ BoldFont = * ,
+ BoldFeatures = {FakeBold=4} ,
+ ItalicFont = * ,
+ BoldItalicFont = * ,
+ BoldItalicFeatures = {FakeBold=4} ]
+}
+\fi
+
+\if@PJLlang@enable@JP
+\IfFontExistsTF{SourceHanSerif-Regular}{%
+ \setCJKfamilyfont{JPmain}{SourceHanSerif-Regular}[
+ BoldFont = SourceHanSerif-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSerif-Bold ]
+}{
+ \setCJKfamilyfont{JPmain}{FandolSong-Regular.otf}[
+ BoldFont = FandolSong-Bold.otf ,
+ ItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFont = FandolKai-Regular.otf ,
+ BoldItalicFeatures = {FakeBold=4} ]
+}
+\IfFontExistsTF{SourceHanSans-Regular}{%
+ \setCJKfamilyfont{JPsans}{SourceHanSans-Regular}[
+ BoldFont = SourceHanSans-Bold ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanSans-Bold ]
+}{
+ \setCJKfamilyfont{JPsans}{FandolHei-Regular.otf}[
+ BoldFont = FandolHei-Bold.otf ,
+ ItalicFont = * ,
+ BoldItalicFont = FandolHei-Bold.otf ]
+}
+\IfFontExistsTF{SourceHanMono-Regular}{%
+ \setCJKfamilyfont{JPmono}{SourceHanMono-Regular}[
+ BoldFont = SourceHanMono-Medium ,
+ ItalicFont = * ,
+ BoldItalicFont = SourceHanMono-Medium ]
+}{
+ \setCJKfamilyfont{JPmono}{FandolFang-Regular.otf}[
+ BoldFont = * ,
+ BoldFeatures = {FakeBold=4} ,
+ ItalicFont = * ,
+ BoldItalicFont = * ,
+ BoldItalicFeatures = {FakeBold=4} ]
+}
+\fi
+
+\WarningFilter{latexfont}{Font shape}
+\WarningFilter{latexfont}{Some font}
+
+\def\CJKsffamily{}
+\def\CJKttfamily{}
+
+\apptocmd{\sffamily}{\CJKsffamily}{}{\FAIL}
+\apptocmd{\ttfamily}{\CJKttfamily}{}{\FAIL}
+
+\if@PJLlang@enable@CN
+\gappto{\PJLlang@langconfig@schinese}{%
+ \def\CJKsffamily{\CJKfamily{SCsans}}%
+ \def\CJKttfamily{\CJKfamily{SCmono}}%
+ \CJKfamily{SCmain}%
+}
+\fi
+
+\if@PJLlang@enable@TC
+\gappto{\PJLlang@langconfig@tchinese}{%
+ \def\CJKsffamily{\CJKfamily{TCsans}}%
+ \def\CJKttfamily{\CJKfamily{TCmono}}%
+ \CJKfamily{TCmain}%
+}
+\fi
+
+\if@PJLlang@enable@JP
+\gappto{\PJLlang@langconfig@japanese}{%
+ \def\CJKsffamily{\CJKfamily{JPsans}}%
+ \def\CJKttfamily{\CJKfamily{JPmono}}%
+ \CJKfamily{JPmain}%
+}
+\fi
}
\if@colorclass@customfont\else