summaryrefslogtreecommitdiff
path: root/macros/unicodetex/latex/beaulivre/beaulivre.cls
diff options
context:
space:
mode:
Diffstat (limited to 'macros/unicodetex/latex/beaulivre/beaulivre.cls')
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre.cls18
1 files changed, 12 insertions, 6 deletions
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre.cls b/macros/unicodetex/latex/beaulivre/beaulivre.cls
index c5e5821c22..79ac9ee080 100644
--- a/macros/unicodetex/latex/beaulivre/beaulivre.cls
+++ b/macros/unicodetex/latex/beaulivre/beaulivre.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{beaulivre}
- [2021/06/30 A colorful book style]
+ [2021/07/15 A colorful book style]
\def\colorclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -42,6 +42,7 @@
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\colorclass@baseclass}}
\ProcessKeyvalOptions*\relax
\LoadClass{\colorclass@baseclass}
+
\if@colorclass@draft
\@colorclass@fasttrue
\fi
@@ -97,19 +98,18 @@
\RequirePackage{draftwatermark}
\DraftwatermarkOptions{text={\normalfont DRAFT},color=paper!95!-paper}
\fi
+
\RequirePackage{colorist}
%%================================
%% Fonts
%%================================
-%% Math fonts in fast mode
\if@colorclass@customfont\else
\if@colorclass@fast
\RequirePackage{mathpazo}
\fi
\fi
-%% English fonts
\PassOptionsToPackage{no-math}{fontspec}
\RequirePackage{fontspec}
\IfFontExistsTF{Palatino Linotype}{%
@@ -133,7 +133,6 @@
ItalicFont = cmunst.otf ,
BoldItalicFont = cmuntb.otf ]
-%% Chinese fonts
\PassOptionsToPackage{fontset=none,scheme=plain}{ctex}
\RequirePackage{ctex}
\WarningFilter{everysel}{Everysel is no longer required}
@@ -185,7 +184,6 @@
SmallCapsFont = * ]
}
-%% Math font
\if@colorclass@customfont\else
\if@colorclass@fast
\RequirePackage{amssymb}
@@ -215,6 +213,14 @@
\setmathfont[range={up/num, bfup/num}
]{texgyrepagella-math.otf}
+\AtBeginDocument{
+\let\mid@original\mid
+\renewcommand{\mid}{\hspace{-.2em}\mid@original\hspace{-.2em}}
+\let\nmid@original\nmid
+\renewcommand{\nmid}{\hspace{-.2em}\nmid@original\hspace{-.2em}}
+}
+
+\RequirePackage{tikz-cd}
\newbox\xratbelow
\newbox\xratabove
\renewcommand{\xrightarrow}[2][]{%
@@ -273,6 +279,7 @@
\draw (0,0) edge[commutative diagrams/equal] node[below=3pt] {\box\xratbelow}
node[above=2pt] {\box\xratabove}
(\xratlen,0) ;}}
+
\AtBeginDocument{
\renewcommand{\twoheadrightarrow}{%
\mathrel{\tikz [baseline=-.55ex, every node/.style={inner sep=0pt}]
@@ -344,7 +351,6 @@
\def\PJL@font@alreadyset{}
-%% Minor improvements
\PassOptionsToPackage{verbose=silent}{microtype}
\RequirePackage{microtype}
\PassOptionsToPackage{all}{nowidow}