Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Add Boschet style, use thinrule

Author DaveJarvis <email>
Date 2021-04-13 23:53:11 GMT-0700
Commit e9fdbd1fd02469d28b9e2fbc50d1863827f2ff46
Parent 9d769d1
Delta 263 lines added, 7 lines removed, 256-line increase
themes/boschet/colours.tex
+\definecolor[WPtocheading][h=111111]
+\definecolor[WPinternal][h=46A5E5]
+\definecolor[WPexternal][h=B93507]
+\definecolor[WPframe][h=EEEEEE]
themes/boschet/constants.tex
\define\WPui{User Interface}
\define\WPintro{Overview}
-\define\WPname{\Liberum{} \Consilium{}}
\define\WPnavigation{Navigation}
\define\WPproposal{proposal}
\define\WPheadertitle{%
\doiftextelse{\getmarking[chapter]}%
- {\ss{\WPname} \vl{}}%
+ {\vl{}}%
{}%
}
themes/boschet/figures.tex
+\unprotect
+\appendtoks
+ \setupbackgrounds[\v!page][\c!background=\makeupparameter\c!background]
+\to \t_page_makeup_every_setup
+\protect
+
+\setupexternalfigures[
+ order={svg,pdf,png},
+ location={local,default,global},
+ directory={screens,graphs},
+ frame=on,
+ framecolor=WPframe,
+ rulethickness=1pt,
+ frameoffset=.5em,
+ maxwidth=\makeupwidth,
+ width=\makeupwidth,
+]
+
+\setupcaptions[
+ %inbetween={\blank[big]},
+]
+
+\defineoverlay[cover][{
+ \externalfigure[cover.jpg][
+ scale=2000,
+ maxwidth=\paperwidth,
+ ]
+}]
themes/boschet/fonts.tex
+\definefontfamily [TextFont] [rm] [LibreBaskerville]
+\definefontfamily [TextFont] [ss] [Archivo Narrow]
+\definefontfamily [TextFont] [tt] [Inconsolata]
+\definefontfamily [TextFont] [mm] [Lucida Bright Math OT]
+\definefontfamily [TextFont] [hw] [Lucida Handwriting OT]
+\definefontfamily [TextFont] [cg] [Lucida Calligraphy OT]
+
+\setupbodyfont[TextFont]
+
+\definefont[SectionFont][SansBold sa 1.5]
+\definefont[SubSectionFont][SansBold sa 1.25]
+\definefont[ChapterNumberFont][SansBold sa 10]
+\definefont[SourceCodeFont][Mono sa 0.8]
+
+\definefontsize[e]
+\setupbodyfontenvironment[default][e=6.5]
+\setupbodyfontenvironment[default][d=3.5]
+
themes/boschet/headings.tex
+\setupmakeup[standard][
+ pagestate=start,
+]
+
+\startMPinclusions
+ numeric ChapterPageDone[];
+\stopMPinclusions
+
+% Draw a thick bar along the side of each chapter page.
+\startuseMPgraphic{WPchapter}
+ StartPage;
+ n := \somenamedheadnumber{chapter}{current};
+ width := BackSpace;
+
+ if n > 0 :
+ if unknown ChapterPageDone[n] :
+ fill (0,0) -- (width,0) -- (width, PaperHeight) -- (0, PaperHeight) -- cycle
+ withcolor \MPcolor{black};
+ ChapterPageDone[n] := 1 ;
+ fi;
+ fi;
+ StopPage;
+\stopuseMPgraphic
+
+%\definecolor[ChapterNumberColour][h=A1C436]
+\definecolor[ChapterNumberColour][white]
+
+\defineoverlay[WPchapter][\useMPgraphic{WPchapter}]
+\setupbackgrounds[page][background=WPchapter]
+
+\define[1]\WPchapternumber{\inmargin{\ss{\bfd{\color[ChapterNumberColour]{#1}}}}}
+
+\define[1]\WPChapterFont{\ss{\bfe{#1}}}
+
+\define[1]\WPchaptertitle{%
+ \framed[
+ frame=off,
+ width=\makeupwidth,
+ height=\textheight,
+ align=flushright,
+ ]{\WPChapterFont{#1}\vfill{}}
+}
+
+\setuphead[chapter][
+ style=ChapterNumberFont,
+ after=\pagebreak,
+ header=empty,
+ footer=empty,
+ deeptextcommand=\WPchaptertitle,
+ deepnumbercommand=\WPchapternumber,
+]
+
+\setuphead[section][
+ style=SectionFont,
+]
+
+\setuphead[subsection][
+ style=SubSectionFont,
+]
themes/boschet/hyperlinks.tex
+\setupinteraction[
+ state=start,
+ color=WPinternal,
+ contrastcolor=WPinternal,
+ title={Liberum Consilium},
+ author={White Magic Software, Ltd.},
+ subtitle={A system design for moderated deliberation},
+ keyword={proposal, policy, democracy, software, discussion, deliberation},
+]
+
+\placebookmarks[title, chapter][
+ force=yes,
+]
+
+% Create hyperlink references within the document.
+\define[2]\href{%
+ \goto{\color[WPexternal]{#1}}[url(#2)]%
+}
themes/boschet/layout.tex
+\setbreakpoints[
+ compound
+]
+
+\setupalign[
+ hz,
+ flushleft,
+ nothyphenated,
+ lesshyphenation,
+]
+
+\setuptolerance[
+ stretch,
+ verytolerant
+]
+
+\definefontfeature[default][default][expansion=quality]
themes/boschet/lists.tex
+\setupitemize[1][packed,intro][
+ after={\blank[small]},
+ margin=yes,
+]
themes/boschet/main.tex
+\setuppapersize[letter]
+
+\input modules
+\input constants
+
+\input xhtml
+\input fonts
+\input colours
+\input hyperlinks
+\input layout
+\input headings
+\input pages
+\input makeups
+\input figures
+\input tables
+\input toc
+\input lists
+\input rules
+
themes/boschet/makeups.tex
+% Define a copyright page
+\definemakeup[copyright]
+\setupmakeup[copyright][
+ style=\tfx,
+]
+
+% Define a preface page
+\definemakeup[preface]
themes/boschet/pages.tex
+\setupmakeup[standard][
+ doublesided=no
+]
+
+\setuppagenumbering[
+ alternative=singlesided,
+ location={footer,right},
+]
+
+\setupcolors[
+ state=start,
+ rgb=yes,
+ spot=no,
+]
+
+\setupcolors[pagecolormodel=auto]
+
+\setuplayout[
+ setups=*lessstrict,
+ location=singlesided,
+]
+
+% Strongly suggest avoiding orphaned headings.
+\startsetups[*lessstrict]
+ \setup[*reset]
+ \widowpenalty=10000
+ \clubpenalty=1000
+ \brokenpenalty=100
+\stopsetups
+
+\setupwhitespace[medium]
+
+\setupheadertexts[\WPheaderchapter][\WPheadertitle][\WPheadertitle][\WPheaderchapter]
+
themes/boschet/rules.tex
+\definehspace[TextRuleSpace][2 em]
+
+\define\thinrule{%
+ \startalignment[middle]
+ \blank
+ \dorecurse{3}{\hspace[TextRuleSpace]\symbol[star]\hspace[TextRuleSpace]}
+ \blank
+ \stopalignment
+}
+
themes/boschet/tables.tex
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Configures how tables are presented
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\setupcaption[table][number=no]
+
+\setupxtable[
+ frame=off,
+ framecolor=TextColourTertiaryLt,
+ option={stretch,width},
+ split=yes,
+ header=repeat,
+ footer=repeat,
+]
+
+\setupxtable[head][
+ topframe=on,
+ bottomframe=on,
+ rulethickness=1pt,
+]
+\setupxtable[body][]
+\setupxtable[foot][
+ bottomframe=on,
+ rulethickness=1pt,
+]
+
themes/boschet/xhtml.tex
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Import XHTML to ConTeXt setups
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\usesubpath[../xhtml]
+\input ../xhtml/setups
+
themes/tarmes/lists.tex
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\definesymbol[bullet][•]
+\definesymbol[TextBullet][•]
% Reduce the spacing around bullets.
\setupitemgroup[itemize][1][packed,paragraph][
leftmargin=2em,
distance=\zeropoint,
- symbol=bullet,
+ symbol=TextBullet,
]
themes/tarmes/main.tex
\input tables
\input paragraphs
+\input rules
themes/tarmes/rules.tex
+\define\thinrule{\blank\hrule\blank}
+
themes/xhtml/xml-breaks.tex
\startxmlsetups xml:hr
- \blank
- \hrule
- \blank
+ \thinrule
\stopxmlsetups