From 916b610a5380c8d2845659aa233a91e9eedeae4b Mon Sep 17 00:00:00 2001 From: Hendrik Kleinwaechter Date: Thu, 1 Jun 2023 16:02:09 +0200 Subject: [PATCH] Fix images not displaying (#108) --- book/book.mk4 | 3 +-- book/book.tex | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/book/book.mk4 b/book/book.mk4 index eb3ff75..6a23d4e 100644 --- a/book/book.mk4 +++ b/book/book.mk4 @@ -1,9 +1,8 @@ local filter = require "make4ht-filter" -local changePath = function(s) return s:gsub("%./images//","images/") end local removeHeight = function(s) return s:gsub('height="%d+"', '') end local removeWidth = function(s) return s:gsub('width="%d+"', '') end local removeMaxWidth = function(s) return s:gsub(' max-width: %d+px;', '') end -local removeFixedSettings = function(s) return removeMaxWidth(removeWidth(removeHeight(changePath(s)))) end +local removeFixedSettings = function(s) return removeMaxWidth(removeWidth(removeHeight(s))) end local process = filter{removeFixedSettings} Make:htlatex() Make:match("html$",process) diff --git a/book/book.tex b/book/book.tex index 7c28cc3..15a677e 100644 --- a/book/book.tex +++ b/book/book.tex @@ -35,16 +35,16 @@ % 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/} + {images/} + {troubleshooting/} + {sourdough-starter/} + {troubleshooting/crumb-structures/} + {history/} + {images/external/} + {baking/} + {wheat-sourdough/} + {wheat-sourdough/shaping/} + {non-wheat-sourdough/} } % Layout rules @@ -69,7 +69,7 @@ % Title page \begin{titlepage} \centering - \includegraphics[width=\textwidth]{cover-page} + \includegraphics[width=\textwidth]{images/cover-page.jpg} Version: \today \end{titlepage}