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

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.87 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, perltex, pythontex, make, etc.

Classes:

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

Koma-script:

scrextend, scrhack, scrlayer. Others as listed below.

Memoir:

memhfixc

Languages:

babel, polyglossia. cjkpunct, xeCJK.

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, 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, parallel, parcolumns, pdfcolparallel, pdfcolparcolumns, pdfcrypt, pdfprivacy, preview, ragged2e, returntogrid, rmpage, scrlayer-scrpage, scrpage2, setspace, 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, 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, titling.

Front & back matter:

abstract, appendix.

Indexing:

makeindex and xindy are supported, with hyperlinks.

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

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.

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, fixfoot, fnbreak, fnpara, 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, ntheorem, theorem.

Additional math:

Math fonts via SVG images, amscd, autobreakMJ, autonum, backnaur, bmMJ, braketMJ, breqn, cases, centernotMJ, colonequalsMJ, decimalMJ, delarray, DotArrowMJ, dotlessiMJ, dotlessjMJ, extarrowsMJ, fouridxMJ, guass, icommaMJ, jkmath, leftidxMJ, mathcompMJ, mathdotsMJ, mathfixsMJ, mathpunctspaceMJ, mathspec, mathtoolsMJ, mismathMJ, multiobjectiveMJ, nccmathMJ, nicematrix, noitcrulMJ, pb-diagram, resizegather, rmathbrMJ, stackrelMJ, statex2MJ, statmathMJ, subsupscriptsMJ, textualicommaMJ, unicode-mathMJ, 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, placeins, rotfloat, stfloats, subcaption, subfig, subfigure, subfloat, topcapt, trivfloat, wrapfig.

Tabular:

tabular environment, arrayMJ, arydshlnMJ, bigdelimMJ, bigstrutMJ, booktabsMJ, colortbl, ctable, 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. picture, tikz, and xy are converted to an SVG image.

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

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.

minipage, \parbox:

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

Quotations:

copyrightbox, csquotes, epigraph, quoting, verse.

Verbatim:

fancyvrb, moreverb, shortvrb, verbatim.

Frames:

boxedminipage, boxedminipage2e, fancybox, framed, mdframed, niceframe, shadow, 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, nolbreaks, normalcolor, pdfcol, pdfcolmk, pdfrender, realscripts, relsizeMJ, scalefnt, 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.

Symbols:

Native diacriticals, academicons, amssymbMJ, bbding, chemgreek, dingbat, euro, eurosym, fontawesome, fontawesome5, gensymbMJ, latexsymMJ, marvosym, mathcompMJ, metalogo, metalogox, pifont, textalpha, textcomp, 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, karnaughmap, karnaugh-map, listings, linop, mhchemMJ, pgfgantt, phfqit, physicsMJ, physunitsMJ, qcircuit, register, simpler-wick, slashedMJ, steinmetzMJ, structmech, struktex. tikz-karnaugh, tikzcodeblocks

Arts and humanities:

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

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

Package handling:

catoptions.

Debug:

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.