Forester 4.2 › HTML figures and captions; embedded TeX [00WN]

This release adds \figure and \figcaption primitives that are interpreted by the XSLT stylesheet as HTML’s <figure> and <figcaption> elements.

The stylesheet no longer emits the images corresponding to embedded \LaTeX inside a <center> tag, as this is deprecated in HTML. Users are encouraged to wrap Forester’s \tex primitive in a macro that embeds a diagram in a figure. For example, the following code comes from my own macro preamble:

% Allocate a fluid binding to hold the default LaTeX preamble,
% e.g. for loading tikz packages.
\alloc\base/tex-preamble

\def\texfig[~body]{
 \scope{
  % Install a LaTeX preamble to be used by default if none is set.
  \put?\base/tex-preamble{
   % Some useful things from my own library.
   \latex-preamble/string-diagrams
   \latex-preamble/diagrams
  }

  % Wrap the diagram in a figure
  \figure{
   % Render the LaTeX code with the current preamble
   \tex{\get\base/tex-preamble}{\body{}}
  }
 }
}