From a87cc723a64700be7cd022785ad78902a7ec8a95 Mon Sep 17 00:00:00 2001 From: Cedric Date: Thu, 9 Jan 2025 21:18:02 +0000 Subject: [PATCH] Enable abbreviations in standalone flowcharts Spun the file out for inclusion basically... we want to be able to use \eg in flowcharts even when built standalone. Fixed dependencies in makefile as well --- book/abbreviations.tex | 4 ++++ book/figures/vars.tex | 1 + book/makefile | 4 ++-- book/sourdough.sty | 4 +--- 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 book/abbreviations.tex diff --git a/book/abbreviations.tex b/book/abbreviations.tex new file mode 100644 index 0000000..0cf5d34 --- /dev/null +++ b/book/abbreviations.tex @@ -0,0 +1,4 @@ +% Common abbreviations +\newcommand{\ie}{\emph{i.e.}\@ifnextchar.{\!\@gobble}{}} +\newcommand{\eg}{\emph{e.g.}\@ifnextchar.{\!\@gobble}{}} +\newcommand{\etc}{etc\@ifnextchar.{}{.\@}} diff --git a/book/figures/vars.tex b/book/figures/vars.tex index e9555ff..1f9c012 100644 --- a/book/figures/vars.tex +++ b/book/figures/vars.tex @@ -6,3 +6,4 @@ \DeclareSIUnit\degF{\text{°}F} \input{flowcharts_tikz.tex} \input{../colors.tex} +\input{../abbreviations.tex} diff --git a/book/makefile b/book/makefile index 57bfa2a..80ef205 100644 --- a/book/makefile +++ b/book/makefile @@ -35,13 +35,13 @@ chapters = baking basics bread-types cover flour-types history intro mix-ins\ src_tables := $(wildcard tables/table-*.tex) src_figures := $(wildcard figures/fig-*.tex) figures/flowcharts_tikz.tex -src_figures += $(wildcard plots/fig-*.tex) +src_figures += $(wildcard plots/fig-*.tex) abbreviations.tex colors.tex src_recipes := $(wildcard recipes/*.tex) src_plots := $(wildcard plots/*.table) src_tex := $(foreach directory, $(chapters), $(wildcard $(directory)/*.tex)) src_tex += book.tex book_sans_serif.tex references.bib figures/vars.tex -src_tex += supporters.csv sourdough.sty colors.tex +src_tex += supporters.csv sourdough.sty colors.tex abbreviations.tex src_tex += $(src_recipes) images := $(wildcard images/*/*.jpg) diff --git a/book/sourdough.sty b/book/sourdough.sty index 370e706..fe2f1ca 100644 --- a/book/sourdough.sty +++ b/book/sourdough.sty @@ -34,9 +34,7 @@ \DeclareTOCStyleEntry[numwidth=3em]{tocline}{table} % Common abbreviations -\newcommand{\ie}{\emph{i.e.}\@ifnextchar.{\!\@gobble}{}} -\newcommand{\eg}{\emph{e.g.}\@ifnextchar.{\!\@gobble}{}} -\newcommand{\etc}{etc\@ifnextchar.{}{.\@}} +\input{abbreviations.tex} % Consistent pH values \newcommand{\pHvalue}[1]{pH~\SI{#1}{}}