- Debug CrossRef.

- Miscellaneous improvements.
This commit is contained in:
2025-09-19 16:20:17 -05:00
parent 1093a0a909
commit 277f021589
13 changed files with 476 additions and 39 deletions

View File

@@ -4,14 +4,13 @@
published by Prime Controls. published by Prime Controls.
} }
% Option 'electronic': single side printing. % Option 'electronic': single side printing, among other things.
\bool_new:N \g_electronic_bool \bool_new:N \g_electronic_bool
\bool_gset_false:N \g_electronic_bool \bool_gset_false:N \g_electronic_bool
\DeclareOption{electronic}{ \DeclareOption{electronic}{
\bool_gset_true:N \g_electronic_bool \bool_gset_true:N \g_electronic_bool
} }
\NewExpandableDocumentCommand{\IsElectronic}{}{\g_electronic_bool} \NewExpandableDocumentCommand{\IsElectronic}{}{\g_electronic_bool}
% Option 'admin': turn on admin manual sections. % Option 'admin': turn on admin manual sections.
@@ -21,17 +20,16 @@
\DeclareOption{admin}{ \DeclareOption{admin}{
\bool_gset_true:N \g_admin_bool \bool_gset_true:N \g_admin_bool
} }
\NewExpandableDocumentCommand{\IsAdminManual}{}{\g_admin_bool} \NewExpandableDocumentCommand{\IsAdminManual}{}{\g_admin_bool}
% Option 'darkmode': render as light text on dark background. % Option 'darkmode': render as light text on dark background. Only applies if
% electronic mode is also on.
\bool_new:N \g_dark_mode_bool \bool_new:N \g_dark_mode_bool
\bool_gset_false:N \g_dark_mode_bool \bool_gset_false:N \g_dark_mode_bool
\DeclareOption{darkmode}{ \DeclareOption{darkmode}{
\bool_gset_true:N \g_dark_mode_bool \bool_gset:Nn \g_dark_mode_bool {\g_electronic_bool}
} }
\NewExpandableDocumentCommand{\IsDarkMode}{}{\g_dark_mode_bool} \NewExpandableDocumentCommand{\IsDarkMode}{}{\g_dark_mode_bool}
% Option 'draft': same as base book class, but with bigger overfull boxes. % Option 'draft': same as base book class, but with bigger overfull boxes.
@@ -42,17 +40,16 @@
\bool_gset_true:N \g_draft_bool \bool_gset_true:N \g_draft_bool
\overfullrule = 1in \overfullrule = 1in
} }
\NewExpandableDocumentCommand{\IsDraft}{}{\g_draft_bool} \NewExpandableDocumentCommand{\IsDraft}{}{\g_draft_bool}
% Option 'roman': render Part numbers as Roman numerals. % Option 'roman': render Part numbers and print-format front matter page numbers
% as Roman numerals.
\bool_new:N \g_roman_bool \bool_new:N \g_roman_bool
\bool_gset_false:N \g_roman_bool \bool_gset_false:N \g_roman_bool
\DeclareOption{roman}{ \DeclareOption{roman}{
\bool_gset_true:N \g_roman_bool \bool_gset_true:N \g_roman_bool
} }
\NewExpandableDocumentCommand{\DoRomanNumerals}{}{\g_roman_bool} \NewExpandableDocumentCommand{\DoRomanNumerals}{}{\g_roman_bool}
% Option 'labels': show Part and Chapter labels in the header. % Option 'labels': show Part and Chapter labels in the header.
@@ -62,7 +59,6 @@
\DeclareOption{labels}{ \DeclareOption{labels}{
\bool_gset_true:N \g_label_bool \bool_gset_true:N \g_label_bool
} }
\NewExpandableDocumentCommand{\ShowLabels}{}{\g_label_bool} \NewExpandableDocumentCommand{\ShowLabels}{}{\g_label_bool}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}

View File

@@ -35,8 +35,6 @@
\RequirePackage{hyperref} \RequirePackage{hyperref}
%\RequirePackage{ifthen}
\RequirePackage{lua-widow-control} \RequirePackage{lua-widow-control}
% Index formatting. % Index formatting.

Binary file not shown.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="14pt"
height="26pt"
viewBox="0 0 4.93892 9.1722798"
version="1.1"
id="svg8"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="prime-heartbeat-dark.svg"
inkscape:export-filename="D:\OneDrive - Prime Controls\Customers\NTMWD\Projects\2157030 - NTMWD Transmission System SCADA Network Split\Training\graphics\prime_heartbeat.png"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300">
<defs
id="defs2">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 4.9389197 : 1"
inkscape:vp_y="0 : 999.99997 : 0"
inkscape:vp_z="121.70911 : 4.9389197 : 1"
inkscape:persp3d-origin="60.854552 : 3.5277998 : 1"
id="perspective865" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="15.839192"
inkscape:cx="21.449826"
inkscape:cy="16.555304"
inkscape:document-units="pt"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
units="pt"
inkscape:window-width="2560"
inkscape:window-height="1369"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="true" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
id="path833-3"
style="fill:#292b32;fill-opacity:1;stroke:none;stroke-width:0.264585px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 3.5281444,0 v 3.5278 l 0.3524354,1.723e-4 h 1.05834 V 4.2333599 5.6446523 L 1.4114644,9.1726244 V 5.6444799 L 1.058512,5.6446523 H 1.72e-4 V 4.2333599 3.5279723 Z"
sodipodi:nodetypes="ccccccccccccc" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.264585px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 4.9389198,4.9389198 -1e-7,0.7055599 -3.5277998,3.5277999 V 5.2916998 L 1.05834,5.6444798 H 0 v -0.70556 H 0.70556 L 2.1166799,3.5277999 V 7.4083797 L 4.5861397,4.9389198 Z"
id="path833"
sodipodi:nodetypes="cccccccccccc" />
<path
sodipodi:nodetypes="cccccccccccc"
id="path833-0"
d="M 0,3.5277999 C 1.1759333,2.3518666 2.3518666,1.1759333 3.5277999,0 V 3.8805798 L 3.8805798,3.5277999 h 1.05834 v 0.7055599 h -0.70556 l -1.4111199,1.41112 V 1.7638999 L 0.35278,4.2333598 H 0 Z"
style="fill:#6378e4;fill-opacity:1;stroke:none;stroke-width:0.264585px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

View File

@@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:export-ydpi="300"
inkscape:export-xdpi="300"
inkscape:export-filename="D:\OneDrive - Prime Controls\Customers\NTMWD\Projects\2157030 - NTMWD Transmission System SCADA Network Split\Training\graphics\prime_heartbeat.png"
sodipodi:docname="prime-rule-dark.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
id="svg8"
version="1.1"
viewBox="0 0 203.20128 2.1166799"
height="6pt"
width="576pt">
<defs
id="defs2">
<linearGradient
inkscape:collect="always"
id="linearGradient844">
<stop
style="stop-color:#292b32;stop-opacity:1"
offset="0"
id="stop840" />
<stop
style="stop-color:#292b32;stop-opacity:0"
offset="1"
id="stop842" />
</linearGradient>
<linearGradient
id="linearGradient873"
inkscape:collect="always">
<stop
id="stop882"
offset="0"
style="stop-color:#292b32;stop-opacity:1" />
<stop
id="stop884"
offset="1"
style="stop-color:#292b32;stop-opacity:0" />
</linearGradient>
<inkscape:perspective
id="perspective865"
inkscape:persp3d-origin="60.85455 : -3.5277999 : 1"
inkscape:vp_z="121.7091 : -2.1166799 : 1"
inkscape:vp_y="0 : 999.99998 : 0"
inkscape:vp_x="0 : -2.1166799 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
gradientTransform="scale(1,0.25000001)"
gradientUnits="userSpaceOnUse"
y2="4.2333598"
x2="8.4667196"
y1="4.2333598"
x1="0"
id="linearGradient875"
xlink:href="#linearGradient873"
inkscape:collect="always" />
<linearGradient
gradientTransform="matrix(1,0,0,0.25000001,-203.2013,0)"
inkscape:collect="always"
xlink:href="#linearGradient844"
id="linearGradient875-0"
x1="0"
y1="4.2333598"
x2="8.4667196"
y2="4.2333598"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
fit-margin-bottom="0"
fit-margin-right="0"
fit-margin-left="0"
fit-margin-top="0"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1369"
inkscape:window-width="2560"
units="pt"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="pt"
inkscape:cy="125.90332"
inkscape:cx="406.06648"
inkscape:zoom="1.979899"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#292b32"
id="base" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Layer 1">
<rect
y="1.4111199"
x="0"
height="0.70555997"
width="203.20128"
id="rect1417-5"
style="fill:#ffffff;fill-opacity:1;stroke-width:0.265" />
<rect
style="fill:#6378e4;fill-opacity:1;stroke-width:0.265"
id="rect1417"
width="203.20128"
height="0.70555997"
x="0"
y="0" />
<rect
y="0"
x="0"
height="2.1166799"
width="8.4667196"
id="rect867"
style="fill:url(#linearGradient875);fill-opacity:1;stroke:none;stroke-width:0.265" />
<rect
transform="scale(-1,1)"
style="fill:url(#linearGradient875-0);fill-opacity:1;stroke:none;stroke-width:0.265"
id="rect867-8"
width="8.4667196"
height="2.1166799"
x="-203.20128"
y="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -29,7 +29,7 @@
\str_const:Nn \c_@@_label_delimiter_str {/} \str_const:Nn \c_@@_label_delimiter_str {/}
\str_const:Nn \c_@@_label_parent_str {.} \str_const:Nn \c_@@_label_parent_str {.}
\str_const:Nn \c_@@_label_wildcard_str {*} \str_const:Nn \c_@@_label_placeholder_str {*}
\str_const:Nn \c_@@_appendices_label_str {appendices} \str_const:Nn \c_@@_appendices_label_str {appendices}
\seq_new:N \g_@@_label_seq \seq_new:N \g_@@_label_seq
@@ -65,7 +65,9 @@
} }
\NewDocumentCommand{\Appendices}{}{ \NewDocumentCommand{\Appendices}{}{
\@@_heading:nnnnn {part} {\c_true_bool} {\c_false_bool} {Appendices} {\c_@@_appendices_label_str} \@@_heading:nnnnn {part} {\c_true_bool} {\c_false_bool} {Appendices} {
\c_@@_appendices_label_str
}
} }
\NewDocumentCommand{\GetCurrentLabel}{}{ \NewDocumentCommand{\GetCurrentLabel}{}{
@@ -81,10 +83,17 @@
\seq_set_split:Nnn \g_@@_label_seq {#1} {#2} \seq_set_split:Nnn \g_@@_label_seq {#1} {#2}
} }
% MATCH delimiter, parent, and wildcard symbols, but CAPTURE only \str_new:N \l_@@_esc_parent_str
% parents and wildcards, NOT delimiters. \exp_args:Nnne \str_concat:NNN \l_@@_esc_parent_str \c_backslash_str \c_@@_label_parent_str
\regex_const:Nn \c_@@_ref_regex {\/|(\.|\*)} %{\\\c_@@_label_delimiter_str|(\\\c_@@_label_parent_str|\\\c_@@_label_wildcard_str)}
%\regex_show:N \c_@@_ref_regex \str_new:N \l_@@_esc_placeholder_str
\exp_args:Nnne \str_concat:NNN \l_@@_esc_placeholder_str \c_backslash_str \c_@@_label_placeholder_str
% MATCH delimiter, parent, and placeholder symbols, but CAPTURE only
% parents and placeholders, NOT delimiters.
%\regex_const:Nn \c_@@_ref_regex {\/|(\.|\*)}
\exp_args:Nne \regex_const:Nn \c_@@_ref_regex {\c_@@_label_delimiter_str|(\l_@@_esc_parent_str|\l_@@_esc_placeholder_str)}
\regex_log:N \c_@@_ref_regex
\seq_new:N \l_@@_label_seq \seq_new:N \l_@@_label_seq
\seq_new:N \l_@@_ref_seq \seq_new:N \l_@@_ref_seq
@@ -104,12 +113,16 @@
% Output the section name only if no star is passed. % Output the section name only if no star is passed.
\bool_if:nF {#1} { \bool_if:nF {#1} {
\str_if_eq:nnTF {\seq_item:Nn \l_@@_ref_seq {1}} {\c_@@_appendices_label_str} { \str_if_eq:nnTF {
\seq_item:Nn \l_@@_ref_seq {1}} {\c_@@_appendices_label_str
} {
% If the part label is "appendices", the section name is "Appendix". % If the part label is "appendices", the section name is "Appendix".
\prop_item:Nn \c_@@_section_names_prop {9} \prop_item:Nn \c_@@_section_names_prop {9}
} { } {
% Otherwise, look up the correct section name. % Otherwise, look up the correct section name.
\prop_item:Nn \c_@@_section_names_prop {\seq_count:N \l_@@_ref_seq - 1} \prop_item:Nn \c_@@_section_names_prop {
\seq_count:N \l_@@_ref_seq - 1
}
} }
} }
% Create a reference with the string we just created. % Create a reference with the string we just created.
@@ -135,9 +148,11 @@
% Split the string on the delimiters. % Split the string on the delimiters.
\exp_args:NNNe \seq_set_regex_split:NNn \l_@@_ref_seq \c_@@_ref_regex {#2} \exp_args:NNNe \seq_set_regex_split:NNn \l_@@_ref_seq \c_@@_ref_regex {#2}
% The regex split creates a lot of empty items, so remove them.
\seq_remove_all:Nn \l_@@_ref_seq {} \seq_remove_all:Nn \l_@@_ref_seq {}
\str_log:N \l_@@_ref_str % Log the input and output of the split process for debugging.
\str_log:n {#2}
\seq_log:N \l_@@_ref_seq \seq_log:N \l_@@_ref_seq
% Copy the current label sequence to a local variable. % Copy the current label sequence to a local variable.
@@ -149,16 +164,26 @@
% end of the temporary label sequence for each parent symbol. % end of the temporary label sequence for each parent symbol.
\seq_map_indexed_function:NN \l_@@_ref_seq \@@_seq_map:nn \seq_map_indexed_function:NN \l_@@_ref_seq \@@_seq_map:nn
% Add the shortened temporary label sequence to the beginning of the \str_set:Ne \l_@@_ref_head_str {\str_head:n {#2}}
% reference sequence.
\str_if_eq:eeT {\str_head:N \l_@@_ref_str} {\c_@@_label_parent_str} { \str_log:N \l_@@_ref_head_str
% If the reference is relative (i.e. does not start with / or *), add the
% shortened temporary label sequence to the beginning of the reference
% sequence.
\exp_args:Ne \bool_if:nF {
\str_if_eq_p:NN \l_@@_ref_head_str \c_@@_label_delimiter_str
|| \str_if_eq_p:NN \l_@@_ref_head_str \c_@@_label_placeholder_str
} {
\seq_concat:NNN \l_@@_ref_seq \l_@@_label_seq \l_@@_ref_seq \seq_concat:NNN \l_@@_ref_seq \l_@@_label_seq \l_@@_ref_seq
} }
\seq_log:N \l_@@_ref_seq \seq_log:N \l_@@_ref_seq
% Join the reference sequence back into a delimited string. % Join the reference sequence back into a delimited string.
\str_set:Ne \l_@@_ref_str {\seq_use:Ne \l_@@_ref_seq {\c_@@_label_delimiter_str}} \str_set:Ne \l_@@_ref_str {
\seq_use:Ne \l_@@_ref_seq {\c_@@_label_delimiter_str}
}
\str_if_eq:eeF {\str_head:N \l_@@_ref_str} {\c_@@_label_delimiter_str} { \str_if_eq:eeF {\str_head:N \l_@@_ref_str} {\c_@@_label_delimiter_str} {
\str_put_left:Ne \l_@@_ref_str {\c_@@_label_delimiter_str} \str_put_left:Ne \l_@@_ref_str {\c_@@_label_delimiter_str}
@@ -175,7 +200,7 @@
\seq_pop_right:NN \l_@@_label_seq \l_@@_trash_tl \seq_pop_right:NN \l_@@_label_seq \l_@@_trash_tl
\seq_pop_left:NN \l_@@_ref_seq \l_@@_trash_tl \seq_pop_left:NN \l_@@_ref_seq \l_@@_trash_tl
} }
{\c_@@_label_wildcard_str} { {\c_@@_label_placeholder_str} {
%\message{wildcard~map} %\message{wildcard~map}
\seq_pop_left:NN \l_@@_label_seq \l_tmpa_tl \seq_pop_left:NN \l_@@_label_seq \l_tmpa_tl
% \seq_pop_left:NN \l_@@_ref_seq \l_@@_trash_tl % \seq_pop_left:NN \l_@@_ref_seq \l_@@_trash_tl

View File

@@ -44,8 +44,8 @@
} }
} }
\NewExpandableDocumentCommand{\ProjectTitle}{}{% \NewExpandableDocumentCommand{\ProjectTitle}{}{
Project \@CustomerProjectNumber{}: \@ProjectDescription% Project~\@CustomerProjectNumber{}:~\@ProjectDescription
} }
% Custom document properties. % Custom document properties.

View File

@@ -15,11 +15,11 @@
\renewcommand{\footrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt}
\NewDocumentCommand{\chapappname}{}{Chapter~\thechapter{}:~} \NewDocumentCommand{\chapappname}{}{Chapter~\thechapter{}:~}
\NewDocumentCommand{\partlabel}{}{\partname{}~\thepart{}:~\parttitle} \NewDocumentCommand{\partlabel}{}{\bool_if:NT \g_label_bool {\partname{}~\thepart{}:~}\parttitle}
\NewDocumentCommand{\FrontMatter}{}{ \NewDocumentCommand{\FrontMatter}{}{
\pagestyle{plain} \pagestyle{plain}
\bool_if:NTF \g_electronic_bool { \bool_if:nTF {\g_electronic_bool || !\g_roman_bool} {
\pagenumbering{arabic} \pagenumbering{arabic}
}{ }{
\pagenumbering{roman} \pagenumbering{roman}
@@ -28,8 +28,10 @@
\NewDocumentCommand{\MainMatter}{}{ \NewDocumentCommand{\MainMatter}{}{
\pagestyle{fancy} \pagestyle{fancy}
\bool_if:NF \g_electronic_bool {
\pagenumbering{arabic} \pagenumbering{arabic}
} }
}
\NewDocumentCommand{\Appendix}{}{ \NewDocumentCommand{\Appendix}{}{
\appendix \appendix

View File

@@ -3,12 +3,21 @@
Definition for title page. Definition for title page.
} }
\fp_const:Nn \c_@@_scale_fp {1}
\str_const:Ne \c_@@_dark_str {\bool_if:NT \g_dark_mode_bool {-dark}}
\NewDocumentCommand{\PrimeLogo}{O{width=2in} O{}}{
\includegraphics[keepaspectratio,#1]{#2Prime-Controls\c_@@_dark_str.pdf}
}
% Define custom title page. % Define custom title page.
\NewDocumentCommand{\PrimeTitlePage}{O{}}{ \NewDocumentCommand{\PrimeTitlePage}{O{}}{
\thispagestyle{empty} \thispagestyle{empty}
\pdfbookmark{Title Page}{title-page} \pdfbookmark{Title~Page}{title-page}
\begin{sbfamily} \begin{sbfamily}
{\noindent\large\raggedright % Not RaggedRight because we don't want hyphens. {\large\raggedright % Not RaggedRight because we don't want hyphens.
\vspace*{\stretch{1}} \vspace*{\stretch{1}}
\CustomerFull \CustomerFull
@@ -27,14 +36,17 @@
% Move the rule graphic to 0.25 in from the left edge of the % Move the rule graphic to 0.25 in from the left edge of the
% paper and vertically centered on the heartbeat graphic. % paper and vertically centered on the heartbeat graphic.
\put(-\oddsidemargin-0.75in,10pt){ \put(-\oddsidemargin-0.75in,10pt){
\includegraphics{#1prime-rule.pdf} \includegraphics{#1prime-rule\c_@@_dark_str.pdf}
} }
% The numbers here are just what looks good. % The numbers here are just what looks good.
\put(100pt,0pt){ \put(100pt,0pt){
\includegraphics{#1prime-heartbeat.pdf} \includegraphics{#1prime-heartbeat\c_@@_dark_str.pdf}
} }
} }
\bigbreak
\AuthorCompany\par \AuthorCompany\par
Revision~\Version\par Revision~\Version\par

View File

@@ -10,13 +10,13 @@
\titleformat{\part}[display]{ \titleformat{\part}[display]{
\normalfont\sbfamily\huge \normalfont\sbfamily\huge
}{ }{
\partname{} \thepart \partname{}~\thepart
}{20pt}{\Huge\raggedright} }{20pt}{\Huge\raggedright}
\titleformat{\chapter}[display]{ \titleformat{\chapter}[display]{
\normalfont\sbfamily\huge\raggedright \normalfont\sbfamily\huge\raggedright
}{ }{
\chaptertitlename{} \thechapter \chaptertitlename{}~\thechapter
}{20pt}{\Huge} }{20pt}{\Huge}
\titlespacing{\chapter}{0pt}{48pt plus 12pt minus 12pt}{24pt plus 6pt minus 6pt} \titlespacing{\chapter}{0pt}{48pt plus 12pt minus 12pt}{24pt plus 6pt minus 6pt}