# gregowiki

### Site Tools

using_macros_in_your_gabc

# Differences

This shows you the differences between two versions of the page.

 using_macros_in_your_gabc [2015/03/20 12:03]bgm [Example 2: Make it Green] using_macros_in_your_gabc [2015/03/20 12:05] (current)bgm [Using Macros in gabc] Both sides previous revision Previous revision 2015/03/20 12:05 bgm [Using Macros in gabc] 2015/03/20 12:03 bgm [Example 2: Make it Green] 2015/03/20 12:00 bgm [Example 2: Make it Green] 2015/03/20 11:59 bgm 2015/03/20 11:57 bgm added example and directions for macros2015/03/20 11:27 bgm created 2015/03/20 12:05 bgm [Using Macros in gabc] 2015/03/20 12:03 bgm [Example 2: Make it Green] 2015/03/20 12:00 bgm [Example 2: Make it Green] 2015/03/20 11:59 bgm 2015/03/20 11:57 bgm added example and directions for macros2015/03/20 11:27 bgm created Line 11: Line 11: * You need to know what tex code you want!  (look [[tweaking_your_chant_output|here]] and [[tex_cheat_sheet|here]]) * You need to know what tex code you want!  (look [[tweaking_your_chant_output|here]] and [[tex_cheat_sheet|here]]) * Sometimes you may need more than one macro so you can enable and disable the tex coding (as in our example below) * Sometimes you may need more than one macro so you can enable and disable the tex coding (as in our example below) - * You can have up to 10 macros in a gabc score. + * You can have up to 9 macros in a gabc score. * You define a macro like this:​``def-m1:​\yourmacro`` * You define a macro like this:​``def-m1:​\yourmacro`` - * You have to define them in the gabc header with: ``def-m0``, ``def-m1``, ``def-m2``, etc. + * You have to define them in the gabc header with: ``def-m1``, ``def-m2``, ``def-m3``, etc. - * Macros can only be numbered from 0 to 9 (In other words, you can't use ``def-m10``). + * Macros can only be numbered from 1 to 9 (In other words, you can't use ``def-m10``). * To use a macro in a particular place, you put it **inside** the parenthesis of the chant notes. * To use a macro in a particular place, you put it **inside** the parenthesis of the chant notes. * Also, the coding engine knows it is a macro only because you put it **inside** double-brackets. ​ That means that you call your macro like this:  ``[em1]``. ​ And notice the ``e`` there - that stands for **execute**,​ as in **execute m1** * Also, the coding engine knows it is a macro only because you put it **inside** double-brackets. ​ That means that you call your macro like this:  ``[em1]``. ​ And notice the ``e`` there - that stands for **execute**,​ as in **execute m1**