Title: macros
Last modified: January 10, 2018

---

# macros

 *  [peeterjoot](https://wordpress.org/support/users/peeterjoot/)
 * (@peeterjoot)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/macros/)
 * In the [katex documentation](https://github.com/Khan/KaTeX#rendering-options),
   there’s a macro option detailed. Example:
 * katex.render(“c = \\pm\\sqrt{a^2 + b^2}\\in\\RR”, element, {
    displayMode: true,
   macros: { “\\RR”: “\\mathbb{R}” } });
 * Is is possible to set a default set of macros in WP-Katex, either for the page
   in question, or for all pages?
 * With the Mathjax-Latex plugin this is possible using something like:
 *  Macros: {
    ifrac: [‘{#1}/{#2}’, 2], Real: [‘{\\textrm{Re}}’, 0], lr: [‘{\\left(#
   1\\right)}’, 1], biglr: [‘{\\Bigl(#1\\Bigr)}’, 1], Biglr: [‘{\\Biggl(#1\\Biggr)}’,
   1], setlr: [‘{\\left\\{#1\\right\\}}’, 1], evalbar: [‘{{\\left.{#1}\\right\\vert}_{#
   2}}’, 2], evalrange: [‘{{\\left.{#1}\\right\\vert}_{#2}^{#3}}’, 3], evalnobar:[‘{{#
   1}_{#2}}’, 2], Ba: [‘{\\mathbf{a}}’, 0], … },
 * (where the macros are placed in the MathJax/config/mathjax.js configuration file)
    -  This topic was modified 8 years, 4 months ago by [peeterjoot](https://wordpress.org/support/users/peeterjoot/).

The topic ‘macros’ is closed to new replies.

 * ![](https://ps.w.org/wp-katex/assets/icon-256x256.png?rev=1010018)
 * [WP-KaTeX](https://wordpress.org/plugins/wp-katex/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-katex/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-katex/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-katex/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-katex/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-katex/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [peeterjoot](https://wordpress.org/support/users/peeterjoot/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/macros/)
 * Status: not resolved