Using Macros in MiniLatex

User defined macros in math mode are totally legit in MiniLatex.  One way to insert them is like this:


That is, enclose the definitions in double dollar signs.  Do this in the body of the text. You can now use these macros in the usual way, e.g. $\bra a | b \ket$.

If you are using www.knode.io , there is another way.  Make a plain text document titled, say “TeX Macros.”  The actual title is irrelevant. Put the macro definitions in this document. Take not of the document ID number (it is displayed in the footer).  Let’s suppose that the ID is 453.  Then, in the keywords field of the document that is to use the macros, put the text “texmacros:453”, as in the figure below.  That’s all there is to it!

You can try this out using the Demo App.

Bibliographies

Today I posted changes to MiniLatex that allow users to create bibliographies in the customary way using \cite in the body of the document and \bibitem for entries in the bibliography.  Whenever the user presses the full-render button, the citations are resolved in the text as live links in the HTML rendered on-screen.  Since the syntax used is standard LaTeX, running an exported document through pdflatex also resolves the bibliography.

Here is a full example:

\begin{tableofcontents}

\bibitem[A64]{abraham64} Abraham, Hank. Lives of Famous Hackers.
Caveman Press 1964, pp 1001.

\bibitem[U79]{dave} Ungar, Dave.  Principles of Fermentation,
Better Bread Publishing, 1979, pp. 32.

\end{tableofcontents}

In the body of the article, one would refer to the Ungar article as

as noted in \cite{dave}, fermentation causes ...

When rendered, the bibliography would look like the below:

[A64] Abraham, Hank. Lives of Famous Hackers.
Caveman Press 1964, pp 1001.

[U79] Ungar, Dave. Principles of Fermentation,
Better Bread Publishing, 1979, pp. 32.

The citation would be an active link as in the text “as noted in [U79], fermentation …”

Please see the MiniLatex Demo App for an example of the bibliography in action.

Building MiniLatex

The goal of the MiniLatex project is to put a defined subset of LaTeX in the browser.  This means being able to “live edit” LaTeX in a web app and to immediately see the result rendered as web page — well, if not immediately, at least very, very quickly!  Another goal is to never, ever have to rewrite text.  Documents written for the web in MiniLatex should be exportable at the click of a button to a file on the author’s computer that can be typeset using pdlatex or some other standard LaTeX tool.

Both of these goals are attainable.  Here is a proof of concept:

MiniLatex Demo

Progress

This blog will report on progress on the development of MiniLatex and provide a forum for comments and discussion. Some articles will be technical, even quite technical, while others are intended for the general reader who may use MiniLatex as a writing tool.  We are still in the research and development phase, so your feedback is both welcome and essential.

Articles

Here are some articles of interest.

And here are examples of documents written in MiniLatex

The examples above were written using the web app www.knode.io. It hosts a MiniLatex rendering engine written in Elm.

On the Horizon

• MiniLatex, as a defined subset of LaTeX, is an entity independent of  whatever engine is used to transform MiniLatex source text into HTML.  At the moment, there is just one engine, implemented in Elm.  I plan to write a Haskell engine at some point.
• Once Elm 0.19 is released, MiniLatex will run much, much faster.
• When MathJax 3.0 is released, it will be integrated into Elm.  This will result in an estimated 10-fold increase in processing speed for the MathJax part of the processing pipeline.

Good company in a journey makes the way seem shorter. — Izaak Walton