- 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:
@@ -32,7 +32,11 @@
|
||||
warning .initial:e = {false},
|
||||
|
||||
format .cs_set:Np = \__Boxout_format:,
|
||||
format .initial:n = {\justifying},
|
||||
format .initial:n = {
|
||||
\justifying
|
||||
\setlength{\parindent}{0pt}
|
||||
\setlength{\parskip}{\medskipamount}
|
||||
},
|
||||
}
|
||||
|
||||
\NewDocumentEnvironment{Boxout}{
|
||||
@@ -55,16 +59,12 @@
|
||||
\tl_if_empty:nTF {#3} {
|
||||
% No header
|
||||
\expanded{\noexpand\begin{tblrBoxout}{\l_Boxout_innerspec_tl}}
|
||||
\setlength{\parskip}{\medskipamount}
|
||||
\setlength{\parindent}{0pt}
|
||||
\__Boxout_format:\ignorespaces#4\\
|
||||
\end{tblrBoxout}
|
||||
}{
|
||||
% Yes header
|
||||
\expanded{\noexpand\begin{tblrBoxout}{\l_Boxout_innerspec_tl}}
|
||||
\SetCell{halign=c, font={\sbfamily\bfseries}}{#3}\\
|
||||
\setlength{\parskip}{\medskipamount}
|
||||
\setlength{\parindent}{0pt}
|
||||
\__Boxout_format:\ignorespaces#4\\
|
||||
\end{tblrBoxout}
|
||||
}
|
||||
@@ -143,6 +143,8 @@
|
||||
\dim_const:Nn \c_WrapBoxout_width_dim {3in}
|
||||
\dim_const:Nn \c_WrapBoxout_justifywidth_dim {18em}
|
||||
|
||||
\str_new:N \l_WrapBoxout_passed_keys_str
|
||||
|
||||
\keys_define:nn{}{
|
||||
WrapBoxout .inherit:n = {WrapFig, Boxout},
|
||||
}
|
||||
@@ -152,6 +154,10 @@
|
||||
|
||||
width .dim_set:N = \l_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: {}
|
||||
@@ -168,20 +174,16 @@
|
||||
}{ \group_begin:
|
||||
\keys_set:nn{WrapBoxout}{#1}
|
||||
\__WrapFig_process_options:
|
||||
\message{WrapBoxout:~\l_WrapFig_passed_keys_str}
|
||||
\dim_compare:nNnTF {\l_WrapBoxout_width_dim} > {\l_WrapBoxout_justifywidth_dim} {
|
||||
\cs_set:Nn \__WrapBoxout_format: {\justifying}
|
||||
} {
|
||||
\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}[
|
||||
\l_WrapFig_placement_str,
|
||||
hoffset = {\dim_use:N \l_WrapFig_hoffset_dim},
|
||||
\l_WrapFig_passed_keys_str,
|
||||
\l_WrapBoxout_passed_keys_str,
|
||||
]}
|
||||
\begin{Boxout}[
|
||||
innerspec:e = {
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
format .default:n = {},
|
||||
|
||||
skip .dim_set:N = \l_MyCaption_skip_dim,
|
||||
skip .initial:n = {\medskipamount},
|
||||
skip .initial:n = {\smallskipamount},
|
||||
|
||||
table .code:n = {
|
||||
\str_set:Nn \l_MyCaption_type_str {table}
|
||||
|
||||
@@ -114,25 +114,32 @@
|
||||
}
|
||||
|
||||
\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{}
|
||||
% Graphic file.
|
||||
% #3: Graphic file.
|
||||
m
|
||||
% Key-value options passed to \includegraphics.
|
||||
% #4: Key-value options passed to \includegraphics.
|
||||
O{}
|
||||
% Label.
|
||||
% #5: Label.
|
||||
>{\TrimSpaces}m
|
||||
% Caption.
|
||||
% #6: Caption.
|
||||
m
|
||||
}{ \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
|
||||
{\l_Float_placement_clist}
|
||||
{\c_Float_placement_clist}
|
||||
\expanded{\noexpand\begin{figure}[\l_CenterFig_placement_str]}
|
||||
\begin{MyCaption}{fig:#4}{#5}
|
||||
\begin{MyCaption}{fig:#5}{#6}
|
||||
\Centering
|
||||
\includegraphics[keepaspectratio,#3]{#2}
|
||||
\includegraphics[keepaspectratio,#4]{#3}
|
||||
\end{MyCaption}
|
||||
\end{figure}
|
||||
\group_end: }
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
\NewDocumentCommand{\fontpath}{}{PrimeTeX/fonts}
|
||||
|
||||
% Main font: Roboto Serif
|
||||
% Main font: Roboto Serif (Light).
|
||||
\setmainfont{RobotoSerif}[
|
||||
Path = {\fontpath/RobotoSerif/},
|
||||
Extension = .ttf,
|
||||
@@ -15,13 +15,13 @@
|
||||
BoldItalicFont = *-SemiBoldItalic,
|
||||
]
|
||||
|
||||
% Sans serif font: Roboto
|
||||
% Sans serif font: Roboto (Medium).
|
||||
\setsansfont{Roboto}[
|
||||
Path = {\fontpath/Roboto/},
|
||||
Extension = .ttf,
|
||||
UprightFont = *-Regular,
|
||||
UprightFont = *-Medium,
|
||||
BoldFont = *-Bold,
|
||||
ItalicFont = *-Italic,
|
||||
ItalicFont = *-MediumItalic,
|
||||
BoldItalicFont = *-BoldItalic,
|
||||
]
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
BoldItalicFont = *-BoldItalic,
|
||||
]
|
||||
|
||||
% Headings & Titles font: Roboto Slab
|
||||
% Headings & Titles font: Roboto Slab (Semibold).
|
||||
\newfontfamily{\sbfamily}{RobotoSlab}[
|
||||
Path = {\fontpath/},
|
||||
Extension = .ttf,
|
||||
@@ -69,6 +69,10 @@
|
||||
\NewDocumentCommand{\bdot}{}{.\zws}
|
||||
|
||||
% MenuKeys configuration.
|
||||
\newmenucolortheme{autoModeColor}{named}{pageColor}{textColor}{textColor}
|
||||
|
||||
\changemenucolortheme{hyphenatepaths}{autoModeColor}
|
||||
|
||||
\renewmenumacro{\directory}[/]{hyphenatepaths}
|
||||
\renewmenumacro{\keys}[+]{shadowedangularkeys}
|
||||
\renewmenumacro{\menu}[>]{angularmenus}
|
||||
|
||||
@@ -83,12 +83,12 @@
|
||||
}{ \group_begin:
|
||||
\keys_set:nn {WrapFig} {#1}
|
||||
\__WrapFig_process_options:
|
||||
\message{
|
||||
WrapFig:~#4,~
|
||||
placement:~\l_WrapFig_placement_str,~
|
||||
hoffset:~\dim_use:N \l_WrapFig_hoffset_dim,
|
||||
passed_keys:~\l_WrapFig_passed_keys_str
|
||||
}
|
||||
% \message{
|
||||
% WrapFig:~#4,~
|
||||
% placement:~\l_WrapFig_placement_str,~
|
||||
% hoffset:~\dim_use:N \l_WrapFig_hoffset_dim,
|
||||
% passed_keys:~\l_WrapFig_passed_keys_str
|
||||
% }
|
||||
\expanded{\noexpand\begin{wrapstuff}[
|
||||
\l_WrapFig_placement_str,
|
||||
hoffset = {\dim_use:N \l_WrapFig_hoffset_dim},
|
||||
|
||||
@@ -3,10 +3,42 @@
|
||||
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 {
|
||||
\renewcommand{\thepart}{\arabic{part}}
|
||||
}
|
||||
|
||||
\bool_if:NT \g_number_word_bool {
|
||||
\renewcommand{\thepart}{\NumberWord[titlecase_all]{\value{part}}}
|
||||
}
|
||||
|
||||
\titleformat{\part}[display]{
|
||||
\normalfont\sbfamily\huge
|
||||
}{
|
||||
|
||||
Reference in New Issue
Block a user