Browse Source

Add new macro: transposition

This macro depends on the repeatedchord environment:
 - if chords are repeated, acts like the \transpose macro from LaTeX package
 - if not, a muscinote information box is displayed with the number of half-steps for transposition

This macro can prove usefull to hide the complexity of songs that transpose their verses (e.g: Barbara - L'aigle noir): in repeatedchords mode, the chords are explicitly displayed (in their transposed form), in norepeatedchords mode, it only provides the information that the verses should be transposed.
remotes/karagrat/master
Romain Goffe 13 years ago
parent
commit
376431f02a
  1. 15
      tex/crepbook.cls

15
tex/crepbook.cls

@ -70,6 +70,7 @@
\RequirePackage{tikz}
\RequirePackage{licence}
\RequirePackage{xstring}
\RequirePackage{ifthen}
\iflyric%
\tabsfalse%
@ -522,4 +523,18 @@
\fi%
}
\fi
\def\removefirstch@r#1{}
\newcommand{\transposition}[1]{%
\ifnorepeatchords%
\musicnote{%
\IfStrEq{\@lang}{english}{transposition:~}{}%
\IfStrEq{\@lang}{french}{transposition~:~}{}%
\ifthenelse{#1>0}{#1$\Uparrow$}{\removefirstch@r#1$\Downarrow$}%
}%
\else%
\transpose{#1}
\fi%
}%
\makeatother

Loading…
Cancel
Save