diff options
author | Karl Berry <karl@freefriends.org> | 2019-03-11 22:01:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-03-11 22:01:59 +0000 |
commit | 73fc8f1428dc92eee4f0fc4f3f8b8b5f163be79d (patch) | |
tree | c08163f93134c40fa0fa0b0c5db1a5a86a8e930c /Master/texmf-dist/tex/latex/sectionbreak/sectionbreak.sty | |
parent | 4e23992233ebab05b200a616b19c4347bf2b8ce9 (diff) |
sectionbreak (11mar19)
git-svn-id: svn://tug.org/texlive/trunk@50339 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/sectionbreak/sectionbreak.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/sectionbreak/sectionbreak.sty | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/sectionbreak/sectionbreak.sty b/Master/texmf-dist/tex/latex/sectionbreak/sectionbreak.sty index e2131c290c2..28b653b7882 100644 --- a/Master/texmf-dist/tex/latex/sectionbreak/sectionbreak.sty +++ b/Master/texmf-dist/tex/latex/sectionbreak/sectionbreak.sty @@ -1,15 +1,39 @@ % This is file sectionbreak.sty %% (c) 2017--2018 Michal Hoftich -\ProvidesPackage{sectionbreak}[2018-01-03 v0.1c (Michal Hoftich)] -\usepackage{kvoptions} -\DeclareStringOption[2em]{preskip} -\DeclareStringOption[2em]{postskip} +\ProvidesPackage{sectionbreak}[2019-03-11 v0.1d (Michal Hoftich)] +\RequirePackage{kvoptions} +\DeclareStringOption[\relax]{preskip} +\DeclareStringOption[\relax]{postskip} +\DeclareStringOption[\relax]{skip} \DeclareStringOption[\relax]{style} \DeclareStringOption[~]{mark} \DeclareBoolOption{asterism} +\DeclareBoolOption{disable} \ProcessKeyvalOptions* +% the skip option can be used to set both preskip and postskip + +\if\sectionbreak@skip\relax\else% + % set skips only if the options haven't been used + \if\sectionbreak@preskip\relax% + \def\sectionbreak@preskip{\sectionbreak@skip}% + \fi% + \if\sectionbreak@postskip\relax% + \def\sectionbreak@postskip{\sectionbreak@skip}% + \fi% +\fi + +% add default value for preskip +\if\sectionbreak@preskip\relax% + \def\sectionbreak@preskip{2em}% +\fi + +% add default value for postskip +\if\sectionbreak@postskip\relax% + \def\sectionbreak@postskip{2em}% +\fi + \newdimen\asterism@width % asterism is character which consists of three asterisks layed out as a triangel \newcommand\asterism{% @@ -43,4 +67,9 @@ \sectionbreakmark{\asterism} \fi +% disable the section break in the document with the `disable` option +\ifsectionbreak@disable% + \renewcommand\sectionbreak[1][]{}% +\fi + \endinput |