1
0
mirror of https://github.com/lise-henry/crowbook synced 2024-11-08 12:59:22 +01:00

Fix bug with tex.cover

This commit is contained in:
Lizzie Crowdagger 2024-05-13 04:55:22 +02:00
parent 5cbd8f85d0
commit 83ab6d5682
2 changed files with 7 additions and 5 deletions

@ -243,7 +243,8 @@ impl<'a> LatexRenderer<'a> {
if let Ok(cover_path) = self.book.options.get_path("cover") { if let Ok(cover_path) = self.book.options.get_path("cover") {
if !cover_path.is_empty() { if !cover_path.is_empty() {
use_cover = true; use_cover = true;
data.insert("cover_path".into(), cover_path.into()); let img = self.handler.map_image(&self.source, cover_path.as_str())?;
data.insert("cover_path".into(), img.into());
} }
} }
} }

@ -61,6 +61,11 @@
left=<<margin_left>>,right=<<margin_right>>]{geometry} % Set dimensions/margins of the parge left=<<margin_left>>,right=<<margin_right>>]{geometry} % Set dimensions/margins of the parge
<# endif #> <# endif #>
<# if use_cover #>
% Only included if tex.cover is set to true
\usepackage{pdfpages}
<# endif #>
\makeatletter \makeatletter
\date{<<date>>} \date{<<date>>}
@ -212,10 +217,6 @@
} }
<# endif #> <# endif #>
<# if use_cover #>
% Only included if tex.cover is set to true
\usepackage{pdfpages}
<# endif #>
<# if use_images #> <# if use_images #>
% Only included if document contains images % Only included if document contains images