From 93d6dcb06b8492b216cdd232cfb578ac43f55519 Mon Sep 17 00:00:00 2001 From: Ced Date: Thu, 27 Feb 2025 13:02:34 +0000 Subject: [PATCH] Show the bug 2 --- book/book.tex | 228 -------------------------------------------------- 1 file changed, 228 deletions(-) diff --git a/book/book.tex b/book/book.tex index 4dfcee5..75a324d 100644 --- a/book/book.tex +++ b/book/book.tex @@ -14,7 +14,6 @@ \usepackage{fontspec} \usepackage{calc} \usepackage[font={sffamily, sbseries}]{quoting} -\usepackage{microtype} % style=nextline breaks on make4ht \ifdefined\HCode\else @@ -36,38 +35,6 @@ \DeclareTOCStyleEntry[numwidth=3em]{tocline}{flowchart} \DeclareTOCStyleEntry[numwidth=3em]{tocline}{table} -% Common abbreviations -\input{abbreviations.tex} - -% Consistent pH values -\newcommand{\pHvalue}[1]{pH~\SI{#1}{}} - -% For tables -\renewcommand\theadfont{\bfseries} - -\input{colors.tex} -% Define flowcharts macros independently so we can build them as png files -% for the website or something. This is supported in the makefile -\input{figures/flowcharts_tikz.tex} -% Fonts -\defaultfontfeatures{Scale=MatchLowercase, Ligatures=TeX} -% Define Semi-bold -\DeclareRobustCommand\sbseries{\fontseries{sb}\selectfont} -% Fonts for accessibility -\ifdefined\isaccessible - \usepackage[mathrm=sym]{unicode-math} - \setmathfont{Fira Math}[Scale=MatchLowercase] - \setmainfont{Open Sans}[Scale=MatchLowercase] -\else - \setmainfont{TeX Gyre Pagella}[Scale=1.0] % Or Palatino Linotype, etc. - % TODO not available on github CI - % \setmonofont{Andale Mono}[Scale=MatchLowercase] -\fi -% Opens Sans in both case.. -\setsansfont{Open Sans}[ - Scale=MatchLowercase, - FontFace = {sb}{it}{* Semibold Italic}, - FontFace = {sb}{n}{*-semibold}] % Kerning in footnotes \usepackage{fnpct} @@ -100,201 +67,6 @@ } -% Folders where to search for images -\graphicspath{ - {images/} - {troubleshooting/} - {sourdough-starter/} - {troubleshooting/crumb-structures/} - {history/} - {images/external/} - {baking/} - {wheat-sourdough/} - {wheat-sourdough/shaping/} - {non-wheat-sourdough/} - {mix-ins/} -} - -% Caption and figure size below images -\addtokomafont{captionlabel}{\textbf} -\addtokomafont{caption}{\small} - -\DeclareSIUnit\degF{\text{°}F} - -%----------------------------------------------------------------------------- -% KAO CHAPTER HEADING STYLES -%----------------------------------------------------------------------------- - -\newlength{\hscale} -\newlength{\vscale} -\newlength{\mtocshift} - -% By default, the scales are set to work for a4paper -\setlength{\hscale}{1mm} -\setlength{\vscale}{1mm} - -\newif\ifwidelayout% -\def\IfWideLayout{% - \ifwidelayout% - \expandafter\@firstoftwo% - \else% - \expandafter\@secondoftwo% - \fi% -} - -% Command to easily switch between chapter styles -\DeclareDocumentCommand{\setchapterstyle}{m}{% - \ifthenelse{\equal{plain}{#1}}{\chapterstyleplain}{} - \ifthenelse{\equal{bar}{#1}}{\chapterstylebar}{} - \ifthenelse{\equal{lines}{#1}}{\chapterstylelines}{} - \ifthenelse{\equal{kao}{#1}}{\chapterstylekao}{} -} - -% The default definition in KOMA script -\DeclareDocumentCommand{\chapterstyleplain}{}{% - \renewcommand{\chapterlinesformat}[3]{% - \@hangfrom{##2}{##3}} - \renewcommand*{\chapterformat}{% - \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter% - \autodot\IfUsePrefixLine{}{\enskip}}} - \RedeclareSectionCommand[beforeskip=0cm,afterskip=10\vscale]{chapter} - \setlength{\mtocshift}{-1\vscale} -} - -% Gray bar -\DeclareDocumentCommand{\chapterstylebar}{}{% - \renewcommand*{\chapterformat}{% - \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter% - \autodot\IfUsePrefixLine{}{\enskip}}% - } - \renewcommand{\chapterlinesformat}[3]{% - \begin{tikzpicture}[remember picture, overlay] - \node[ - anchor=south west, - xshift=\dimexpr - \hoffset - \oddsidemargin - 1in -1mm,%-30\hscale, - yshift=4.3mm, - rectangle, - fill=gray!20!white, - fill opacity=0.8, - inner ysep=5\vscale, - inner xsep=\dimexpr \hoffset + \oddsidemargin + 1in,%30\hscale, - text opacity=1, - text width=\paperwidth-40\hscale, - ]{\@hangfrom{##2}{##3}}; - \end{tikzpicture} - } - \RedeclareSectionCommand[beforeskip=-55\vscale,afterskip=6\vscale]{chapter} - \setlength{\mtocshift}{-1\vscale} -} - -% Lines -\renewcommand{\hrulefill}[1][0.4pt]{% - \leavevmode\leaders\hrule height #1\hfill\kern\z@% -} - -\DeclareDocumentCommand{\chapterstylelines}{}{% - \renewcommand*{\chapterformat}{% - \chapappifchapterprefix{\nobreakspace}\scalebox{3.5}{\thechapter\autodot}% - }% - \renewcommand\chapterlinesformat[3]{% - %\vspace*{-1cm}% - \leavevmode% - \makebox[0pt][l]{% - \makebox[\textwidth][l]{\hrulefill[1pt]##2}%\hfill%\par%\bigskip - \makebox[\marginparsep][l]{}% - \makebox[\marginparwidth][l]{}% - }\\ - %\vspace{.5cm} - \makebox[0pt][l]{% - \makebox[\textwidth][l]{##3}% - \makebox[\marginparsep][l]{}% - \makebox[\marginparwidth][l]{}% - }\\ - \makebox[0pt][l]{% - \makebox[\textwidth+\marginparsep+\marginparwidth][l]{\hrulefill[1.1pt]}% - }% - \RedeclareSectionCommand[beforeskip=0cm,afterskip=10\vscale]{chapter} - \setlength{\mtocshift}{-1\vscale}% -} -} -% The Kao style -\DeclareDocumentCommand{\chapterstylekao}{}{% - \IfWideLayout{% - \renewcommand*{\chapterformat}{% - \mbox{\chapappifchapterprefix{\nobreakspace}\scalebox{2.85}{\thechapter\autodot}}% - }% - \renewcommand\chapterlinesformat[3]{% - \vspace{3.5\vscale}% - \if@twoside% - \Ifthispageodd{% - \smash{\makebox[0pt][l]{% - \parbox[b]{\textwidth - 6.2\hscale}{\flushright{##3}}% - \makebox[6.2\hscale][c]{\rule[-2\vscale]{1pt}{27.4\vscale+\f@size mm}}% - \parbox[b]{\marginparwidth}{##2}% - }}% - }{ - \smash{\makebox[\textwidth + 6.2\hscale][r]{% - \parbox[b]{47.7\hscale + 6.2\hscale}{\flushright{##2}}% - \makebox[6.2\hscale][c]{\rule[-2\vscale]{1pt}{27.4\vscale+\f@size mm}}% - \parbox[b]{\textwidth}{\flushleft{##3}}% - }}% - } - \else% - \smash{\makebox[0pt][l]{% - \parbox[b]{\textwidth - 6.2\hscale}{\flushright{##3}}% - \makebox[6.2\hscale][c]{\rule[-2\vscale]{1pt}{27.4\vscale+\f@size mm}}% - \parbox[b]{\marginparwidth}{##2}% - }}% - \fi% - }% - }{% - \renewcommand*{\chapterformat}{% - \mbox{\chapappifchapterprefix{\nobreakspace}\scalebox{2.85}{\thechapter\autodot}}% - }% - \renewcommand\chapterlinesformat[3]{% - \vspace{3.5\vscale}% - \if@twoside% - \Ifthispageodd{% - \smash{\makebox[0pt][l]{% - \parbox[b]{\textwidth}{\flushright{##3}}% - \makebox[\marginparsep][c]{\rule[-2\vscale]{1pt}{27.4\vscale+\f@size mm}}% - \parbox[b]{\marginparwidth}{##2}% - }}% - }{ - \smash{\makebox[\textwidth][r]{% - \parbox[b]{\marginparwidth}{\flushright{##2}}% - \makebox[\marginparsep][c]{\rule[-2\vscale]{1pt}{27.4\vscale+\f@size mm}}% - \parbox[b]{\textwidth}{\flushleft{##3}}% - }}% - } - \else% - \smash{\makebox[0pt][l]{% - \parbox[b]{\textwidth}{\flushright{##3}}% - \makebox[\marginparsep][c]{\rule[-2\vscale]{1pt}{27.4\vscale+\f@size mm}}% - \parbox[b]{\marginparwidth}{##2}% - }}% - \fi% - }% - }% - \RedeclareSectionCommand[beforeskip=0cm,afterskip=10\vscale]{chapter}% - \setlength{\mtocshift}{-3.5\vscale}% -} - -% Takes as input the image path and optionally the "beforeskip" -\DeclareDocumentCommand{\setchapterimage}{O{55\vscale} m}{% - \setchapterpreamble[o]{% - \vspace*{-27\vscale}\hspace*{\dimexpr - \hoffset - \oddsidemargin - 1in}% - \includegraphics[width=\paperwidth,height=#1+27\vscale,keepaspectratio=false]{#2}% - }% - \chapterstylebar% - % beforeskip=-(figure_height-top_margin) - \RedeclareSectionCommand[beforeskip=-#1, afterskip=6\vscale]{chapter}% - \setlength{\mtocshift}{0cm}% -} - -% By default start with the lines style -\setchapterstyle{lines} - % Basic attributes \author{Hendrik Kleinwächter} \title{The Sourdough Framework}