1
0
mirror of https://github.com/lise-henry/crowbook synced 2024-09-08 03:30:37 +02: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

View File

@ -243,7 +243,8 @@ impl<'a> LatexRenderer<'a> {
if let Ok(cover_path) = self.book.options.get_path("cover") {
if !cover_path.is_empty() {
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());
}
}
}

View File

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