((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

v0.902:

Added beamerarticle. Improved parnotes, sympytex. Updated luatexko, xetexko, tagpdf. Improved footnotes and paragraph tags. Added \oe, etc. for MathJax.

v0.901:

Improved tabular columns, \newcolumntype. Improved float caption CSS. Added new MathJax 3.2 packages.

v0.900:

Updates for amsmath, changes, froufrou, lipsum.

v0.899:

Minor improvements for graphics, keyfloat, multicol.

v0.898:

Produces fewer underfull \hbox warnings. Improves wrapfig and keyfloat.

v0.897:

Added rollback for siunitx v2. Improved fixme, float. Added centerlastline, decorule, fancypar, froufrou, pbalance. Verified works as-is with fnpct.

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, tikz-imagelabels, xevlna. Verified to work as-is: 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 as-is for apxproof, syntaxdi, venndiagram.

v0.892:

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.

v0.891:

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.

v0.89:

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.

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 as-is 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 as-is 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 non-Latin 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 as-is 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 as-is 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 unicode-math. 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, 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.

v0.78:

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

v0.77:

Updated booktabs, chemformula.

v0.76:

Updated MathJax, xr, xr-hyper, acro. Verified to work as-is 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 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

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

The lwarp v0.902 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:

name:

Supported as-is.

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 source-level compatibility.

MJ:

Supported as-is 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.

Table 1:  lwarp package — Supported features

Category

Status and supported features.

Engines:

dvi, pdf, , Lua, up

compiling:

latexmk, make, etc.

External compiling:

perltex, pythontex, sympytex

Classes:

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

Koma-script:

scrextend, scrhack, scrlayer. Others as listed below.

Memoir:

memhfixc

Beamer:

beamerarticle, but not the beamer class.

Languages:

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

Chinese:

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

Japanese:

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.

Korean:

kotex, luatexko, xetexko.

Page layout:

2in1, 2up, a4, a4wide, a5comb, addlines, anysize, atbegshi, balance, blowup, booklet, bophook, bounddvi, bxpapersize, canoniclayout, centerlastline, 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, pbalance, 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.

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, decorule, fncychap, froufrou, 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.

Cross-references:

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.

Footnotes:

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, fnpct, fnpos, footmisc, footnote, footnotebackref, footnoterange, footnpag, manyfoot, marginnoteMJ, nccfootsMJ, pagenoteMJ, parnotesMJ, pdfcolfoot, pfnote, sepfootnotes, sidenotesMJ, tablefootnote.

Math:

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.

Theorems:

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.

Floats:

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:

tabular environment, arrayMJ, arydshlnMJ, bigdelimMJ, bigstrutMJ, booktabsMJ, colortblMJ, ctable, dcolumn, diagbox, hhlineMJ, longtable, ltablex, ltxtable, multirowMJ, 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, pst-eps, pstool, pstricks, rlepsf, rviewport, svg, svg-extract, tikz, tikz-3dplot, tikz-imagelabels, xy

xcolor:

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

Lists:

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

Environments:

Standard environments.

Paragraphs, minipage, \parbox:

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

Quotations:

copyrightbox, csquotes, epigraph, quoting, verse.

Verbatim:

fancyvrb, fvextra, moreverb, shortvrb, verbatim.

Frames:

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

Multi-columns:

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

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

Horizontal space:

HTML output for thin-unbreakable, 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 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.

Symbols:

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

Files:

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

Academic:

academicons, classicthesis, doi, doipubmed, orcidlinkMJ, termcal

Admonitions:

awesomebox, notes.

Editorial:

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

Accessibility:

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

Package handling:

catoptions.

Debug:

chkfloat, cmdtrack, dprogress, lipsum, lua-visual-debug, mwe, 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.