Document an algorithm

Scenario

Create an algorithm using LaTeX Math features.

Steps

The following steps demonstrate how to create a math algorithm using the LaTeX Math Block macro and LaTeX Math Block Reference macro features:

 

Step 1

Create an equation

  1. Navigate to the project page and click edit.

  2. Go to the content where you need to insert the formula.

  3. Type ‘/' and search for the LaTeX Math Block macro or use the '+’ option in the main toolbar and search for the LaTeX Math Block macro.

  4. Select the LaTeX Math Block macro.

  5. Type the equation in LaTeX formatted math. A preview is generated.

  6. Specify an anchor. By specifying the anchor you can refer equation on a different page or the same page.

  7. Click Insert.

Specify the right names for each of the anchor that is created across the page so that you can reference them on a different page or the same page.

 


 

Step 2

Follow step one. Create algorithm formulas in as many steps as you want.

 


Step 3

Link the equation

Add the LaTeX Math Block Reference macros to refer to the formula on the different page(s):

  1. Navigate to where you want to refer to the formula.

  2. Type ‘/' and search for the LaTeX Math Block Reference macro or use the '+’ option in the editor’s main toolbar and search for the LaTeX Math Block Reference macro.

  3. Select the LaTeX Math Block Reference macro.

  4. Specify the anchor of the equation that you mentioned earlier in step one.
    NOTE You must remember the anchor of the equation. Make sure you mention the relevant anchor name so you can refer to them whenever required.

  5. Select the Confluence page. In this example, we refer to the formula from the same page, hence we leave the parameter blank.

  6. The reference link is automatically created.

 


 

Step 4

Follow step three. Link the formulas in as many locations as you want.