# Using Macros in MiniLatex

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

\$\$
\newcommand{\bra}{\lbracket}
\newcommand{\ket|{\rbracket}
\$\$

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.