[tex4ht] Fwd: [bug #371] TikZ externalization and PDF images

Michal Hoftich michal.h21 at gmail.com
Thu Oct 19 11:23:17 CEST 2017


HI Nasser,

> Thanks. It was not clear from your message if it was or not, so
> I did full update before trying. Any idea when your changes
> will be in TL so one can do full update again to pick it up?
>

I hope in a few days?


>
>
> And I was hoping your changes will let me get rid of this
> conditions and convert the PDF pages on the fly to SVG and
> have them show in the HTML itself.
>

As you use LuaTeX, it may be possible to use some Lua code:

\newcommand\pdfgetlen[1]{%
  \directlua{%
    local doc = epdf.open("#1")
    tex.print(doc:getNumPages())
  }
}

Just use it as \pdfgetlen{foo.pdf} in the loop



>
> Yes, I know about pdf2svg, but this requires one to break the PDF
> manually into separate pages each time into smaller PDF files,
> where each file now contain one page. So right now, I just
> use \href{}{} to link to the PDF file when I compile to HTML.
>
>

The version I've found supports page selection, this is why I chose it
over Inkscape.



>
> Thanks for the above .cfg template file. That helps alot.
> All these commands are magic to me, so it is always good
> to have a template to use as reference.
>

Just remember to not use it once the changes are propagated to TeX Live :)

Best regards,
Michal


More information about the tex4ht mailing list