crowdagger/crowbook

ERROR - tex.template.add: new.tex with the empty (totally commented file)

kiiiiit opened this issue ยท 3 comments

Hello!
When I add tex.template.add: new.tex to my.book file and create an empty new.tex file. Then I run crowbook my.book, I get an error:

๐Ÿฆ CROWBOOK ๐Ÿ“š 0.16.1
โœ” Finished
โŒ pdf: Error during temporary files editing: xelatex didn't return succesfully
โš ๏ธ WARNING Crowbook exited successfully, but the following errors occurred:
๐Ÿ’ฃ ERROR Error rendering pdf: Error during temporary files editing: xelatex didn't return succesfully

If I comment or use without of tex.template.add: new.tex everything is OK.

I think you misunderstood the tex.template.add option because crowbook will not read the file but just replace https://github.com/lise-henry/crowbook/blob/5052bba5dac9c221f54de7503e41174195de4b2b/templates/latex/template.tex#L240 with the string you added.

So to include a file to the template you'd need to tell LaTeX what you want, e.g.:

tex.template.add: \include{new.tex}

C.f. Chapter 5 Templates.

ps. I'm not sure if including a file like this is a good idea.

Thank you stefan0xC. I'll try to do tike this. I've read the manual here, guide/04_templates.

It doesn't work :( Read rules here

Files:

โ”œโ”€โ”€ 1.md
โ”œโ”€โ”€ export
โ”œโ”€โ”€ my1.book
โ””โ”€โ”€ new.tex

my.book

author: Your name
title: Your title
lang: en

tex.template.add: \input{new.tex}
output.pdf: export/my.pdf
+ 1.md

new.tex - is blank
1.md - is sample file from here

LOG is:

๐Ÿฆ CROWBOOK ๐Ÿ“š 0.16.1
16:26:04 [DEBUG] (1) crowbook::book: Parsing chapter: 1.md...
16:26:04 [DEBUG] (1) crowbook::book: Ignoring YAML block:
                            

16:26:04 [DEBUG] (1) crowbook::book: Attempting to generate pdf...
16:26:04 [DEBUG] (1) crowbook::latex: Attempting to run LaTeX on generated file
16:26:06 [DEBUG] (1) crowbook::zipper: xelatex didn't return succesfully: 
16:26:06 [ERROR] crowbook::book: Error rendering pdf: Error during temporary files editing: xelatex didn't return succesfully