{"id":869,"date":"2020-08-03T08:00:00","date_gmt":"2020-08-03T12:00:00","guid":{"rendered":"http:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/?p=869"},"modified":"2020-08-02T14:50:24","modified_gmt":"2020-08-02T18:50:24","slug":"making-accessible-html-from-latex-sources-an-additional-experiment","status":"publish","type":"post","link":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/blog\/2020\/08\/03\/making-accessible-html-from-latex-sources-an-additional-experiment\/","title":{"rendered":"Making accessible HTML from LaTeX sources &#8212; an additional experiment"},"content":{"rendered":"<p>Last week I reported on my initial experiments using <a href=\"https:\/\/pandoc.org\/index.html\">Pandoc<\/a> and <a href=\"https:\/\/dlmf.nist.gov\/LaTeXML\/\">LaTeXML<\/a> to convert LaTeX to HTML. Here are links to the PDF produced with pdfLaTeX and the HTML:<\/p>\n<ul>\n<li><a href=\"http:\/\/darwin.eeb.uconn.edu\/eeb348-notes\/quant-resemblance.pdf\">PDF<\/a><\/li>\n<li><a href=\"http:\/\/darwin.eeb.uconn.edu\/pages\/quant-resemblance-pandoc.html\">Pandoc<\/a><\/li>\n<li><a href=\"http:\/\/darwin.eeb.uconn.edu\/pages\/quant-resemblance-latexml.html\">LaTeXML<\/a><\/li>\n<\/ul>\n<p>If you&#8217;re like me, you&#8217;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&#8217;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 <a href=\"https:\/\/gist.github.com\/killercup\/5917178\">Github<\/a>). It&#8217;s possible that I&#8217;ll fiddle with Pascal&#8217;s CSS a bit, but there&#8217;s a good chance I won&#8217;t change it at all. It makes the HTML look really, really nice:<\/p>\n<ul>\n<li><a href=\"http:\/\/darwin.eeb.uconn.edu\/pages\/quant-resemblance-pandoc-2.html\">Pandoc with Pascal Hertlief&#8217;s CSS<\/a><\/li>\n<\/ul>\n<p>What I haven&#8217;t tried yet is converting LaTeX source that includes PDF figures. Let&#8217;s try that now and see how it works.<\/p>\n<ul>\n<li><a href=\"http:\/\/darwin.eeb.uconn.edu\/eeb348-notes\/population-genomics.pdf\">PDF<\/a><\/li>\n<li><a href=\"http:\/\/darwin.eeb.uconn.edu\/pages\/population-genomics.html\">Pandoc with Pascal Hertlief&#8217;s CSS<\/a><\/li>\n<\/ul>\n<p>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 &#8220;to-dos&#8221; out of the way.<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><del>Check CSS styling for Pandoc.<\/del><\/li>\n<li>Show the results to an accessibility expert at UConn and get some feedback on the different approaches.<\/li>\n<li><del>See what happens with figures when they\u2019re included in a LaTeX document.<\/del><\/li>\n<\/ul>\n<p>Now I just (<strong>just<\/strong>?) need to check with an accessibility expert to confirm that the HTML is accessible. If it is, I&#8217;m all set.<\/p>\n<p>By the way, if you&#8217;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&#8217;d be happy to send you a copy now if you drop me a line.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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: PDF&#8230; <a class=\"read-more-button\" href=\"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/blog\/2020\/08\/03\/making-accessible-html-from-latex-sources-an-additional-experiment\/\">Read more &gt;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,7],"tags":[],"class_list":["post-869","post","type-post","status-publish","format-standard","hentry","category-academics","category-population-genetics"],"_links":{"self":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/posts\/869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/comments?post=869"}],"version-history":[{"count":1,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/posts\/869\/revisions"}],"predecessor-version":[{"id":870,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/posts\/869\/revisions\/870"}],"wp:attachment":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/media?parent=869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/categories?post=869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/wp-json\/wp\/v2\/tags?post=869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}