- Increase sans font weight from regular to medium.
- Fix multiparagraph boxout formatting. - Add NumberWord command and option for part titles.
This commit is contained in:
@@ -52,6 +52,15 @@
|
|||||||
}
|
}
|
||||||
\NewExpandableDocumentCommand{\DoRomanNumerals}{}{\g_roman_bool}
|
\NewExpandableDocumentCommand{\DoRomanNumerals}{}{\g_roman_bool}
|
||||||
|
|
||||||
|
% Option 'numberword': render Part numbers as number words (e.g. One, Two, Three).
|
||||||
|
\bool_new:N \g_number_word_bool
|
||||||
|
\bool_gset_false:N \g_number_word_bool
|
||||||
|
|
||||||
|
\DeclareOption{numberword}{
|
||||||
|
\bool_gset_true:N \g_number_word_bool
|
||||||
|
}
|
||||||
|
\NewExpandableDocumentCommand{\DoNumberWords}{}{\g_number_word_bool}
|
||||||
|
|
||||||
% Option 'labels': show Part and Chapter labels in the header.
|
% Option 'labels': show Part and Chapter labels in the header.
|
||||||
\bool_new:N \g_label_bool
|
\bool_new:N \g_label_bool
|
||||||
\bool_gset_false:N \g_label_bool
|
\bool_gset_false:N \g_label_bool
|
||||||
|
|||||||
@@ -32,7 +32,11 @@
|
|||||||
warning .initial:e = {false},
|
warning .initial:e = {false},
|
||||||
|
|
||||||
format .cs_set:Np = \__Boxout_format:,
|
format .cs_set:Np = \__Boxout_format:,
|
||||||
format .initial:n = {\justifying},
|
format .initial:n = {
|
||||||
|
\justifying
|
||||||
|
\setlength{\parindent}{0pt}
|
||||||
|
\setlength{\parskip}{\medskipamount}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
\NewDocumentEnvironment{Boxout}{
|
\NewDocumentEnvironment{Boxout}{
|
||||||
@@ -55,16 +59,12 @@
|
|||||||
\tl_if_empty:nTF {#3} {
|
\tl_if_empty:nTF {#3} {
|
||||||
% No header
|
% No header
|
||||||
\expanded{\noexpand\begin{tblrBoxout}{\l_Boxout_innerspec_tl}}
|
\expanded{\noexpand\begin{tblrBoxout}{\l_Boxout_innerspec_tl}}
|
||||||
\setlength{\parskip}{\medskipamount}
|
|
||||||
\setlength{\parindent}{0pt}
|
|
||||||
\__Boxout_format:\ignorespaces#4\\
|
\__Boxout_format:\ignorespaces#4\\
|
||||||
\end{tblrBoxout}
|
\end{tblrBoxout}
|
||||||
}{
|
}{
|
||||||
% Yes header
|
% Yes header
|
||||||
\expanded{\noexpand\begin{tblrBoxout}{\l_Boxout_innerspec_tl}}
|
\expanded{\noexpand\begin{tblrBoxout}{\l_Boxout_innerspec_tl}}
|
||||||
\SetCell{halign=c, font={\sbfamily\bfseries}}{#3}\\
|
\SetCell{halign=c, font={\sbfamily\bfseries}}{#3}\\
|
||||||
\setlength{\parskip}{\medskipamount}
|
|
||||||
\setlength{\parindent}{0pt}
|
|
||||||
\__Boxout_format:\ignorespaces#4\\
|
\__Boxout_format:\ignorespaces#4\\
|
||||||
\end{tblrBoxout}
|
\end{tblrBoxout}
|
||||||
}
|
}
|
||||||
@@ -143,6 +143,8 @@
|
|||||||
\dim_const:Nn \c_WrapBoxout_width_dim {3in}
|
\dim_const:Nn \c_WrapBoxout_width_dim {3in}
|
||||||
\dim_const:Nn \c_WrapBoxout_justifywidth_dim {18em}
|
\dim_const:Nn \c_WrapBoxout_justifywidth_dim {18em}
|
||||||
|
|
||||||
|
\str_new:N \l_WrapBoxout_passed_keys_str
|
||||||
|
|
||||||
\keys_define:nn{}{
|
\keys_define:nn{}{
|
||||||
WrapBoxout .inherit:n = {WrapFig, Boxout},
|
WrapBoxout .inherit:n = {WrapFig, Boxout},
|
||||||
}
|
}
|
||||||
@@ -152,6 +154,10 @@
|
|||||||
|
|
||||||
width .dim_set:N = \l_WrapBoxout_width_dim,
|
width .dim_set:N = \l_WrapBoxout_width_dim,
|
||||||
width .initial:e = {\c_WrapBoxout_width_dim},
|
width .initial:e = {\c_WrapBoxout_width_dim},
|
||||||
|
|
||||||
|
unknown.code:n = {
|
||||||
|
\str_put_right:Ne \l_WrapBoxout_passed_keys_str {\l_keys_key_str=\l_keys_value_tl,}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
\cs_new:Npn \__WrapBoxout_format: {}
|
\cs_new:Npn \__WrapBoxout_format: {}
|
||||||
@@ -168,20 +174,16 @@
|
|||||||
}{ \group_begin:
|
}{ \group_begin:
|
||||||
\keys_set:nn{WrapBoxout}{#1}
|
\keys_set:nn{WrapBoxout}{#1}
|
||||||
\__WrapFig_process_options:
|
\__WrapFig_process_options:
|
||||||
|
\message{WrapBoxout:~\l_WrapFig_passed_keys_str}
|
||||||
\dim_compare:nNnTF {\l_WrapBoxout_width_dim} > {\l_WrapBoxout_justifywidth_dim} {
|
\dim_compare:nNnTF {\l_WrapBoxout_width_dim} > {\l_WrapBoxout_justifywidth_dim} {
|
||||||
\cs_set:Nn \__WrapBoxout_format: {\justifying}
|
\cs_set:Nn \__WrapBoxout_format: {\justifying}
|
||||||
} {
|
} {
|
||||||
\cs_set:Nn \__WrapBoxout_format: {\l_WrapFig_format_tl}
|
\cs_set:Nn \__WrapBoxout_format: {\l_WrapFig_format_tl}
|
||||||
}
|
}
|
||||||
% \message{
|
|
||||||
% WrapBoxout:~
|
|
||||||
% placement:~\l_WrapFig_placement_str,~
|
|
||||||
% hoffset:~\dim_use:N \l_WrapFig_hoffset_dim,~
|
|
||||||
% warning:~\bool_to_str:N \l_Boxout_warning_bool}
|
|
||||||
\expanded{\noexpand\begin{wrapstuff}[
|
\expanded{\noexpand\begin{wrapstuff}[
|
||||||
\l_WrapFig_placement_str,
|
\l_WrapFig_placement_str,
|
||||||
hoffset = {\dim_use:N \l_WrapFig_hoffset_dim},
|
hoffset = {\dim_use:N \l_WrapFig_hoffset_dim},
|
||||||
\l_WrapFig_passed_keys_str,
|
\l_WrapBoxout_passed_keys_str,
|
||||||
]}
|
]}
|
||||||
\begin{Boxout}[
|
\begin{Boxout}[
|
||||||
innerspec:e = {
|
innerspec:e = {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
format .default:n = {},
|
format .default:n = {},
|
||||||
|
|
||||||
skip .dim_set:N = \l_MyCaption_skip_dim,
|
skip .dim_set:N = \l_MyCaption_skip_dim,
|
||||||
skip .initial:n = {\medskipamount},
|
skip .initial:n = {\smallskipamount},
|
||||||
|
|
||||||
table .code:n = {
|
table .code:n = {
|
||||||
\str_set:Nn \l_MyCaption_type_str {table}
|
\str_set:Nn \l_MyCaption_type_str {table}
|
||||||
|
|||||||
@@ -114,25 +114,32 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
\NewDocumentCommand{\CenterFig}{
|
\NewDocumentCommand{\CenterFig}{
|
||||||
% Key-value options.
|
% #1: Star argument. If present, graphic is automatically scaled to line
|
||||||
|
% width. (Not working, do not use.)
|
||||||
|
s
|
||||||
|
% #2: Key-value options.
|
||||||
O{}
|
O{}
|
||||||
% Graphic file.
|
% #3: Graphic file.
|
||||||
m
|
m
|
||||||
% Key-value options passed to \includegraphics.
|
% #4: Key-value options passed to \includegraphics.
|
||||||
O{}
|
O{}
|
||||||
% Label.
|
% #5: Label.
|
||||||
>{\TrimSpaces}m
|
>{\TrimSpaces}m
|
||||||
% Caption.
|
% #6: Caption.
|
||||||
m
|
m
|
||||||
}{ \group_begin:
|
}{ \group_begin:
|
||||||
\keys_set:nn{CenterFig}{#1}
|
\keys_set:nn{CenterFig}{#2}
|
||||||
|
\str_set:Nn \l_CenterFig_passed_keys_str {#4}
|
||||||
|
% \bool_if:nT {#1} {
|
||||||
|
% \str_put_left:Nn \l_CenterFig_passed_keys_str {width=\linewidth,}
|
||||||
|
% }
|
||||||
\clist_use_default:Nnnn \l_CenterFig_placement_str
|
\clist_use_default:Nnnn \l_CenterFig_placement_str
|
||||||
{\l_Float_placement_clist}
|
{\l_Float_placement_clist}
|
||||||
{\c_Float_placement_clist}
|
{\c_Float_placement_clist}
|
||||||
\expanded{\noexpand\begin{figure}[\l_CenterFig_placement_str]}
|
\expanded{\noexpand\begin{figure}[\l_CenterFig_placement_str]}
|
||||||
\begin{MyCaption}{fig:#4}{#5}
|
\begin{MyCaption}{fig:#5}{#6}
|
||||||
\Centering
|
\Centering
|
||||||
\includegraphics[keepaspectratio,#3]{#2}
|
\includegraphics[keepaspectratio,#4]{#3}
|
||||||
\end{MyCaption}
|
\end{MyCaption}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
\group_end: }
|
\group_end: }
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
\NewDocumentCommand{\fontpath}{}{PrimeTeX/fonts}
|
\NewDocumentCommand{\fontpath}{}{PrimeTeX/fonts}
|
||||||
|
|
||||||
% Main font: Roboto Serif
|
% Main font: Roboto Serif (Light).
|
||||||
\setmainfont{RobotoSerif}[
|
\setmainfont{RobotoSerif}[
|
||||||
Path = {\fontpath/RobotoSerif/},
|
Path = {\fontpath/RobotoSerif/},
|
||||||
Extension = .ttf,
|
Extension = .ttf,
|
||||||
@@ -15,13 +15,13 @@
|
|||||||
BoldItalicFont = *-SemiBoldItalic,
|
BoldItalicFont = *-SemiBoldItalic,
|
||||||
]
|
]
|
||||||
|
|
||||||
% Sans serif font: Roboto
|
% Sans serif font: Roboto (Medium).
|
||||||
\setsansfont{Roboto}[
|
\setsansfont{Roboto}[
|
||||||
Path = {\fontpath/Roboto/},
|
Path = {\fontpath/Roboto/},
|
||||||
Extension = .ttf,
|
Extension = .ttf,
|
||||||
UprightFont = *-Regular,
|
UprightFont = *-Medium,
|
||||||
BoldFont = *-Bold,
|
BoldFont = *-Bold,
|
||||||
ItalicFont = *-Italic,
|
ItalicFont = *-MediumItalic,
|
||||||
BoldItalicFont = *-BoldItalic,
|
BoldItalicFont = *-BoldItalic,
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
BoldItalicFont = *-BoldItalic,
|
BoldItalicFont = *-BoldItalic,
|
||||||
]
|
]
|
||||||
|
|
||||||
% Headings & Titles font: Roboto Slab
|
% Headings & Titles font: Roboto Slab (Semibold).
|
||||||
\newfontfamily{\sbfamily}{RobotoSlab}[
|
\newfontfamily{\sbfamily}{RobotoSlab}[
|
||||||
Path = {\fontpath/},
|
Path = {\fontpath/},
|
||||||
Extension = .ttf,
|
Extension = .ttf,
|
||||||
@@ -69,6 +69,10 @@
|
|||||||
\NewDocumentCommand{\bdot}{}{.\zws}
|
\NewDocumentCommand{\bdot}{}{.\zws}
|
||||||
|
|
||||||
% MenuKeys configuration.
|
% MenuKeys configuration.
|
||||||
|
\newmenucolortheme{autoModeColor}{named}{pageColor}{textColor}{textColor}
|
||||||
|
|
||||||
|
\changemenucolortheme{hyphenatepaths}{autoModeColor}
|
||||||
|
|
||||||
\renewmenumacro{\directory}[/]{hyphenatepaths}
|
\renewmenumacro{\directory}[/]{hyphenatepaths}
|
||||||
\renewmenumacro{\keys}[+]{shadowedangularkeys}
|
\renewmenumacro{\keys}[+]{shadowedangularkeys}
|
||||||
\renewmenumacro{\menu}[>]{angularmenus}
|
\renewmenumacro{\menu}[>]{angularmenus}
|
||||||
|
|||||||
@@ -83,12 +83,12 @@
|
|||||||
}{ \group_begin:
|
}{ \group_begin:
|
||||||
\keys_set:nn {WrapFig} {#1}
|
\keys_set:nn {WrapFig} {#1}
|
||||||
\__WrapFig_process_options:
|
\__WrapFig_process_options:
|
||||||
\message{
|
% \message{
|
||||||
WrapFig:~#4,~
|
% WrapFig:~#4,~
|
||||||
placement:~\l_WrapFig_placement_str,~
|
% placement:~\l_WrapFig_placement_str,~
|
||||||
hoffset:~\dim_use:N \l_WrapFig_hoffset_dim,
|
% hoffset:~\dim_use:N \l_WrapFig_hoffset_dim,
|
||||||
passed_keys:~\l_WrapFig_passed_keys_str
|
% passed_keys:~\l_WrapFig_passed_keys_str
|
||||||
}
|
% }
|
||||||
\expanded{\noexpand\begin{wrapstuff}[
|
\expanded{\noexpand\begin{wrapstuff}[
|
||||||
\l_WrapFig_placement_str,
|
\l_WrapFig_placement_str,
|
||||||
hoffset = {\dim_use:N \l_WrapFig_hoffset_dim},
|
hoffset = {\dim_use:N \l_WrapFig_hoffset_dim},
|
||||||
|
|||||||
@@ -3,10 +3,42 @@
|
|||||||
Title formatting definitions.
|
Title formatting definitions.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\NewExpandableDocumentCommand{\NumberWord}{O{lowercase} m}{
|
||||||
|
\use:c {text_#1:n} {
|
||||||
|
\int_case:nn {#2} {
|
||||||
|
{0} {zero}
|
||||||
|
{1} {one}
|
||||||
|
{2} {two}
|
||||||
|
{3} {three}
|
||||||
|
{4} {four}
|
||||||
|
{5} {five}
|
||||||
|
{6} {six}
|
||||||
|
{7} {seven}
|
||||||
|
{8} {eight}
|
||||||
|
{9} {nine}
|
||||||
|
{10} {ten}
|
||||||
|
{11} {eleven}
|
||||||
|
{12} {twelve}
|
||||||
|
{13} {thirteen}
|
||||||
|
{14} {fourteen}
|
||||||
|
{15} {fifteen}
|
||||||
|
{16} {sixteen}
|
||||||
|
{17} {seventeen}
|
||||||
|
{18} {eighteen}
|
||||||
|
{19} {nineteen}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
\bool_if:NF \g_roman_bool {
|
\bool_if:NF \g_roman_bool {
|
||||||
\renewcommand{\thepart}{\arabic{part}}
|
\renewcommand{\thepart}{\arabic{part}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\bool_if:NT \g_number_word_bool {
|
||||||
|
\renewcommand{\thepart}{\NumberWord[titlecase_all]{\value{part}}}
|
||||||
|
}
|
||||||
|
|
||||||
\titleformat{\part}[display]{
|
\titleformat{\part}[display]{
|
||||||
\normalfont\sbfamily\huge
|
\normalfont\sbfamily\huge
|
||||||
}{
|
}{
|
||||||
|
|||||||
Reference in New Issue
Block a user