summaryrefslogtreecommitdiff
path: root/macros/unicodetex/latex/beaulivre
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-07-15 03:00:53 +0000
committerNorbert Preining <norbert@preining.info>2023-07-15 03:00:53 +0000
commitf506889527fff6570e2878d55abbacf7227f2b3e (patch)
treecd24fedd1e37c61b098b38f95487b69d29e37397 /macros/unicodetex/latex/beaulivre
parentd4f9602cb865c2132ad3893fdb906be0f87f4d06 (diff)
CTAN sync 202307150300
Diffstat (limited to 'macros/unicodetex/latex/beaulivre')
-rw-r--r--macros/unicodetex/latex/beaulivre/README.md2
-rw-r--r--macros/unicodetex/latex/beaulivre/beaulivre.cls109
2 files changed, 95 insertions, 16 deletions
diff --git a/macros/unicodetex/latex/beaulivre/README.md b/macros/unicodetex/latex/beaulivre/README.md
index 1841ec55d5..7ae628f855 100644
--- a/macros/unicodetex/latex/beaulivre/README.md
+++ b/macros/unicodetex/latex/beaulivre/README.md
@@ -2,7 +2,7 @@
# `beaulivre` : write you books in a colorful way
-> **New documentations are being written and are expected to be completed by the end of 2023. In the meantime, only the core code would be included in TeX Live 2023 coming this April (old documentations have been removed from the distribution).**
+> **New documentations are still being written. For now, only the core code is included in TeX Live 2023 (old documentations have been removed from the distribution).**
`beaulivre` is a LaTeX class for typesetting books, which has a colorful design.
diff --git a/macros/unicodetex/latex/beaulivre/beaulivre.cls b/macros/unicodetex/latex/beaulivre/beaulivre.cls
index b73a8a293b..6a88c6e949 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/01/05} {}
+ {2023/07/14} {}
{A colorful book style}
\tl_const:Nn \l__colorclass_base_class_tl { book }
@@ -103,6 +103,9 @@
, b5paper .bool_set:N = \l__colorclass_b_five_paper_bool
, b5paper .initial:n = { false }
+ , oneside .code:n = { \PassOptionsToClass { \CurrentOption } { \l__colorclass_base_class_tl } }
+ , twoside .code:n = { \PassOptionsToClass { \CurrentOption } { \l__colorclass_base_class_tl } }
+
, 11pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__colorclass_base_class_tl } }
, 12pt .code:n = { \PassOptionsToClass { \CurrentOption } { \l__colorclass_base_class_tl } }
@@ -243,16 +246,26 @@
BoldItalicFont = *-BoldItalic,
Numbers = OldStyle ,
]
- \setsansfont { SourceSansPro }
+ \setsansfont { texgyreheros }
[
- Extension = .otf,
- UprightFont = *-Regular,
- BoldFont = *-Semibold,
- ItalicFont = *-RegularIt,
- BoldItalicFont = *-SemiboldIt,
- WordSpace = {1.25, 1, 1} ,
+ Extension = .otf ,
+ Scale = MatchUppercase ,
+ UprightFont = *-regular ,
+ BoldFont = *-bold ,
+ ItalicFont = *-italic ,
+ BoldItalicFont = *-bolditalic ,
Numbers = OldStyle ,
]
+ % \setsansfont { SourceSansPro }
+ % [
+ % Extension = .otf,
+ % UprightFont = *-Regular,
+ % BoldFont = *-Semibold,
+ % ItalicFont = *-RegularIt,
+ % BoldItalicFont = *-SemiboldIt,
+ % WordSpace = {1.25, 1, 1} ,
+ % Numbers = OldStyle ,
+ % ]
}
{
\setmainfont { TeXGyrePagellaX }
@@ -263,15 +276,24 @@
ItalicFont = *-Italic,
BoldItalicFont = *-BoldItalic,
]
- \setsansfont { SourceSansPro }
+ \setsansfont { texgyreheros }
[
- Extension = .otf,
- UprightFont = *-Regular,
- BoldFont = *-Semibold,
- ItalicFont = *-RegularIt,
- BoldItalicFont = *-SemiboldIt,
- WordSpace = {1.25, 1, 1} ,
+ Extension = .otf ,
+ Scale = MatchUppercase ,
+ UprightFont = *-regular ,
+ BoldFont = *-bold ,
+ ItalicFont = *-italic ,
+ BoldItalicFont = *-bolditalic ,
]
+ % \setsansfont { SourceSansPro }
+ % [
+ % Extension = .otf,
+ % UprightFont = *-Regular,
+ % BoldFont = *-Semibold,
+ % ItalicFont = *-RegularIt,
+ % BoldItalicFont = *-SemiboldIt,
+ % WordSpace = {1.25, 1, 1} ,
+ % ]
}
\setmonofont { NewCMMono10 }
[
@@ -624,6 +646,7 @@
\setmathfont { KpMath-Regular.otf } [ range = { cal, bfcal }, RawFeature=+ss01 ]
% \setmathfont { KpMath-Regular.otf } [ range = {} ]
+ % https://tex.stackexchange.com/a/646715
\sys_if_engine_luatex:T
{
\mathitalicsmode=1
@@ -633,6 +656,11 @@
{
\cs_gset_eq:NN \overline \wideoverbar
\cs_gset_eq:NN \square \mdwhtsquare
+
+ % https://tex.stackexchange.com/a/678611
+ \newcommand{\limstrut}{\vrule depth0.2ex width 0pt}
+ \renewcommand{\varprojlim}{\mathop{\underleftarrow{{\lim}\limstrut}}}
+ \renewcommand{\varinjlim}{\mathop{\underrightarrow{{\lim}\limstrut}}}
}
% https://tex.stackexchange.com/a/647789
@@ -650,6 +678,22 @@
\endgroup
}
+ % https://tex.stackexchange.com/a/678998
+ \hook_gput_code:nnn { begindocument } { colorclass }
+ {
+ \NewCommandCopy\standarddashv\dashv
+ \NewCommandCopy\standardvdash\vdash
+ \RenewDocumentCommand{\dashv}{}{\mathrel{\mathpalette\raisesymbol\standarddashv}}
+ \RenewDocumentCommand{\vdash}{}{\mathrel{\mathpalette\raisesymbol\standardvdash}}
+ }
+ \newcommand{\raisesymbol}[2]{%
+ \begingroup
+ \sbox\z@{$\m@th#1A$}%
+ \sbox\tw@{$\m@th#1#2$}%
+ \raisebox{\dimexpr(\ht\z@-\ht\tw@)/2}{\usebox{\tw@}}%
+ \endgroup
+ }
+
\RequirePackage { tikz-cd }
\tikzcdset { arrow~style = tikz, diagrams = { >={Stealth[round,length=3.4pt,width=6.15pt,inset=2.25pt]} } }
@@ -710,6 +754,41 @@
{
\colorclass_xarrows_generic:nnnn { #1 } { #2 } {} { edge [ commutative~diagrams/twoheadleftarrow ] }
}
+
+ \cs_new_protected:Nn \colorclass_xarrows_double_generic:nnnnnn
+ % #3 = option of \tikz
+ % #4 = edge 1 of \draw
+ % #5 = edge 2 of \draw
+ % #6 = sep/2
+ {
+ \hbox_set:Nn \l__colorclass_xarrows_below_box { \ensuremath { \scriptstyle #1 } }
+ \hbox_set:Nn \l__colorclass_xarrows_above_box { \ensuremath { \scriptstyle #2 } }
+ \dim_set:Nn \l__colorclass_xarrows_length_dim
+ { \dim_eval:n { \dim_max:nn { \box_wd:N \l__colorclass_xarrows_below_box } { \box_wd:N \l__colorclass_xarrows_above_box } + 1em } }
+ \mathrel
+ {
+ \tikz [ #3, line~width = .6pt, baseline = -.5ex, every~node/.style = { inner~sep = 0pt }, >={Stealth[round,length=3.4pt,width=6.15pt,inset=2.25pt]} ]
+ {
+ \draw (0,#6) #4
+ node [ below = 4pt+#6 ] { \box_use:N \l__colorclass_xarrows_below_box }
+ ( \l__colorclass_xarrows_length_dim ,#6) ;
+ \draw (0,-#6) #5
+ node [ above = 3pt+#6 ] { \box_use:N \l__colorclass_xarrows_above_box }
+ ( \l__colorclass_xarrows_length_dim ,-#6) ;
+ }
+ }
+ }
+
+ \NewDocumentCommand \xrightrightarrows { O{} m }
+ {
+ \colorclass_xarrows_double_generic:nnnnnn { #1 } { #2 } {} { edge [ commutative~diagrams/rightarrow ] } { edge [ commutative~diagrams/rightarrow ] } { .2em }
+ }
+
+ \NewDocumentCommand \xleftleftarrows { O{} m }
+ {
+ \colorclass_xarrows_double_generic:nnnnnn { #1 } { #2 } {} { edge [ commutative~diagrams/leftarrow ] } { edge [ commutative~diagrams/leftarrow ] } { .2em }
+ }
+
\hook_gput_code:nnn { begindocument/end } { colorclass }
{
\RenewDocumentCommand \twoheadrightarrow {}