crowdagger / crowbook

Converts books written in Markdown to HTML, LaTeX/PDF and EPUB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

kiiiiit opened this issue Β· 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