[tex4ht] Error with listings for R programs

Steven Dunbar sdunbar1 at unl.edu
Wed Jun 15 17:32:53 CEST 2016

I write lecture notes for my students including program listings in
the language R.  I want to process these with tex4ht to HTML with
MathJax to post on my class webpages.  The program listings use the
package "listing".

When processing with files (see below for example) with tex4ht, I get the following error:
! Missing } inserted.
<inserted text>
l.9 S <-

Answering with a "q" during each processing pass seems to ignore the
problem and produce a valid HTML file.  The error does not
occur when processing with pdflatex, and the pdf is fine.

I want to automate the processing.  Therefore, either fixing the problem
altogether (best!) or commanding tex4ht to run quietly without asking
(good enough!) would be a solution.

A minimal working example demonstrating the problem:
\usepackage{listings}           %for computer code fragments


Some text that precedes the listing for $S = 50$ in R notation.

S <- 50


Command and Envrionment:
htlatex minworkexample.tex "~/ht5mathjax,xhtml,mathml" " -cunihtf" "-cvalidate"

I'm using TeX Live 2014 on a Fedora 23 installation.

Thanks in advance!

-- Steve Dunbar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20160615/beb5cbd5/attachment.html>

More information about the tex4ht mailing list