From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/bsheaders/README | 7 ++ macros/latex/contrib/bsheaders/bsheaders.sty | 109 +++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 macros/latex/contrib/bsheaders/README create mode 100644 macros/latex/contrib/bsheaders/bsheaders.sty (limited to 'macros/latex/contrib/bsheaders') diff --git a/macros/latex/contrib/bsheaders/README b/macros/latex/contrib/bsheaders/README new file mode 100644 index 0000000000..4ea4d1eb6b --- /dev/null +++ b/macros/latex/contrib/bsheaders/README @@ -0,0 +1,7 @@ +This style file implements chapter headers in sans-serif and bounded by +lines \textwidth wide, both above and below the header itself. I have +created and used that style to typeset a 300-pages book about statistics +in physics; and it turns out that, from time to time, somebody needs +headers looking like that and asks for them on comp.text.tex . + +(The comments at the beginning of bsheaders.sty are exhaustive.) diff --git a/macros/latex/contrib/bsheaders/bsheaders.sty b/macros/latex/contrib/bsheaders/bsheaders.sty new file mode 100644 index 0000000000..3f60f753de --- /dev/null +++ b/macros/latex/contrib/bsheaders/bsheaders.sty @@ -0,0 +1,109 @@ +% Package: BSheaders.sty +% +% Sans-Serif headers, designed to mimic the chapter/section +% headers found in Bjarne Stroustrup's "The Design and +% Evolution of C++" (with minor changes). Obtained +% modifying the original definitions in book.cls. +% +% Last change: MLO 1997-10-06 07:49 ***** +% +% Author: Maurizio Loreti, aka MLO or (HAM) I3NOO +% Work: University of Padova - Department of Physics +% Via F. Marzolo, 8 - 35131 PADOVA - Italy +% EMail: loreti@padova.infn.it +% WWW: http://wwwcdf.pd.infn.it/~loreti/mlo.html + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{bsheaders} + [1997/10/06 Chapter headers a la Bjarne Stroustrup] + +\@ifundefined{@mainmatter}{\newif\if@mainmatter\@mainmattertrue}{} + +\def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \huge \sffamily \bfseries \partname~\thepart + \par + \vskip 20\p@ + \fi + \Huge \sffamily \bfseries #2\par}% + \@endpart} + +\def\@spart#1{% + {\centering + \interlinepenalty \@M + \normalfont + \Huge \sffamily \bfseries #1\par}% + \@endpart} + +\def\@makechapterhead#1{% + \vspace*{60\p@}% + {\hrule height0.25pt width\hsize\vspace*{1\p@}% + \hrule height0.75pt width\hsize\vspace*{20\p@}% + \parindent \z@ \raggedright \normalfont + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \huge \sffamily \bfseries \@chapapp\space \thechapter + \par\nobreak + \vskip 20\p@ + \fi + \fi + \interlinepenalty\@M + \Huge \sffamily \bfseries #1\par\nobreak + \vspace*{20\p@}% + \hrule height0.75pt width\hsize\vspace*{1\p@}% + \hrule height0.25pt width\hsize\nobreak% + \vskip 48\p@ + }} + +\def\@makeschapterhead#1{% + \vspace*{60\p@}% + {\hrule height0.25pt width\hsize\vspace*{1\p@}% + \hrule height0.75pt width\hsize\vspace*{20\p@}% + \parindent \z@ \raggedright + \normalfont + \interlinepenalty\@M + \Huge \sffamily \bfseries #1\par\nobreak + \vspace*{20\p@}% + \hrule height0.75pt width\hsize\vspace*{1\p@}% + \hrule height0.25pt width\hsize\nobreak% + \vskip 48\p@ + }} + +\renewcommand{\section}{\@startsection{section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\normalfont\Large\sffamily\bfseries}} + +\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\large\sffamily\bfseries}} + +\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\normalsize\sffamily\bfseries}} + +\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% + {-1em}% + {\normalfont\normalsize\sffamily\bfseries}} + +\renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\parindent}% + {3.25ex \@plus1ex \@minus .2ex}% + {-1em}% + {\normalfont\normalsize\sffamily\bfseries}} +\endinput + +%% +%% End of `BSheaders.sty'. -- cgit v1.2.3