lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Gisle Vanem writes:

> Albert Krewinkel wrote:
>
>> With pandoc and LaTeX installed, you can do
>>
>>      pandoc --pdf-engine=xelatex -o lua5.4.pdf https://lua.org/manual/5.4/manual.html
>
> I'm getting:
>   pandoc: unrecognized option `--pdf-engine=xelatex'
>
> Maybe you mean:
>   pandoc --latex-engine=xelatex -o lua5.4.pdf https://lua.org/manual/5.4/manual.html
>
> But this ends in:
>   ! Missing number, treated as zero.
>   <to be read again>
>                      \protect
>   l.2557 ...ter}\rule{0.5\linewidth}{\linethickness}
>
> What Pandoc do you have?

I'm using the latest version (pandoc 2.10). `--latex-engine` was the
name of the `--pdf-engine` option in pandoc 1.* (support for other,
non-LaTeX, pdf engines was added in version 2.0, such as the HTML based
WeasyPrint and wkhtmltopdf engines).

There are also docker images, which might be simpler in some cases. But
the command is a mouthful:

    docker run --rm -v "$PWD":/data -u $(id -u) pandoc/latex \
        --pdf-engine=xelatex -o lua5.4.pdf \
        https://lua.org/manual/5.4/manual.html

BTW, pandoc allows document modifications via Lua:
<https://pandoc.org/lua-filters.html>


--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124