((BD Tech Concepts logo))

BD Tech Concepts LLC

to HTML Converter — the lwarp package

((LaTeX Lwarp package logo))

The lwarp package converts to HTML by using 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 packages and classes are supported, of which more than 60 also support MathJax.

Documents may be produced by DVI or PDF , Lua, ; 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 semi-automatic at the first manual compile. Support files are self-generated. 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 commonly-available Poppler utilities (included with MiKTeX) and Perl. Detailed installation instructions are included for each of the major operating systems and distributions.

A quick-start 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 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 koma-script, cleveref, caption, mdframed, siunitx, and many popular packages for tabulars, floats, graphics, theorems, the title page, bibliography, indexing, footnotes, and editorial work.

is a self-modifying tokenized macro-expansion language. Since lwarp is written directly in , it is able to interpret the document’s meaning at a deeper level than external conversions which merely approximate . HTML5 and CSS3 are leveraged to provide advanced features such as booktabs trim, multicolumns, side-by-side minipages, and JavaScript-free navigation.

Lwarp technology white paper

For an introduction to the technology used by the lwarp package to convert HTML to , please see the publication Producing HTML directly from : the lwarp package.

Latest News


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.


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, tikz-imagelabels, xevlna. Verified to work as-is: tensind.


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


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 as-is for apxproof, syntaxdi, venndiagram.


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


Fixed alltt and verbatims with lists. Fixed fancyvrb, listings, babel-french. 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. unicode-math: Added Greek macros, as well as macros for the first several categories listed in texdoc unimath-symbols. Improved symbol shape macros with Greek. Improved documentation. Added bussproofs, cmbright, fourier, kpfonts, kpfonts-otf, libertinust1math, scalerel, txgreeks.


Adapted to upcoming 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 as-is: authoraftertitle.


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 as-is with varindex. Added fbox, shadethm, tcolorbox, termcal, thmbox, thmtools.


MathJax improvements for physics, mathtools, nccmath, mhchem, cancel. Added citeref, drftcite, jurabib, multibib, splitbib. Verified to work as-is with bibtopic, collref, mciteplus.


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.


Fixed fontspec for non-Latin languages. Fixed idxlayout, mathtools, titlesec, url.


Added optional previous/next page links. Numerous fixes.


Fixes for memoir, update for physunits.


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 as-is with tocvsec2, tableof. Added etoc (nullified).


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 as-is with icomma, mathpunctspace, textualicomma.


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 unicode-math. Added fewerfloatpages, ghsystem, hhline, mismath, nccmath.


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


Fixed support files, graphics alt tags, babel-french hyperlinks, media9, media15, and multimedia. Added accessibility.


Updated booktabs, chemformula.


Updated MathJax, xr, xr-hyper, acro. Verified to work as-is with xcite. Improved documentation regarding multiple projects in the same directory.


Fixes for \normalcolor, minipage \linewidth. Fixes for keyfloat and wrapfig.


Added to tutorial. Improved support for HTML alt text. Improved SVG math. Improved lyluatex. Tested to work as-is with mathspec, unicode-math.

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:

Introduction to Gear Design — Print — PDF

Tablet PDF:

Introduction to Gear Design — Tablet — PDF

HTML version:

Introduction to Gear Design — Website — HTML

Sample camping trailer manual:

PDF print version:

Camping Trailer Manual — PDF

HTML version:

Camping Trailer Manual — HTML


Download the lwarp package from the lwarp page on CTAN — the Comprehensive Archive Network, or use your distribution’s update tools.

The lwarp v0.896 manual is also available here.

Supported Packages

Table 1 lists some of the various 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:


Supported as-is.


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


Emulated for HTML output.


Ignored for HTML output, but provides source-level compatibility.


Supported as-is for MathJax, subject to limitations.


Emulated for MathJax using custom macros, subject to limitations.


Ignored by MathJax, but may be used in the document source.

Table 1:  lwarp package — Supported features


Status and supported features.


DVI , pdf, , Lua, up


latexmk, perltex, pythontex, make, etc.


article, book, report, scrartcl, scrbook, scrreprt, memoir, CJK-related as listed below.


scrextend, scrhack, scrlayer. Others as listed below.




babel, cjkpunct, impnattypo, luavlna, polyglossia, xeCJK, xevlna.


C, ctex, upzhkinsoku, xpinyin, zhlineskip, zhspacing.


up, Lua-ja, 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, luatexja-fontspec, ujarticle and related, utarticle and related.


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, grid-system, gridset, layaureo, layout, layouts, leading, lscape, ltxgrid, nccfancyhdr, notespages, nowidow, pagegrid, pagesel, parallel, parcolumns, pdfcolparallel, pdfcolparcolumns, pdfcrypt, pdflscape, pdfprivacy, preview, ragged2e, returntogrid, rmpage, scrlayer-scrpage, scrpage2, setspace, selectp, textarea, threadcol, thumb, thumbs, titleps, tocenter, turnthepage, twoup, typearea, underlin, vmargin, watermark, widows-and-orphans, zwpagelayout.


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.


makeindex, xindy, and xindex are supported, with hyperlinks.

gindex, hvindex, idxlayout, imakeidx, index, makeidx, repeatindex, splitidx, varindex, xindex.


gloss, glossaries and xindy, nomencl.


babelbib, bibtopic, backref, biblatex, bibunits, chapterbib, cite, citeref, collref, drftcite, hypernat, jurabib, mcite, mciteplus, multibib, natbib, notes2bib, splitbib, showtags.


bookmark, breakurl, cleveref, fancyref, hypdestopt, hyperref, perpage, prettyref, titleref, url, varioref, xcite, xr, xr-hyper, xurl, zref.

Margin notes:

marginal, marginfit, marginfix, scrlayer-notecolumn, versonotes.


Adds FootnoteDepth to print footnotes at section breaks. MathJax emulation for \footnote, and also as marked in the following: bigfoot, dblfnote, endheads, endnotesMJ, enotezMJ, fixfoot, fnbreak, fnpara, fnpos, footmisc, footnote, footnotebackref, footnoterange, footnpag, manyfoot, marginnoteMJ, nccfootsMJ, pagenoteMJ, parnotesMJ, pdfcolfoot, pfnote, sepfootnotes, sidenotesMJ, tablefootnote.


Converted to SVG images with HTML <alt> tags containing the source for the math expression. MathJax supported as an alternative. amsmathMJ: environments are supported. User-defined macros are available during converson, due to native processing.


Native theorems, amsthm, apxproof, ntheorem, shadethm, theorem, thmbox, thmtools.

Additional math:

Math fonts via SVG images, accentsMJ, amscdMJ, amscdx, autobreakMJ, autonum, backnaurMJ, bmMJ, braketMJ, breqnMJ, bussproofsMJ, casesMJ, centernotMJ, cmbrightMJ, colonequalsMJ, decimalMJ, delarray, DotArrowMJ, dotlessiMJ, dotlessjMJ, esvectMJ, extarrowsMJ, fixmathMJ, fouridxMJ, fourierMJ, guass, hhtensorMJ, icommaMJ, isomathMJ, jkmath, kpfontsMJ, kpfonts-otfMJ, leftidxMJ, libertinust1mathMJ, mathalphaMJ, mathastextMJ, mathcompMJ, mathdesignMJ, mathdotsMJ, mathfixsMJ, mathpazoMJ, mathptmxMJ, mathpunctspaceMJ, mathspecMJ, mathtoolsMJ, mattensMJ, maybemathMJ, mdwmathMJ, mismathMJ, mleftrightMJ, multiobjectiveMJ, nccmathMJ, nicematrixMJ, noitcrulMJ, newpxmathMJ, newtxmathMJ, newtxsfMJ, pb-diagram, pxfontsMJ, resizegatherMJ, rmathbrMJ, scalerelMJ, shuffleMJ, skmathMJ, stackrelMJ, statex2MJ, statistics, statmathMJ, subsupscriptsMJ, tensind, tensorMJ, textualicommaMJ, txfontsMJ, txgreeksMJ, unicode-mathMJ, upgreekMJ, ushortMJ, witharrowsMJ, xfakeboldMJ, xy. Many others work as-is.

Display math with \displaymathother:

Complicated math objects in display math, such as tikz-cd, etc.

Units and fractions:

nicefracMJ, SIunitsMJ, siunitxMJ, unitsMJ, unitsdef, xfracMJ.


Appear where declared. capt-of, 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 environment, arrayMJ, arydshlnMJ, bigdelimMJ, bigstrutMJ, booktabsMJ, colortblMJ, ctable, diagbox, hhlineMJ, longtable, ltablex, ltxtable, multirowMJ, supertabular, tabularx, tabulary, threeparttable, threeparttablex, widetable, xltabular, xtab.


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, pst-eps, pstool, pstricks, rlepsf, rviewport, svg, svg-extract, tikz, tikz-3dplot, tikz-imagelabels, xy


Full package color names, any color models, and mixing. \textcolor, \colorbox, \fcolorbox. Enhanced for HTML compatibility.


Standard environments, enumerate, enumitem, eqlist, hang, listliketab, paralist.


Standard environments.

minipage, \parbox:

Some HTML5-imposed limitations. Nested minipages are supported. eqparbox, minibox, pbox, shapepar.


copyrightbox, csquotes, epigraph, quoting, verse.


fancyvrb, fvextra, moreverb, shortvrb, verbatim.


boxedminipage, boxedminipage2e, fancybox, fboxMJ, framed, mdframed, niceframe, shadow, tcolorboxMJ, vertbars.


adjmulticol, multicol, multicolrule, vwcol.


fullwidth, hanging, midpage.

Line numbering:

fnlineno, lineno.

Direct formatting:

\emph, \textsuperscript, \textbf, etc are supported. \bfseries, etc. are only supported in some cases. cancelMJ, ellipsis, embrac, enparen, hyphenat, lettrine, lips, lua-check-hyphen, luacolor, magaz, moresize, nolbreaks, normalcolor, pdfcol, pdfcolmk, pdfrender, realscripts, relsizeMJ, scalefnt, seqsplitMJ, soul, soulpos, soulutf8, stackengine, textfit, thinsp, trimclip, truncate, ulem, umoline, underscore, uspace, xellipsis.


acro, acronym.


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 full-featured browsers re-create these ligatures on-the-fly.

Horizontal space:

HTML output for thin-unbreakable, unbreakable, \enskip, \quad, \qquad, \hspace.


\rule with width, height, raise, text color.

HTML reserved characters:

\&, \textless, and \textgreater are converted to HTML entities.


Used as-is. Appear in SVG math expressions or embedded image environments. fontaxes, nfssext-cfr, slantsc, tabfigures.

Tested to work as-is: Special font macros in cfr-lm and others which use nfssext-cfr.

Also see the math section for math and MathJax support for math font packages.


Native diacriticals, academicons, amssymbMJ, bbding, ccicons, chemgreek, dingbat, euro, eurosym, fontawesome, fontawesome5, gensymbMJ, latexsymMJ, marvosym, metalogo, metalogox, pifont, textalpha, textcomp, textgreek, typicons, xunicode.


attachfile, attachfile2, hyperxmp, inputtrc, intopdf, pdfpages, pdfx, xmpincl.

Science and engineering:

algorithm2e, algorithmicx, arMJ, askmaps, axodraw2, bitpattern, blochsphere, bodegraph, bohr, bytefield, chemfig, chemformula, chemgreek, chemmacros, chemnum, circuitikz, econometricsMJ, elements, engtlcMJ, fast-diagram, ghsystem, hepnicenames, heppennames, hepunitsMJ, isotopeMJ, karnaughmap, karnaugh-map, keystroke, listings, listingsutf8, linop, menukeys, mhchemMJ, minted, pgfgantt, phfqit, physicsMJ, physunitsMJ, plimsollMJ, qcircuit, register, simplebnf, simpler-wick, slashedMJ, steinmetzMJ, structmech, struktex, syntaxdi, tikz-karnaugh, tikzcodeblocks, venndiagram

Arts and humanities:

foreign, forest, lyluatex, musicography, nameauth, octave, phonrule, piano, schemata, semantic-markup, tikz-dependency, vowel, xpiano


academicons, classicthesis, doi, doipubmed, orcidlinkMJ, termcal


awesomebox, notes.


changebar, changelog, changes, easy-todo, easyReview, ed, errata, fixme, fixmetodonotes, pdfcommentMJ, pdfmarginpar, todo, todonotes, tram, xechangebar.


accessibilityMJ, accsuppMJ, axessibilityMJ, pdfcommentMJ, repltextMJ, tagpdf.

Package handling:



chkfloat, cmdtrack, dprogress, lua-visual-debug, refcheck, srcltx, srctex, vpe, xbmks.

Working as-is:

Various utility, calculation, file, and text-only packages, such as calc, fileerr, somedefs, trace, xspace. Also, most math-only packages, including specialized typesetting for various fields of science and engineering.