Last week I reported on my initial experiments using Pandoc and LaTeXML to convert LaTeX to HTML. Here are links to the PDF produced with pdfLaTeX and the HTML:
If you’re like me, you’ll prefer the LaTeXML version to the Pandoc version, but as I pointed out the LaTeXML version includes CSS to customize the styling and the Pandoc version doesn’t. I did a quick Google search, figured out how to add CSS (and a table of contents) to the HTML output from Pandoc, and found a very nice CSS style to use (from Pascal Hertlief on Github). It’s possible that I’ll fiddle with Pascal’s CSS a bit, but there’s a good chance I won’t change it at all. It makes the HTML look really, really nice:
What I haven’t tried yet is converting LaTeX source that includes PDF figures. Let’s try that now and see how it works.
It took a while to get ImageMagick installed, to write a short Perl script to change all of the references to EPS files into references to PNG files and convert the EPSs to PNGs, but I really like the results. But this gets two of my three “to-dos” out of the way.
Check CSS styling for Pandoc.- Show the results to an accessibility expert at UConn and get some feedback on the different approaches.
See what happens with figures when they’re included in a LaTeX document.
Now I just (just?) need to check with an accessibility expert to confirm that the HTML is accessible. If it is, I’m all set.
By the way, if you’re interested in seeing the Perl script, let me know. It will be posted in the Github archive where I post the LaTeX source for my notes later this fall, but I’d be happy to send you a copy now if you drop me a line.
Of course we are interested in seeing the Perl script!
Hi, I couldn’t quite tell from your post if you were able to produce HTML files that included pictures using Pandoc. Were you able to do it with ImageMagick? I am also trying to put accessible notes online in HTML format that I write in LaTex. Thanks!
Yes, I was able to do so. I had to remove TIFF previews from the EPS files first, but then it worked fine. You can see the results if you scroll down the page a bit at http://darwin.eeb.uconn.edu/pages/population-genomics.html .