Confluence Math Formula Macro

As we are dealing quite a lot with mathematics in our current development and using Atlassian’s Confluence as our documentation system, we were looking for a elegant way to document our mathematics in any better way than E=mc^2.

We found the Math Formula macro originally written and tested against Confluence version 3.5, not playing well with the latest Confluence version, we are using.

After following the installation steps there it was, the incompatibility note:

“There are user macros without any metadata configured in their template. They have been highlighted below. For these macros to be available for use in content they require parameter information. See the Guide to User Macro Templates.”

Check out the highlighted macros, and click Edit.

Installed User Macros

In the Template field add the following as the very first line of the template:

## @param size:title=Font Size|type=int|default=150|desc=Font size for formulas in percentage

Within the template, the the font size is referred as $paramsize, however, in the metadata description you denote the param just as size.

Once these changes are made, you can use the macro to create your formulas…

Math Formular Macro

 

3 Comments

  1. Michael

    Reply

    Did you have to do anything else to get this to work? The jsMath test page is working but the output of the macro is just garbage.

    For “Macro Body Processing” I’ve got it set to “Rendered”… I tried the other options and they don’t seem to make a difference.

    • Reply

      Make sure jsMath does work proper on your machine without Confluence at all. Within the jsMath folder there is a folder called “test”, check out the pages there, in case something does not work properly, they provide help to get jsMath set up. I was able to solve crap output following the steps provided by the test pages (e.g. installing the image fonts and so on).

Leave Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.