LaTeX.js Versions Save

JavaScript LaTeX to HTML5 translator

v0.12.6

1 year ago

The main fixes are the missing directories when using webpack and a crash when using LaTeX.js in/with React.

  • fixed #120, #121, #132, #139
  • updated puppeteer, added firefox screenshotting
  • updated some dependencies

v0.12.4

3 years ago

I had to fix it again. Verdict: ES6 modules and automatic detection of node/browser environment doesn't work.

So now LaTeX.js (HtmlGenerator to be exact) simply assumes a DOM implementation, HtmlGenerator doesn't load svgdom itself anymore. Without support for top-level await in browsers, terser, and node, this just cannot be done properly in ES6.

Other changes:

  • include LaTeXJSComponent in the main exports, don't create an extra bundle anymore
  • include SyntaxError in the main exports
  • to make sure that HtmlGenerator doesn't require a DOM implementation already on import anymore, it cannot create a cache of html elements directly; now create() takes a string or a factory function for element creation

v0.12.2

3 years ago

This release fully supports ES6 modules. LaTeX.js itself has not changed, but the build system and the docs have improved a lot.

exports:

  • no default export anymore, export: he, parse, Generator, HtmlGenerator

build:

  • simplified rollup config and build
  • added visualizer
  • generate correct source maps
  • get rid of all eval calls
  • use dynamic imports for external packages and documentclasses

unit tests:

  • update to puppeteer 3.3, now we can start to support Firefox screenshots
  • added a script to create a native LaTeX rendering for the test cases
  • updated mocha
  • support and fix code coverage

docs:

  • moved to VuePress
  • use a git worktree in the website folder to generate the docs and playground in the gh-pages branch

v0.12.1

4 years ago
  • build improvements
  • unit testing fixes (write screenshots and diffs synchronously)
  • allow starred environments (#64)
  • fixed bezier curves and implemented the optional argument of bezier curves
  • fixed \line, \vector, \oval to not shift in some corner cases
  • better and more beautiful arrowhead like in pict2e
  • made \put work with negative y-values

v0.12.0

4 years ago

parser:

  • fixed url chars according to RFC3986
  • implemented key-value lists
  • implemented csv groups
  • use _ instead of skip_space to make to code more readable

core:

  • documentclasses: implemented inheritance of options
  • implemented standard documentclass options, allow any font size option (e.g. 26pt)
  • implemented \usepackage, added first packages
  • refactor: added Generator class with TeX logic so that HtmlGenerator only needs to worry about the DOM
  • refactor: macros.ls -> latex.ltx.ls
  • import symbols from packages and custom macros
  • introduced Length and Vector classes
  • fixed \oval{} and \circle*
  • update to KaTeX 0.10.0, SVG.js 3.0

HtmlGenerator:

  • added precision option, default is 3 digits

new packages:

  • hyperref
  • echo
  • multicol
  • latexsym
  • textgreek
  • stix
  • gensymb
  • textcomp

CSS:

  • fixed layout bug: do not make html and body a grid! Otherwise we'll have nested grids.
  • set font properties at the root (<html>)
  • set CSS variables on the root element (also for webcomponent), this is important for the root font size
  • webcomponent: @font-face doesn't work inside a shadow DOM, so add cmu.css to parent document

tests

  • fixed fixure loading (#21)
  • refactored screenshot code
  • don't instrument screenshot tests for code coverage
  • refactor loading fixtures from subdirectories to allow grouping them by package, for instance

build

  • swiched to rollup, get rid of babel, uglify-js
  • parallelize build
  • output ES modules and UMD packages

playground:

  • use split-grid and CSS grid for layout

v0.11.0

5 years ago

API:

  • new HtmlGenerator API: it is now possible to get parts of the resulting HTML document
  • added an implementation of a LaTeX.js webcomponent (using tags)
  • CSS: use grid instead of flex, now the page looks correct even without margin content

CLI:

  • added -u (base URL) option
  • fixed reading of custom macros (-m)

build system:

  • integrate with CircleCI, Greenkeeper
  • update unit tests
  • create source maps
  • show code coverage

v0.10.1

5 years ago
  • html-generator.ls now checks if window is defined, not test.ls anymore
  • added index.js as the new main entry point
  • made bin/latex.js executable

v0.10.0

5 years ago

general:

  • implemented \marginpar
  • finished \parbox alignment combinations, all should work now
  • fixed a few more whitespace issues, esp. in restricted horizontal mode; still some more left to go...

layout:

  • layout can now be changed using \setlength
  • implement default layout values for 10pt, onecolumn, oneside options
  • margins and \textwidth: calculate their percentages relative to \paperwidth
  • layout is still responsive; to make it static, use an absolute --paperwidth in the CSS

picture environment:

  • implemented \qbezier and \cbezier
  • implemented \oval
  • implemented \multiput
  • \line, \vector, \[qc]bezier: add room for linewidth using bbox()
  • fixed \vector arrow head: it now ends exactly at the line end and properly scales with the linewidth
  • fixed \put outside of a picture environment
  • fixed picture offset

other fixes:

  • HTML: set the charset to UTF-8
  • API: optional arguments always have "?" appended => "o" is now "o?"
  • little parser fixes
  • more tests, extended the playground

v0.9.2

6 years ago

This release is another mostly bugfix release:

  • CLI: add -a option to copy assets (CSS, fonts) to the destination
  • better parser error messages when parsing the preamble
  • distinguish between inline- and block-environments (block envs force vertical mode, i.e. start a new paragraph)
  • implemented continuing after a block-environment properly (LaTeX's \@endparenv)
  • use (modified) svgdom instead of domino: CLI and tests can now render SVG!

misc:

  • updated KaTeX
  • added picture tests and screenshots

v0.9.1

6 years ago

This release now also includes the CSS files and the CM fonts.

Bugfixes:

  • fix centering of lists, be more like LaTeX and use \llap for the label
  • fix alignment of lists
  • fix wrong font in \verb
  • fix list and verse margins, use em instead of rem