From 2971839f7d790de0480bc759e75c5ceeb87eff08 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Wed, 3 Jan 2018 21:59:18 +0000
Subject: sectionbreak (3jan18)

git-svn-id: svn://tug.org/texlive/trunk@46200 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/sectionbreak/sectionbreak.sty        | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Master/texmf-dist/tex/latex/sectionbreak/sectionbreak.sty

(limited to 'Master/texmf-dist/tex/latex/sectionbreak/sectionbreak.sty')

diff --git a/Master/texmf-dist/tex/latex/sectionbreak/sectionbreak.sty b/Master/texmf-dist/tex/latex/sectionbreak/sectionbreak.sty
new file mode 100644
index 00000000000..b8f306519ee
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/sectionbreak/sectionbreak.sty
@@ -0,0 +1,44 @@
+\ProvidesPackage{sectionbreak}
+\usepackage{kvoptions}
+\DeclareStringOption[2em]{preskip}
+\DeclareStringOption[2em]{postskip}
+\DeclareStringOption[\relax]{style}
+\DeclareStringOption[~]{mark}
+\DeclareBoolOption{asterism}
+
+\ProcessKeyvalOptions*
+
+\newdimen\asterism@width
+% asterism is character which consists of three asterisks layed out as a triangel
+\newcommand\asterism{%
+  \settowidth{\asterism@width}{*}%
+  % these values were found by trial and error
+  \raise-0.6\asterism@width\hbox{*\kern-.6\asterism@width\raise.7\asterism@width\hbox{*}\kern-.6\asterism@width*}%
+}
+
+\newcommand\pre@sectionbreak{\par\vskip\sectionbreak@preskip\relax}
+\newcommand\post@sectionbreak{\par\vskip\sectionbreak@postskip\relax}
+% print centered section break mark
+\newcommand\print@sectionbreak[1]{%
+  \bgroup%
+  \noindent\null\hfill\sectionbreak@style\hbox{#1}\hfill\null\par%
+  \egroup%
+}
+% default section break mark is an unbreakable space
+
+\newcommand\sectionbreak[1][\sectionbreak@mark]{%
+  \pre@sectionbreak%
+  \print@sectionbreak{#1}%
+  \post@sectionbreak%
+}
+
+\newcommand\sectionbreakmark[1]{%
+  \gdef\sectionbreak@mark{#1}%
+}
+
+% test the asterism option and set the section mark accordingly
+\ifsectionbreak@asterism
+  \sectionbreakmark{\asterism}
+\fi
+
+\endinput
-- 
cgit v1.2.3

