From 837b538e4716bfbc773f12172b7643fb1e2c90b4 Mon Sep 17 00:00:00 2001 From: Gustav Eek Date: Thu, 2 Nov 2023 22:32:57 +0100 Subject: Style. Adopt style for minutes Some refactoring, but also changes due to that minutes should be written with section headings instead of as a bullet list, which it was. --- tex/fripost.sty | 82 +++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 59 insertions(+), 23 deletions(-) diff --git a/tex/fripost.sty b/tex/fripost.sty index d5bb49c..3064f1b 100644 --- a/tex/fripost.sty +++ b/tex/fripost.sty @@ -4,7 +4,7 @@ \ProvidesPackage{fripost} \RequirePackage[utf8]{inputenc} \RequirePackage[T1]{fontenc} -\RequirePackage[swedish, british, english]{babel} +\RequirePackage[english, swedish]{babel} \RequirePackage{calc} \RequirePackage{graphicx} % \end{macrocode} @@ -12,7 +12,7 @@ % \begin{macrocode} \PassOptionsToPackage{svgnames}{xcolor} \RequirePackage{xcolor} -\colorlet{fpgray}{White!30!Black} +\colorlet{fpgray}{white!30!black} \definecolor{grayFri}{gray}{.3} % \end{macrocode} %% Font macros and basic paragraph formatting @@ -24,6 +24,7 @@ \newcommand \textpath [1] {\texturl{#1}} \newcommand \texthost [1] {\textit{#1}} \newcommand \titlefont {\Large\sffamily\mdseries\color{grayFri}} +\newcommand \descriptionfont {\bfseries\color{grayFri}} \newcommand \textestemate [1] {{\small\sffamily\mdseries\color{grayFri} #1}} \RequirePackage{hyperref} \RequirePackage{hyphenat} @@ -41,7 +42,7 @@ \postauthor{\\} \predate{\titlefont\centering} \postdate{\par} -\setlength{\droptitle}{0pt} +\setlength{\droptitle}{-4\baselineskip} % \end{macrocode} %% Options % \begin{macrocode} @@ -49,23 +50,39 @@ %% } -\DeclareOption{minutes}{ - -} +\newif\if@minutes\@minutesfalse +\DeclareOption{minutes}{\@minutestrue} \DeclareOption{by-laws}{ } -\ExecuteOptions{standalone} \ProcessOptions\relax % \end{macrocode} %% Page geometry % \begin{macrocode} -\RequirePackage{a4wide} +\@ifclassloaded{article}{ + \RequirePackage{a4wide} +}{} % \end{macrocode} %% Sections % \begin{macrocode} -\allsectionsfont{\sffamily\mdseries\color{grayFri}\centering} +\@ifclassloaded{article}{ + \RequirePackage{sectsty} + \setcounter{secnumdepth}{3} % section numbering by default + \allsectionsfont{ + \sffamily\mdseries\color{grayFri} + } + \if@minutes + \allsectionsfont{\sffamily\mdseries\color{grayFri}\normalsize} + \fi +}{} +\@ifclassloaded{leaflet}{ + \RequirePackage{sectsty} + \allsectionsfont{ + \sffamily\mdseries\color{grayFri} + \centering + } +}{} % \end{macrocode} %% Enumeration % \begin{macrocode} @@ -76,26 +93,45 @@ \renewcommand{\labelitemii}{\textenumerate{$\circ$}} \renewcommand{\labelenumi}{\textenumerate{\arabic{enumi}\,\,}} \renewcommand{\labelenumii}{\textenumerate{(\alph{enumii})}} +\renewcommand{\descriptionlabel}[1]{% + \hspace{\labelsep}{\descriptionfont #1}} +% \end{macrocode} +%% Abstract +%% +%% Note that the fancy page style is issued as part of the +%% abstract. That is due to that \maketitle command issues the plain +%% page style. +% \begin{macrocode} +\@ifclassloaded{article}{ + \def\abstract{% + \if@minutes\thispagestyle{fancy}\fi% + {\descriptionfont \abstractname}\par + } +}{} % \end{macrocode} %% Headers % \begin{macrocode} -\RequirePackage{fancyhdr} -\setlength {\headheight} {30pt} +\@ifclassloaded{article}{ + \RequirePackage{authoraftertitle} + \RequirePackage{fancyhdr} + \RequirePackage{lastpage} + \setlength {\headheight} {30pt} -\renewcommand{\headrule}{{% - \hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}} + \renewcommand{\headrule}{{% + \hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}} -\renewcommand{\footrule}{{% - \vskip-\footruleskip\vskip-\footrulewidth - \hrule width\headwidth height\headrulewidth\vskip\footruleskip}} + \renewcommand{\footrule}{{% + \vskip-\footruleskip\vskip-\footrulewidth + \hrule width\headwidth height\headrulewidth\vskip\footruleskip}} -\pagestyle{fancy} -\lhead{\footnotesize \textsc{\textsf{Fripost}} föreningen för fri e-post} -\chead{\footnotesize} -\rhead{\footnotesize Förslag till dagordning -- årsmöte} -\lfoot{\footnotesize \url{fripost.org}} -\cfoot{\footnotesize \thepage} -\rfoot{\footnotesize utskr.\ \today} + \pagestyle{fancy} + \lhead{\footnotesize{\sffamily{\bfseries fripost} | demokratisk e-post}} + \chead{\footnotesize} + \rhead{\footnotesize \MyTitle, \MyDate} + \lfoot{\footnotesize \url{fripost.org}} + \cfoot{\footnotesize \thepage} + \rfoot{\footnotesize utskr.\ \today} +}{} % \end{macrocode} %% Time estimations in meeting agendas % \begin{macrocode} -- cgit v1.2.3