summaryrefslogtreecommitdiff
path: root/macros/unicodetex/latex/lebhart/lebhart.cls
diff options
context:
space:
mode:
Diffstat (limited to 'macros/unicodetex/latex/lebhart/lebhart.cls')
-rw-r--r--macros/unicodetex/latex/lebhart/lebhart.cls83
1 files changed, 79 insertions, 4 deletions
diff --git a/macros/unicodetex/latex/lebhart/lebhart.cls b/macros/unicodetex/latex/lebhart/lebhart.cls
index 7a3b261fe8..799021b560 100644
--- a/macros/unicodetex/latex/lebhart/lebhart.cls
+++ b/macros/unicodetex/latex/lebhart/lebhart.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{lebhart}
- [2021/05/24 A colorful article style]
+ [2021/06/07 A colorful article style]
\def\colorclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -27,6 +27,11 @@
}
\DeclareBoolOption[false]{draft}
\DeclareBoolOption[false]{fast}
+\DeclareBoolOption[false]{palatino}
+\DeclareBoolOption[false]{times}
+\DeclareBoolOption[false]{garamond}
+\DeclareBoolOption[false]{biolinum}
+\DeclareBoolOption[false]{customfont}
\newif\if@colorclass@bfivepaper\@colorclass@bfivepaperfalse
\DeclareVoidOption{b5paper}{\@colorclass@bfivepapertrue}
@@ -39,6 +44,18 @@
\if@colorclass@draft
\@colorclass@fasttrue
\fi
+\if@colorclass@palatino
+ \@colorclass@customfonttrue
+\fi
+\if@colorclass@times
+ \@colorclass@customfonttrue
+\fi
+\if@colorclass@garamond
+ \@colorclass@customfonttrue
+\fi
+\if@colorclass@biolinum
+ \@colorclass@customfonttrue
+\fi
%%================================
%% Page layout
@@ -85,8 +102,10 @@
%% Fonts
%%================================
%% Math fonts in fast mode
-\if@colorclass@fast
- \RequirePackage{mathpazo}
+\if@colorclass@customfont\else
+ \if@colorclass@fast
+ \RequirePackage{mathpazo}
+ \fi
\fi
%% English fonts
@@ -114,6 +133,7 @@
%% Chinese fonts
\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 ,
@@ -163,6 +183,7 @@
}
%% Math font
+\if@colorclass@customfont\else
\if@colorclass@fast
\RequirePackage{amssymb}
\else
@@ -212,10 +233,64 @@
\setmathfont[range=bfcal, Scale=MatchUppercase, Alternate]{Asana-Math.otf}
}{}
\fi
+\fi
+
+\let\colorist@sffamily\sffamily
+\let\colorist@textsc\textsc
+
+\if@colorclass@palatino
+ \RequirePackage{amssymb}
+ \RequirePackage{mathpazo}
+ \PassOptionsToPackage{defaultsups}{newpxtext}
+ \RequirePackage{newpxtext}
+ \RequirePackage{newpxmath}
+ \let\openbox\relax
+ \PJLsetlinespacing{\setstretch{1.07}}
+\fi
+
+\if@colorclass@times
+ \RequirePackage{amssymb}
+ \PassOptionsToPackage{defaultsups}{newtxtext}
+ \RequirePackage{newtxtext}
+ \RequirePackage{newtxmath}
+ \let\openbox\relax
+ \PJLsetlinespacing{\setstretch{1.00}}
+ \let\colorist@sffamily\relax
+\fi
+
+\if@colorclass@garamond
+ \RequirePackage{amssymb}
+ \PassOptionsToPackage{lining}{ebgaramond}
+ \RequirePackage{ebgaramond-maths}
+ \RequirePackage{ebgaramond}
+ % \RequirePackage{garamondlibre}
+ \PJLsetlinespacing{\setstretch{1.00}}
+ \let\colorist@sffamily\relax
+\fi
+
+\if@colorclass@biolinum
+ \RequirePackage{amssymb}
+ % \RequirePackage{mathpazo}
+ % \RequirePackage[sansmath]{libertinust1math}
+ \ifPDFTeX
+ \RequirePackage{biolinum}
+ \renewcommand*\familydefault{\biolinum@family}
+ \else
+ \PassOptionsToPackage{no-math}{fontspec}
+ \RequirePackage{fontspec}
+ \setmainfont{LinBiolinum_R.otf}[
+ BoldFont = LinBiolinum_RB.otf ,
+ ItalicFont = LinBiolinum_RI.otf ,
+ BoldItalicFont = LinBiolinum_RBO.otf ]
+ \fi
+ \PJLsetlinespacing{\setstretch{1.05}}
+ \RequirePackage[italic,defaultmathsizes]{mathastext}
+\fi
\def\PJL@font@alreadyset{}
-\RequirePackage[verbose=silent]{microtype}
+\PassOptionsToPackage{verbose=silent}{microtype}
+\RequirePackage{microtype}
%%================================
%% Graphics