Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image with lualatex and xelatex #149

Closed
noraj opened this issue Feb 2, 2020 · 6 comments · Fixed by #164
Closed

Image with lualatex and xelatex #149

noraj opened this issue Feb 2, 2020 · 6 comments · Fixed by #164

Comments

@noraj
Copy link
Contributor

noraj commented Feb 2, 2020

Working

pandoc shodan-api.mkd \
--from commonmark \
--to pdf \
-o test.pdf \
--pdf-engine=pdflatex \
--table-of-contents \
--toc-depth 6 \
--number-sections \
--highlight-style breezedark \
--template eisvogel

Not working

pandoc shodan-api.mkd \
--from commonmark \
--to pdf \
-o test.pdf \
--pdf-engine=lualatex \
--table-of-contents \
--toc-depth 6 \
--number-sections \
--highlight-style breezedark \
--template eisvogel
Error producing PDF.
! error:  (file "/tmp/tex2pdf.-be734e802ef6d0c3/""fdcfc29edcf252186f1b0a52f18f50
43abaeb2d0".png) (pdf backend): cannot find image file '"/tmp/tex2pdf.-be734e802
ef6d0c3/""fdcfc29edcf252186f1b0a52f18f5043abaeb2d0".png'
!  ==> Fatal error occurred, no output PDF file produced!

Because I changed the PDF engine from pdflatex to lualatex. But lualatex and xelatex are supporting UTF-8 encoding where pdflatex supports only 256 chars.

It must be a bug from eisvogel template because if I remove --template eisvogel arg I can use lualatex and xelatex engine.

@noraj
Copy link
Contributor Author

noraj commented Feb 2, 2020

I can't use lualatex or xelatex when there is an image. eg. ![](img/2000.png).

So this template work without the image and doesn't work with the image.

---
title: "Example PDF"
author: [Author]
date: "2017-02-20"
subject: "Markdown"
keywords: [Markdown, Example]
lang: "en"
book: true
...

# Vinaque sanguine metuenti cuiquam Alcyone fixus

![](img/2000.png)

## Aesculeae domus vincemur et Veneris adsuetus lapsum

Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab
esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias
commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros
hamos ire arceor mandere spicula, in licet aliquando.

```java
public class Example implements LoremIpsum {
	public static void main(String[] args) {
		if(args.length < 2) {
			System.out.println("Lorem ipsum dolor sit amet");
		}
	} // Obscura atque coniuge, per de coniunx
}
```

Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur.
Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota
destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente
Pirithoi abstulit, lapides.

## Lydia caelo recenti haerebat lacerum ratae at

Te concepit pollice fugit vias alumno **oras** quam potest
[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis,
vel pede inter si.

1. De neque iura aquis
2. Frangitur gaudia mihi eo umor terrae quos
3. Recens diffudit ille tantum

\begin{equation}\label{eq:neighbor-propability}
    p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)}
\end{equation}

Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae
adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me.

> Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et
[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas
nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque
dura.

- Permulcens flebile simul
- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum.

@Wandmalfarbe
Copy link
Owner

The provided example works perfectly fine for me. Can you update pandoc and your LaTeX distribution to the latest version? Please also update all the installed LaTeX packages.

Screenshot 2020-02-05 at 20 20 34

@noraj
Copy link
Contributor Author

noraj commented Feb 5, 2020

$ pandoc --version
pandoc 2.8
Compiled with pandoc-types 1.20, texmath 0.12, skylighting 0.8.3

$ latex --version
pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Arch Linux)
kpathsea version 6.3.1
Copyright 2019 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with poppler version 0.85.0

I'm already using last versions.

@uzluisf
Copy link

uzluisf commented Feb 6, 2020

Related issue: jgm/pandoc#5848

Removing grffile from the template might do the job.

@Wandmalfarbe
Copy link
Owner

@noraj did the mentioned fix from @uzluisf work for you?

@noraj
Copy link
Contributor Author

noraj commented Mar 23, 2020

@Wandmalfarbe yes it works when removing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants