Browse Source

Add importantdiagramonly option to the crepbook document class

The importonlydiagramonly option allows to print only chord diagrams
that have been flagged as important by the author of the song. The
important chords are generally complicated uncommon chords and their
diagram is registered with the starred version of the gtab macro.
remotes/bexa/master
Alexandre Dupas 13 years ago
parent
commit
167817cf4f
  1. 22
      tex/crepbook.cls

22
tex/crepbook.cls

@ -10,12 +10,14 @@
\newif{\iftabs}
\newif{\iflilypond}
\newif{\ifnodiagram}
\newif{\ifimportantdiagramonly}
\newif{\ifpictures}
\tabsfalse
\lilypondfalse
\nodiagramtrue
\picturesfalse
\importantdiagramonlyfalse
% Options
\DeclareOption{tabs}{\tabstrue}
@ -24,6 +26,7 @@
\DeclareOption{nolilypond}{\lilypondfalse}
\DeclareOption{nodiagram}{\nodiagramtrue}
\DeclareOption{diagram}{\nodiagramfalse}
\DeclareOption{importantdiagramonly}{\importantdiagramonlytrue\nodiagramfalse}
\DeclareOption{pictures}{\picturestrue}
\DeclareOption{nopictures}{\picturesfalse}
@ -217,8 +220,25 @@
\fi%
}%
\let\gtab@Original\gtab
\newcommand{\gtab@Hidden}[2]{}%
\ifnodiagram%
\renewcommand{\gtab}[2]{}%
\renewcommand{\gtab}{\@ifstar
\gtab@Hidden%
\gtab@Hidden%
}
\else%
\ifimportantdiagramonly%
\renewcommand{\gtab}{\@ifstar
\gtab@Original%
\gtab@Hidden%
}
\else%
\renewcommand{\gtab}{\@ifstar
\gtab@Original%
\gtab@Original%
}
\fi%
\fi%
\newcommand{\lilypond}[1]{%

Loading…
Cancel
Save