summaryrefslogtreecommitdiff
path: root/macros/xetex/latex/langsci/langsci-subparts.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/xetex/latex/langsci/langsci-subparts.sty
Initial commit
Diffstat (limited to 'macros/xetex/latex/langsci/langsci-subparts.sty')
-rw-r--r--macros/xetex/latex/langsci/langsci-subparts.sty21
1 files changed, 21 insertions, 0 deletions
diff --git a/macros/xetex/latex/langsci/langsci-subparts.sty b/macros/xetex/latex/langsci/langsci-subparts.sty
new file mode 100644
index 0000000000..6951a0d1dc
--- /dev/null
+++ b/macros/xetex/latex/langsci/langsci-subparts.sty
@@ -0,0 +1,21 @@
+% add an additional section level between part and chapter.
+\usepackage[newparttoc]{titlesec}
+\usepackage{titletoc}
+
+% \titleformat{\part}[display]{\normalfont\Huge\bfseries}%
+% {\partname~\thepart}{1pc}{\Huge\bfseries}
+
+\titleclass{\subpart}{page}[\part]
+
+\newcounter{subpart}[part]
+% \numberwithin{chapter}{subpart}
+\renewcommand{\thesubpart}{\thepart-\Alph{subpart}}
+\newcommand{\subpartname}{Subpart}
+
+\titleformat{\subpart}[display]{\vspace*{6cm}\centering\normalfont\Large\bfseries}%
+{\subpartname~\thesubpart~}{1pc}{\LARGE\bfseries}
+\titlespacing{\subpart}{0pt}{0pt}{0pt}
+
+\titlecontents{subpart}[0pt]{\addvspace{1pc}\normalfont\bfseries}%
+{\thecontentslabel\enspace ---\enspace}%
+{\normalfont\bfseries}{\hspace{2em plus 1fill}\contentspage}