BD Tech Concepts LLC
LaTeX to HTML Converter — the lwarp package
The lwarp package converts LaTeX to HTML by using LaTeX to process the user’s document and directly generate HTML tags. External utility programs are only used for the final conversion of text and images. Math may be represented by SVG images or MathJax. More than 500 LaTeX packages and classes are supported, of which more than 60 also support MathJax.
Documents may be produced by DVI or PDF LaTeX, LuaLaTeX, XƎLaTeX; by several CJK engines, classes, and packages; or by customized systems such as perltex and pythontex. A texlua script automates compilation, index, glossary, and batch image processing, and also supports latexmk. Configuration is semiautomatic at the first manual compile. Support files are selfgenerated. Print and HTML versions of each document may coexist.
Assistance is provided for HTML import into EPUB conversion software and word processors.
Requirements include the commonlyavailable Poppler utilities (included with MiKTeX) and Perl. Detailed installation instructions are included for each of the major operating systems and TeX distributions.
A quickstart tutorial is provided, as well as extensive documentation for special cases, a general index, and a troubleshooting index. Automatic testing of package load order and image generation offers useful advice for resolving errors.
SVG math and many other generated images include LaTeX expressions in the alt tags. MathJax may be used with advanced equation numbering under the direct control of lwarp.
Complicated tables are supported, which copy/paste well into LibreOffice Writer.
Supported classes and packages include memoir and komascript, cleveref, caption, mdframed, siunitx, and many popular packages for tabulars, floats, graphics, theorems, the title page, bibliography, indexing, footnotes, and editorial work.
TeX is a selfmodifying tokenized macroexpansion language. Since lwarp is written directly in LaTeX, it is able to interpret the document’s meaning at a deeper level than external conversions which merely approximate TeX. HTML5 and CSS3 are leveraged to provide advanced features such as booktabs trim, multicolumns, sidebyside minipages, and JavaScriptfree navigation.
Lwarp technology white paper
For an introduction to the technology used by the lwarp package to convert HTML to LaTeX, please see the publication Producing HTML directly from LaTeX: the lwarp package.
Latest News
 v0.896:

Many fixes and improvements. Now prints theorem footnotes next to theorems. Accessibility improvements. Improved citation back references. Updated chemfig, bigdelim, xetexko. Added ccicons, classicthesis, orcidlink, enotez. Verified support for doi, doipubmed.
 v0.895:

Updated multirow, acro, fancyhdr, changes. Improved epsfig, rotating. Greatly improved MathJax emulation for siunitx. Added MathJax emulation for isomath, mattens, maybemath, skmath, tensor. Added epsf, impnattypo, isotope, lpic, luavlna, mdwmath, pinlabel, rlepsf, tikzimagelabels, xevlna. Verified to work asis: tensind.
 v0.894:

Improved warning messages for MathJax. Added MathJax emulation for backnaur, colortbl, nicematrix. Improved MathJax for booktabs. Updated menukeys.
 v0.893:

Fixed pstricks pspicture*. Fixed tikz font macros. braket: Now uses the MathJax extension. Added esvect, fixmath, keystroke, mathastext, menukeys, picinpar, plimsoll, repltext, selectp, seqsplit, simplebnf, statistics, swfigure. Added MathJax emulation for mathspec. Verified to work asis for apxproof, syntaxdi, venndiagram.
 v0.892:

Added MathJax \left and \right support for additional delimiters for fourier, libertinust1math, newpxmath, newtxmath, newtxsf, unicodemath. Updated textpos. xcolor: Fixed optional args for \fcolorbox and related. Added fvextra, minted.
 v0.891:

Fixed alltt and verbatims with LaTeX lists. Fixed fancyvrb, listings, babelfrench. Added MathJax textmacros extension. Added back page references for biblatex and hyperref. Added Greek options for mathdesign, mathpazo, mathptmx, newpxmath, newtxmath. Improved MathJax for colonequals, mathdesign, mathdots, mathfixs, mathtools, multiobjective, nicefrac, shuffle, units. unicodemath: Added Greek macros, as well as macros for the first several categories listed in texdoc unimathsymbols. Improved symbol shape macros with Greek. Improved documentation. Added bussproofs, cmbright, fourier, kpfonts, kpfontsotf, libertinust1math, scalerel, txgreeks.
 v0.89:

Adapted to upcoming LaTeX kernel changes. Improvements for MathJax. Updated caption, thmtools. Imrpoved MathJax for centernot, mathtools, mismath, SIunits, siunitx, statmath. Added MathJax emulation for accents, hepunits, hhtensor, mathalpha, mathdesign, mathpazo, mathptmx, mleftright, newpxmath, newtxmath, newtxsf, pxfonts, shuffle, txfonts, upgreek, ushort. Verified to work asis: authoraftertitle.
 v0.88:

Fixed \ref*, \chaptername, starred macros for cleveref and varioref, xfakebold. Improved varioref. Added option for various ways to display index links. Added gindex, xindex. Verified to work asis with varindex. Added fbox, shadethm, tcolorbox, termcal, thmbox, thmtools.
 v0.87:

MathJax improvements for physics, mathtools, nccmath, mhchem, cancel. Added citeref, drftcite, jurabib, multibib, splitbib. Verified to work asis with bibtopic, collref, mciteplus.
 v0.86:

MathJax: Updated to v3. Fixed forward references. Improved equation numbering. Added support for starred macros, and starred macros for mathtools, nccmath, physics. Improved filename generation. Fixed labels in eqnarray and lateximage. Fixed nccmath, xcolor.
 v0.85:

Fixed fontspec for nonLatin languages. Fixed idxlayout, mathtools, titlesec, url.
 v0.84:

Added optional previous/next page links. Numerous fixes.
 v0.83:

Fixes for memoir, update for physunits.
 v0.82:

Improved footnotes with MathJax. Added MathJax emulation for endnotes, marginnote, nccfoots, pagenote, parnotes, sidenotes. xpinyin: Added pinyin with modern HTML. luatexko: Added \dotemph, \ruby, \uline, etc. Fixed amsmath, soul, ulem, endnotes. Updated chemfig, draftwatermark. Verified to work asis with tocvsec2, tableof. Added etoc (nullified).
 v0.81:

Improved MathJax emulation processing speed. Added MathJax emulation for accsupp, axessibiltiy, colonequals, decimal, dotlessi, econometrics, engtlc, multiobjective, physunits, SIunits, stackrel, statmath. Updated axessibility to 2020/01/08 version. Updated gridset to v0.3. Fixed SIunits for math mode. Added DotArrow, nolbreaks, luamplib, returntogrid, statex2, tagpdf. Verified to work asis with icomma, mathpunctspace, textualicomma.
 v0.80:

biblatex and url now create hyperlinks. Added docs and warning messages about slow MathJax. Added MathJax emulation for accessibility, autobreak, centernot, extarrows, fouridx, gensymb, leftidx, mathcomp, mathdots, mathfixs, mismath, nccmath, noitcrul, pdfcomment, relsize, rmathbr, subsupscripts, xfrac. Improved MathJax emulation for unicodemath. Added fewerfloatpages, ghsystem, hhline, mismath, nccmath.
 v0.79:

Now supports nested tabulars. Added or improved MathJax emulation for amsmath, ar, arydshln, bm, bigdelim, bigstrut, booktabs, braket, mathtools, multirow, physics, siunitx, slashed, unicodemath, xfakebold. Fixed minor issues with graphicx, caption, multirow, siunitx, booktabs, transparent, subcaption, floatrow. Updated epigraph, xurl. Added widetable, witharrows, steinmetz, awesomebox, catoptions, svg, supports svgextract, parcolumns, pdfcolparcolumns, parallel, pdfcolparallel, pdfcol, pdfcolfoot, pdfcolmk.
 v0.78:

Fixed support files, graphics alt tags, babelfrench hyperlinks, media9, media15, and multimedia. Added accessibility.
 v0.77:

Updated booktabs, chemformula.
 v0.76:

Updated MathJax, xr, xrhyper, acro. Verified to work asis with xcite. Improved documentation regarding multiple projects in the same directory.
 v0.75:

Fixes for \normalcolor, minipage \linewidth. Fixes for keyfloat and wrapfig.
 v0.74:

Added to tutorial. Improved support for HTML alt text. Improved SVG math. Improved lyluatex. Tested to work asis with mathspec, unicodemath.
Sample Output
 This website:


• Check the HTML code of these web pages for examples of the lwarp generator’s output.

• Download a 7 MB PDF print version of this website, to compare with the online HTML version.

 Technical book conversion:

 Print PDF:
 Tablet PDF:
 HTML version:
 Sample camping trailer manual:

 PDF print version:
 HTML version:
Download
Download the lwarp package from the lwarp page on CTAN — the Comprehensive TeX Archive Network, or use your TeX distribution’s update tools.
The lwarp v0.896 manual is also available here.
Table 1 lists some of the various LaTeX features which may be used. Hundreds of packages have been adapted for lwarp, and many more work without modification.
Package names are colored according to their support level:
 name:

Supported asis.
 name:

Modifed to work with HTML output, and also as print output in SVG math or lateximage environments.
 name:

Emulated for HTML output.
 name:

Ignored for HTML output, but provides sourcelevel compatibility.
 ^{MJ}:

Supported asis for MathJax, subject to limitations.
 ^{MJ}:

Emulated for MathJax using custom macros, subject to limitations.
 ^{MJ}:

Ignored by MathJax, but may be used in the document source.
Category 
Status and supported features. 
Engines: 
DVI LaTeX, pdfLaTeX, XƎLaTeX, LuaLaTeX, upLaTeX 
Compiling: 
latexmk, perltex, pythontex, make, etc. 
Classes: 
article, book, report, scrartcl, scrbook, scrreprt, memoir, CJKrelated as listed below. 
Komascript: 
scrextend, scrhack, scrlayer. Others as listed below. 
Memoir: 
memhfixc 
Languages: 
babel, cjkpunct, impnattypo, luavlna, polyglossia, xeCJK, xevlna. 
Chinese: 
CTeX, ctex, upzhkinsoku, xpinyin, zhlineskip, zhspacing. 
Japanese: 
upLaTeX, LuaTeXja, gentombow, lltjext, plarray, plarydshln, plautopatch, plext, plextarray, plextarydshln, plextcolortbl, plextdelarray, pxatbegshi, pxeveryshi, pxftnright, pxgentombow, pxjahyper, pxpdfpages, pxpgfrcs, pxpgfmark, tascmac, zxjatype. bxjsarticle and related, ltjsarticle and related, luatexja, luatexjafontspec, ujarticle and related, utarticle and related. 
Korean: 
kotex, luatexko, xetexko. 
Page layout: 
2in1, 2up, a4, a4wide, a5comb, addlines, anysize, atbegshi, blowup, booklet, bophook, bounddvi, bxpapersize, canoniclayout, changelayout, changepage, chngpage, clrdblpg, continue, draftcopy, draftfigure, draftwatermark, ebook, everyshi, fancyhdr, fancytabs, flippdf, fullminipage, fullpage, fwlw, geometry, gmeometric, grid, gridsystem, gridset, layaureo, layout, layouts, leading, lscape, ltxgrid, nccfancyhdr, notespages, nowidow, pagegrid, pagesel, parallel, parcolumns, pdfcolparallel, pdfcolparcolumns, pdfcrypt, pdflscape, pdfprivacy, preview, ragged2e, returntogrid, rmpage, scrlayerscrpage, scrpage2, setspace, selectp, textarea, threadcol, thumb, thumbs, titleps, tocenter, turnthepage, twoup, typearea, underlin, vmargin, watermark, widowsandorphans, zwpagelayout. 
Sectioning: 
Adds FileDepth for splitting the HTML output. Files may be numbered sequentially or named according to section name. Common short words and punctuation are removed from the filenames. anonchap, bsheaders, fncychap, hypbmsec, indentfirst, quotchap, section, sectionbreak, secdot, sectsty, titlesec, tocvsec2. 
Table of contents, figures, tables: 
Supported, with hyperlinks. etoc, minitoc, multitoc, shorttoc, tableof, titletoc, tocbasic, tocbibind, tocdata, tocloft, tocstyle, tocvsec2. 
Title page: 
\maketitle, titlepage, authblk, authoraftertitle, titling. 
Front & back matter: 
abstract, appendix. 
Indexing: 
makeindex, xindy, and xindex are supported, with hyperlinks. gindex, hvindex, idxlayout, imakeidx, index, makeidx, repeatindex, splitidx, varindex, xindex. 
Glossary: 
gloss, glossaries and xindy, nomencl. 
Bibliography: 
babelbib, bibtopic, backref, biblatex, bibunits, chapterbib, cite, citeref, collref, drftcite, hypernat, jurabib, mcite, mciteplus, multibib, natbib, notes2bib, splitbib, showtags. 
Crossreferences: 
bookmark, breakurl, cleveref, fancyref, hypdestopt, hyperref, perpage, prettyref, titleref, url, varioref, xcite, xr, xrhyper, xurl, zref. 
Margin notes: 
marginal, marginfit, marginfix, scrlayernotecolumn, versonotes. 
Footnotes: 
Adds FootnoteDepth to print footnotes at section breaks. MathJax emulation for \footnote, and also as marked in the following: bigfoot, dblfnote, endheads, endnotes^{MJ}, enotez^{MJ}, fixfoot, fnbreak, fnpara, fnpos, footmisc, footnote, footnotebackref, footnoterange, footnpag, manyfoot, marginnote^{MJ}, nccfoots^{MJ}, pagenote^{MJ}, parnotes^{MJ}, pdfcolfoot, pfnote, sepfootnotes, sidenotes^{MJ}, tablefootnote. 
Math: 
Converted to SVG images with HTML <alt> tags containing the LaTeX source for the math expression. MathJax supported as an alternative. amsmath^{MJ}: AMS environments are supported. Userdefined macros are available during converson, due to native LaTeX processing. 
Theorems: 
Native LaTeX theorems, amsthm, apxproof, ntheorem, shadethm, theorem, thmbox, thmtools. 
Additional math: 
Math fonts via SVG images, accents^{MJ}, amscd^{MJ}, amscdx, autobreak^{MJ}, autonum, backnaur^{MJ}, bm^{MJ}, braket^{MJ}, breqn^{MJ}, bussproofs^{MJ}, cases^{MJ}, centernot^{MJ}, cmbright^{MJ}, colonequals^{MJ}, decimal^{MJ}, delarray, DotArrow^{MJ}, dotlessi^{MJ}, dotlessj^{MJ}, esvect^{MJ}, extarrows^{MJ}, fixmath^{MJ}, fouridx^{MJ}, fourier^{MJ}, guass, hhtensor^{MJ}, icomma^{MJ}, isomath^{MJ}, jkmath, kpfonts^{MJ}, kpfontsotf^{MJ}, leftidx^{MJ}, libertinust1math^{MJ}, mathalpha^{MJ}, mathastext^{MJ}, mathcomp^{MJ}, mathdesign^{MJ}, mathdots^{MJ}, mathfixs^{MJ}, mathpazo^{MJ}, mathptmx^{MJ}, mathpunctspace^{MJ}, mathspec^{MJ}, mathtools^{MJ}, mattens^{MJ}, maybemath^{MJ}, mdwmath^{MJ}, mismath^{MJ}, mleftright^{MJ}, multiobjective^{MJ}, nccmath^{MJ}, nicematrix^{MJ}, noitcrul^{MJ}, newpxmath^{MJ}, newtxmath^{MJ}, newtxsf^{MJ}, pbdiagram, pxfonts^{MJ}, resizegather^{MJ}, rmathbr^{MJ}, scalerel^{MJ}, shuffle^{MJ}, skmath^{MJ}, stackrel^{MJ}, statex2^{MJ}, statistics, statmath^{MJ}, subsupscripts^{MJ}, tensind, tensor^{MJ}, textualicomma^{MJ}, txfonts^{MJ}, txgreeks^{MJ}, unicodemath^{MJ}, upgreek^{MJ}, ushort^{MJ}, witharrows^{MJ}, xfakebold^{MJ}, xy. Many others work asis. 
Display math with \displaymathother: 
Complicated math objects in display math, such as tikzcd, etc. 
Units and fractions: 
nicefrac^{MJ}, SIunits^{MJ}, siunitx^{MJ}, units^{MJ}, unitsdef, xfrac^{MJ}. 
Floats: 
Appear where declared. captof, caption, cutwin, dblfloatfix, endfloat, fewerfloatpages, fix2col, flafter, float, floatflt, floatrow, fltrace, ftcap, hypcap, keyfloat, morefloats, multicap, newfloat, nonfloat, picinpar, placeins, rotfloat, stfloats, subcaption, subfig, subfigure, subfloat, swfigure, topcapt, trivfloat, wrapfig. 
Tabular: 
tabular environment, array^{MJ}, arydshln^{MJ}, bigdelim^{MJ}, bigstrut^{MJ}, booktabs^{MJ}, colortbl^{MJ}, ctable, diagbox, hhline^{MJ}, longtable, ltablex, ltxtable, multirow^{MJ}, supertabular, tabularx, tabulary, threeparttable, threeparttablex, widetable, xltabular, xtab. 
Graphics: 
graphics and graphicx. \includegraphics supports width, height, origin, angle, and scale tags, and adds class. References to PDF files are changed to SVG, other image types are accepted as well. \rotatebox and \scalebox are supported as well as HTML can handle. rotating is emulated but all objects are unrotated in HTML. picture, tikz, and xy are converted to an SVG image. asymptote, curves, datatool, eepic, epsf, epsfig, epstopdf, figsize, fitbox, grffile, lpic, luamplib, media9, movie15, multimedia, overpic, pict2e, pinlabel, psfrag, psfragx, psteps, pstool, pstricks, rlepsf, rviewport, svg, svgextract, tikz, tikz3dplot, tikzimagelabels, xy 
xcolor: 
Full package color names, any color models, and mixing. \textcolor, \colorbox, \fcolorbox. Enhanced for HTML compatibility. 
Lists: 
Standard LaTeX environments, enumerate, enumitem, eqlist, hang, listliketab, paralist. 
Environments: 
Standard LaTeX environments. 
minipage, \parbox: 
Some HTML5imposed limitations. Nested minipages are supported. eqparbox, minibox, pbox, shapepar. 
Quotations: 
copyrightbox, csquotes, epigraph, quoting, verse. 
Verbatim: 
fancyvrb, fvextra, moreverb, shortvrb, verbatim. 
Frames: 
boxedminipage, boxedminipage2e, fancybox, fbox^{MJ}, framed, mdframed, niceframe, shadow, tcolorbox^{MJ}, vertbars. 
Multicolumns: 
adjmulticol, multicol, multicolrule, vwcol. 
Margins: 
fullwidth, hanging, midpage. 
Line numbering: 
fnlineno, lineno. 
Direct formatting: 
\emph, \textsuperscript, \textbf, etc are supported. \bfseries, etc. are only supported in some cases. cancel^{MJ}, ellipsis, embrac, enparen, hyphenat, lettrine, lips, luacheckhyphen, luacolor, magaz, moresize, nolbreaks, normalcolor, pdfcol, pdfcolmk, pdfrender, realscripts, relsize^{MJ}, scalefnt, seqsplit^{MJ}, soul, soulpos, soulutf8, stackengine, textfit, thinsp, trimclip, truncate, ulem, umoline, underscore, uspace, xellipsis. 
Acronyms: 
acro, acronym. 
Ordinals: 
engord, fmtcount, nth. 
Text ligatures: 
Ligatures for symbols are supported. Ligatures for f, q, t are intentionally turned off because many simpler browsers do not display them correctly. Modern fullfeatured browsers recreate these ligatures onthefly. 
Horizontal space: 
HTML output for thinunbreakable, unbreakable, \enskip, \quad, \qquad, \hspace. 
Rules: 
\rule with width, height, raise, text color. 
HTML reserved characters: 
\&, \textless, and \textgreater are converted to HTML entities. 
Fonts: 
Used asis. Appear in SVG math expressions or embedded image environments. fontaxes, nfssextcfr, slantsc, tabfigures. Tested to work asis: Special font macros in cfrlm and others which use nfssextcfr. Also see the math section for math and MathJax support for math font packages. 
Symbols: 
Native LaTeX diacriticals, academicons, amssymb^{MJ}, bbding, ccicons, chemgreek, dingbat, euro, eurosym, fontawesome, fontawesome5, gensymb^{MJ}, latexsym^{MJ}, marvosym, metalogo, metalogox, pifont, textalpha, textcomp, textgreek, typicons, xunicode. 
Files: 
attachfile, attachfile2, hyperxmp, inputtrc, intopdf, pdfpages, pdfx, xmpincl. 
Science and engineering: 
algorithm2e, algorithmicx, ar^{MJ}, askmaps, axodraw2, bitpattern, blochsphere, bodegraph, bohr, bytefield, chemfig, chemformula, chemgreek, chemmacros, chemnum, circuitikz, econometrics^{MJ}, elements, engtlc^{MJ}, fastdiagram, ghsystem, hepnicenames, heppennames, hepunits^{MJ}, isotope^{MJ}, karnaughmap, karnaughmap, keystroke, listings, listingsutf8, linop, menukeys, mhchem^{MJ}, minted, pgfgantt, phfqit, physics^{MJ}, physunits^{MJ}, plimsoll^{MJ}, qcircuit, register, simplebnf, simplerwick, slashed^{MJ}, steinmetz^{MJ}, structmech, struktex, syntaxdi, tikzkarnaugh, tikzcodeblocks, venndiagram 
Arts and humanities: 
foreign, forest, lyluatex, musicography, nameauth, octave, phonrule, piano, schemata, semanticmarkup, tikzdependency, vowel, xpiano 
Academic: 
academicons, classicthesis, doi, doipubmed, orcidlink^{MJ}, termcal 
Admonitions: 
awesomebox, notes. 
Editorial: 
changebar, changelog, changes, easytodo, easyReview, ed, errata, fixme, fixmetodonotes, pdfcomment^{MJ}, pdfmarginpar, todo, todonotes, tram, xechangebar. 
Accessibility: 
accessibility^{MJ}, accsupp^{MJ}, axessibility^{MJ}, pdfcomment^{MJ}, repltext^{MJ}, tagpdf. 
Package handling: 
catoptions. 
Debug: 
chkfloat, cmdtrack, dprogress, luavisualdebug, refcheck, srcltx, srctex, vpe, xbmks. 
Working asis: 
Various utility, calculation, file, and textonly packages, such as calc, fileerr, somedefs, trace, xspace. Also, most mathonly packages, including specialized typesetting for various fields of science and engineering. 