Browse Source

Add repeatchords option to the crepbook document class

The repeatchords option enables chords printing in repeated chords
section. The new repeatedchords environment is used by song authors
to declare that chords enclosed in the environment are only the
repeated version of the chords given earlier. This environment allows
users who prefer to repeat chords on every verse and chorus to write
them down, and in conjunction with the repeatchords option to have
songbooks that displays the repeated chords.
remotes/bexa/master
Alexandre Dupas 13 years ago
parent
commit
7dbc4336e2
  1. 24
      tex/crepbook.cls

24
tex/crepbook.cls

@ -12,12 +12,14 @@
\newif{\ifnodiagram}
\newif{\ifimportantdiagramonly}
\newif{\ifpictures}
\newif{\ifnorepeatchords}
\tabsfalse
\lilypondfalse
\nodiagramtrue
\picturesfalse
\importantdiagramonlyfalse
\norepeatchordstrue
% Options
\DeclareOption{tabs}{\tabstrue}
@ -29,6 +31,8 @@
\DeclareOption{importantdiagramonly}{\importantdiagramonlytrue\nodiagramfalse}
\DeclareOption{pictures}{\picturestrue}
\DeclareOption{nopictures}{\picturesfalse}
\DeclareOption{norepeatchords}{\norepeatchordstrue}
\DeclareOption{repeatchords}{\norepeatchordsfalse}
\DeclareOption{10pt}{\PassOptionsToClass{\CurrentOption}{article}}
\DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{article}}
@ -434,4 +438,24 @@
\end{verse*}
}
%% \SB@chordsoff with a greater for the line spacing
\newcommand{\CB@chordshidden}{%
\def\SB@bracket##1]{\ignorespaces}%
\let\SB@rechord\relax%
\let\SB@ch\SB@ch@off%
\ifSB@measurespec%
\ifmeasures\SB@measureson\else\SB@measuresoff\fi%
\else%
\SB@measuresoff%
\fi%
\ifSB@preamble\let\colbotglue{\z@\@plus.5\textheight}\fi%
\SB@setbaselineskip%
}
\newenvironment{repeatedchords}{%
\ifnorepeatchords%
\CB@chordshidden%
\fi
}{}%
\makeatother

Loading…
Cancel
Save