((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. Hundreds of packages are supported.

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


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.


Fixed \include. Improved memoir, koma-script, caption, datatool, threeparttable, xy, fancyvrb. Updated intopdf, tocdata, quotchap, versonotes, backnaur, musicography. Added stackengine, lyluatex (music scores).


Fixed \multicolumn, xr, xr-hyper, soulutf8. Updated boxedminipage2e, zhlineskip. Added fontaxes, slantsc, tabfigures. Added nfssext-cfr, thus supporting cfr-lm and several other font packages. Added backnaur, hypbmsec, minibox, pdfcrypt, shapepar.


Added support for tabular ’*’ columns. Updated chemfig, endfloat, textpos. Added media9, movie15, multimedia.


Improved error handling. Fixes for \makebox, \parbox. MathJax updated, allows custom scripts, works with mhchem. textcomp, xunicode: Fix for \textinterrobang. Updated the changes package. Added autonum, changelayout, inputtrc, mathtools, metalogox.


Improved error handling for graphics, multirow. Fixes for \makebox, \framebox, fminipage, array, longtable, tabularx/tabulary, supertabular/xtab. Update and improved formatting for keyfloat. Added ctable, eqlist, eqparbox, ftcap, listliketab, minitoc, tocdata, topcapt.


Improved error detection for image generation and longtables. Fixed threeparttable, hyperref, morefloats, listings. Added bigfoot, fnpara, footnotebackref, manyfoot, tablefootnote, threeparttablex. Added layouts, niceframe, perpage, showtags.


Improved filename generation for symbols in section names. Added academicons, bbding, dingbat, eurosym, fontawesome, fontawesome5, marvosym, pifont, typicons. Added changes, easyReview, fitbox, foreign, gloss, karnaugh-map, multicap, nomencl, notes, struktex, umoline, xfakebold. Tested to work as-is with askmaps, curves, euro, karnaughmap, tikz-karnaugh.


Added options to set image directory and prefix. Improved support for multiple projects in the same directory. Added support for xr and xr-hyper. Improved filename generation when special characters or macros are used in section names. Added a user-adjustable limit to the filename length. Fixed floats, indexing, minipages. Improved HTML output formatting, CSS for definition lists and table notes. Fixed, improved, or updated caption, subcaption, multicol, multicolrule, tocbasic, acronym, kotexutf, extramarks, fancyhdr. Added ar, ed, indentfirst, nameauth, truncate, and verified works as-is with changelog. Prevented the use of several obsolete packages.


Added numerous Japanese classes and packages. Improved page layout. Added an \includegraphics alt tag option. Added an error if detects a duplicate HTML file name. Fixes for tabular*. Improved HTML validation for \quad, \enskip, figure captions. Added support for fontspec \textsi and \sishape. Added multicols \docolaction. Added embrac, footnoterange, multicolrule, versonotes.


Japanese: Added utarticle and related classes, improved ujarticle and related classes. Chinese: Fix for biblatex with C. Koma-Script: Fixes for scrlayer, scrlayer-scrpage, added scrpage2. Updated addlines. Added bsheaders, gmeometric, marginal, rmpage, scrpage2.


Improved mdframed. Fixes for xeCJK. Tested and added support for numerous classes and packages for CJK. Chinese: cjkpunct, upzhkinsoku, xpinyin, zhspacing, zhlineskip. Japanese: pLATEX, upLATEX, bxjsarticle and related, ltjsarticle and related, luatexja, luatexja-fontspec, ujarticle and related, zxjatype. Korean: kotex, luatexko, xetexko.


Added option for HTML page titles to show section name before/after overall website name. Updated MiK docs. Updated asymptote docs. Added C and xeCJK. Fixed or updated algorithm2e, chemfig, register, nicefrac, units, xfrac, textcomp, xunicode, ulem. Added bitpattern, pdfcomment, pdfmarginpar, tram, unitsdef, xechangebar. Added musicography, octave, semantic-markup. Added 2in1, flippdf, notespages, rviewport, twoup.


Supports custom compilation commands, such as for perltex, pythontex, etc. Fixed paragraph tags in a tabular, captions for supertabular and xtab, DVI EPS images, newfloat lists, CSS for footnotes. Added epsfig, psfrag, psfragx, pstool, and a dozen other miscellaneous packages. Documentation and indexing improvements.


Fixed longtable package slowdown and memory management with very long tables. Fixed listings package HTML entities, and for use inside a list environment. Fixed diagbox package HTML paragraph tags. Added 2up, twoup-gen, booklet. Added bophook, draftfigure, fullminipage, grid-system, layaureo. Added leading, widows-and-orphans. Added fancytabs, thumb, thumbs.


Improved error checking for lwarpmk. Added support for DVI latex. Added lwarpmk epstopdf to convert large numbers of EPS images. Fix for Mathjax chapter numbers. Added MathJax support for nicefrac, units. Added asymptote, pdftricks, pstricks, pst-eps. Added breqn, SIunits. Added bxpapersize, canoniclayout, draftcopy, fnbreak, nccfancyhdr. Added accsupp, axessibility. Added xunicode. Improved and now supports epstopdf. Tested to work as-is: eepic, sepfootnotes.


Extensive improvements for indexing and glossaries. Added support for makeindex. (Previously xindy only.) Added indexing packages: imakeidx, index, repeatindex, splitidx. Added improved automation for lwarpmk generation of indexing and glossaries. Added PDF-inclusion packages attachfile, attachfile2, intopdf, pdfpages, pdfx. Added package cases. Tested to work as-is with hvindex, notes2bib.


Adds support for equation footnotes with MathJax. Adds lateximage alt tag localization. Fixes for lateximages, \href, \subref, \rule, \boxframe, marginnote, ellipsis, breakurl. Adds support for float and rotfloat styles ruled and boxed. Adds packages algorithm2e, register, ltablex, xltabular, xellipsis, trimclip, errata, vowel, xpiano. Verified to work as-is with packages gauss, phonrule, piano, SIunits, tikzcodeblocks.


Added lwarpmk pdftosvg to convert user images to SVG. Added support for -shell-escape. Added support for array w and W columns, double \hlines and rules, arydshln dashed rules. Improved \multicolumn parameter handling. Fixed \thinspace, paralist compact environments. Added parnotes, quoting, lua-check-hyphen, tocenter, underscore. Verified works as-is with babelbib, bibunits, bodegraph, fast-diagram, nicematrix, structmech.


Fixes for file links, EPUB conversion, float optional argument regression, \phantomsection, overfull boxes in lateximages, QED symbol in a lateximage, \centering etc. with koma-script. Adds clrdblpg.


Improved lwarpmk error checking and messages. Added documentation regarding bibtex, polyglossia, macros in section names. Added options for xindy and pdftolatex. Figures and tables now honor \centering, etc. Fixes for tikz, ragged2e, hyperref, glossaries, textcomp, latex verse environment. Minor update for memoir. Added inputencx, bibunits, chngpage, forest, magaz, gridset. Prevents packages ae, aecc, t1enc, wasysym.


Added a warning about corrupted images due to the need to recompile the document one more time. Added the lwarpmk cleanlimages command.


Fixes for memory overflow while generating numerous images, equation* with split, tabbing inside a lateximage, MathJax script. Adds SVG math scaling, global MathJax custom functions. Fixes for footnote numbering, paragraph tags, \kill in a lateximage, problems when not UTF8 encoding, \texorpdfstring in a section name. Adds verbatim footnotes with fancybox, fancyvrb. Fixes for special characters with hyperref, url. Updates for new versions of graphicx, endfloat.


Improved SVG math, Mathjax, tikz, fancybox, and titling. Various additional fixes. Added mhchem, chemfig, chemformula, chemmacros, chemnum, chemgreek, epstopdf-base, grid, ltxgrid.


SVG math now is converted using multiple CPU processors/cores. Inline SVG math images are hashed and reused when identical. Improved SVG display math, siunitx units, verbatim and listings alignment. Additional fixes for SVG math, authblk, ntheorem. Added xy, epstopdf, diagbox, pbox, bytefield, axodraw2, phfqit, schemata, dblfloatfix, nonfloat, morefloats.


Added xcolor \rowcolors. Added vwcol, vertbars, hyphenat, lineno, fnlineno, figsize, hypdestopt, pagegrid, pdfrender, luacolor, resizegather. Several bug fixes.


Updated compatibility for cleveref v0.21. Improved SVG math, siunitx. Numerous minor fixes. Added colortbl, chapterbib, acro, acronym, hypernat, hypcap, stfloats, vmargin, fancyheadings, fancyref.


Improves SVG math baseline and sizing. Fixes for SVG math in captions, subcaptions, and \nameref. Adds packages endheads, multitoc, sectionbreak, blowup, xurl.


Fix for spaces in \usepackage. Additional improvements in SVG math. Allows MathJax inside verse.


Adds memoir. Adds cite, natbib, backref. Also works as-is with biblatex. Fixes bibliography italic names. Adds subfigure, prettyref, hanging, midpage, flafter, fltrace, changebar, endfloat, continue, fwlw, turnthepage, footnpag, pagesel, textfit, titleref. Fixes for underscores in labels, empty lines between tabular rows, SVG math in minipages and lists and subfig.


Added Koma-script classes and packages. Completed todonotes and luatodonotes. Added todo, easy-todo, fixmetodonotes, fixme, soulutf8, soulpos, cancel, section, fancyref, iffoddpage, preview, atbegshi, watermark, hang, ltxtable. Improved algorithmicx, tocloft, HTML title and author options. Added list and trivlist environments. Fix for \multicolumn alignment for word processor conversion. Fix for MathJax when combined with images.


Added FootnoteDepth for printing pending footnotes. Fixed for tabular column specifications, \multicolumn specifications, \bottomrule. Fixed for math equation*, SVG math in a section name, references in SVG math. Made several macros robust for hyperref. Added todonotes and luatodonotes (but only disabled for now), and breakurl.


Greatly-improved copy/paste into the LibreOffice word processor. Fix for text copy/paste of AMS Math environment numbers and names. Improved \ensuremath. Adding tabbing environment, overpic package. Improved textcomp and realscripts.


Added tabular vertical rules, booktabs margin and trim.


Improved \graphicspath, grffile. Improved and textcomp symbols. Fixes for bigdelim with improved HTML output, additional objects inside a lateximage, xltxtra with , tocbibind, \multicolumnrow with older versions of xparse and multirow, \underline. Added support for adjmulticol, cuted, midfloat, pfnote, fnpos, dblfnote, stabular, tabls, sectsty, anonchap, quotchap.

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.78 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.

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, polyglossia. cjkpunct, xeCJK.


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, ltxgrid, nccfancyhdr, notespages, nowidow, pagegrid, pagesel, pdfcrypt, pdfprivacy, preview, ragged2e, rmpage, scrlayer-scrpage, scrpage2, setspace, 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.

Table of contents, figures, tables:

Supported, with hyperlinks. minitoc, multitoc, shorttoc, titletoc, tocbasic, tocbibind, tocdata, tocloft, tocstyle.

Title page:

\maketitle, titlepage, authblk, titling.

Front & back matter:

abstract, appendix.


makeindex and xindy are supported, with hyperlinks.

hvindex, idxlayout, imakeidx, index, makeidx, repeatindex, splitidx.


gloss, glossaries and xindy, nomencl.


babelbib, backref, biblatex, bibunits, chapterbib, cite, hypernat, natbib, notes2bib, showtags.


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

Margin notes:

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


Adds FootnoteDepth to print footnotes at section breaks. bigfoot, dblfnote, endheads, endnotes, fixfoot, fnbreak, fnpara, fnpos, footmisc, footnote, footnotebackref, footnoterange, footnpag, manyfoot, marginnote, nccfoots, pagenote, parnotes, pfnote, sepfootnotes, sidenotes, tablefootnote.


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


Native theorems, amsthm, ntheorem, theorem.

Additional math:

Math fonts via SVG images, amscd, autonum, backnaur, bm, braket, breqn, cases, delarray, guass, jkmath, mathspec, mathtools, nicematrix, pb-diagram, resizegather, unicode-math, xfakebold, xy. Many others work as-is.

Display math with \displaymathother:

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

Units and fractions:

nicefrac, SIunits, siunitx, units, unitsdef, xfrac.


Appear where declared. capt-of, caption, cutwin, dblfloatfix, endfloat, fix2col, flafter, float, floatflt, floatrow, fltrace, ftcap, hypcap, keyfloat, morefloats, multicap, newfloat, nonfloat, placeins, rotfloat, stfloats, subcaption, subfig, subfigure, subfloat, topcapt, trivfloat, wrapfig.


tabular environment, array, arydshln, bigdelim, booktabs, colortbl, ctable, diagbox, longtable, ltablex, ltxtable, multirow, supertabular, tabularx, tabulary, threeparttable, threeparttablex, 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. picture, tikz, and xy are converted to an SVG image.

asymptote, curves, datatool, eepic, epsfig, epstopdf, figsize, fitbox, grffile, media9, movie15, multimedia, overpic, psfrag, psfragx, pst-eps, pstool, pstricks, rviewport, tikz-3dplot.


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 HTML-imposed limitations. Nested minipages are supported. eqparbox, minibox, pbox, shapepar.


copyrightbox, csquotes, epigraph, quoting, verse.


fancyvrb, moreverb, shortvrb, verbatim.


boxedminipage2e, fancybox, framed, mdframed, niceframe, shadow, 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. cancel, ellipsis, embrac, enparen, hyphenat, lettrine, lips, lua-check-hyphen, luacolor, magaz, pdfrender, realscripts, relsize, scalefnt, 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.


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


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

Science and engineering:

algorithm2e, algorithmicx, ar, askmaps, axodraw2, bitpattern, blochsphere, bodegraph, bohr, bytefield, chemfig, chemformula, chemgreek, chemmacros, chemnum, circuitikz, elements, engtlc, fast-diagram, hepnicenames, heppennames, karnaughmap, karnaugh-map, listings, linop, mhchem, pgfgantt, phfqit, physics, qcircuit, register, simpler-wick, slashed, structmech, struktex. tikz-karnaugh, tikzcodeblocks

Arts and humanities:

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




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


accsupp, axessibility.


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.