mirror of https://github.com/patacrep/patacrep.git
Engine for LaTeX songbooks
http://www.patacrep.com
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
572 lines
13 KiB
572 lines
13 KiB
15 years ago
|
% CREPBOOK DOCUMENT CLASS -- version 0.2.2
|
||
16 years ago
|
% for LaTeX2e
|
||
|
%
|
||
|
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||
13 years ago
|
\ProvidesClass{crepbook}[2012/02/19 v0.5.0 LaTeX document class for Crep
|
||
16 years ago
|
Books]
|
||
|
|
||
13 years ago
|
\makeatletter\def\input@path{{tex/}}
|
||
|
|
||
15 years ago
|
\newif{\iftabs}
|
||
|
\newif{\iflilypond}
|
||
15 years ago
|
\newif{\ifnodiagram}
|
||
13 years ago
|
\newif{\ifimportantdiagramonly}
|
||
14 years ago
|
\newif{\ifpictures}
|
||
13 years ago
|
\newif{\ifnorepeatchords}
|
||
13 years ago
|
\newif{\ifukulele}
|
||
|
\newif{\ifguitar}
|
||
13 years ago
|
\newif{\ifonesongperpage}
|
||
15 years ago
|
|
||
|
\tabsfalse
|
||
|
\lilypondfalse
|
||
15 years ago
|
\nodiagramtrue
|
||
14 years ago
|
\picturesfalse
|
||
13 years ago
|
\importantdiagramonlyfalse
|
||
13 years ago
|
\norepeatchordstrue
|
||
13 years ago
|
\ukulelefalse
|
||
|
\guitarfalse
|
||
13 years ago
|
\onesongperpagefalse
|
||
15 years ago
|
|
||
|
% Options
|
||
|
\DeclareOption{tabs}{\tabstrue}
|
||
15 years ago
|
\DeclareOption{notabs}{\tabsfalse}
|
||
15 years ago
|
\DeclareOption{lilypond}{\lilypondtrue}
|
||
15 years ago
|
\DeclareOption{nolilypond}{\lilypondfalse}
|
||
15 years ago
|
\DeclareOption{nodiagram}{\nodiagramtrue}
|
||
15 years ago
|
\DeclareOption{diagram}{\nodiagramfalse}
|
||
13 years ago
|
\DeclareOption{importantdiagramonly}{\importantdiagramonlytrue\nodiagramfalse}
|
||
14 years ago
|
\DeclareOption{pictures}{\picturestrue}
|
||
|
\DeclareOption{nopictures}{\picturesfalse}
|
||
13 years ago
|
\DeclareOption{norepeatchords}{\norepeatchordstrue}
|
||
|
\DeclareOption{repeatchords}{\norepeatchordsfalse}
|
||
13 years ago
|
\DeclareOption{ukulele}{\ukuleletrue}
|
||
|
\DeclareOption{noukulele}{\ukulelefalse}
|
||
|
\DeclareOption{guitar}{\guitartrue}
|
||
|
\DeclareOption{noguitar}{\guitarfalse}
|
||
13 years ago
|
\DeclareOption{onesongperpage}{\onesongperpagetrue}
|
||
15 years ago
|
|
||
|
\DeclareOption{10pt}{\PassOptionsToClass{\CurrentOption}{article}}
|
||
|
\DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{article}}
|
||
|
\DeclareOption{12pt}{\PassOptionsToClass{\CurrentOption}{article}}
|
||
|
|
||
|
% Default options : pass to the songs package
|
||
|
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{songs}}
|
||
|
\ProcessOptions
|
||
|
|
||
16 years ago
|
% Base class
|
||
12 years ago
|
\LoadClass{article}
|
||
16 years ago
|
|
||
16 years ago
|
% Main packages
|
||
14 years ago
|
\RequirePackage{graphicx,xcolor}
|
||
11 years ago
|
\RequirePackage{epstopdf}
|
||
16 years ago
|
\RequirePackage{songs}
|
||
16 years ago
|
\RequirePackage{fancybox}
|
||
15 years ago
|
\definecolor{tango-green-3}{HTML}{4e9a06}
|
||
|
\definecolor{tango-blue-3}{HTML}{204a87}
|
||
|
\RequirePackage[bookmarks,
|
||
|
bookmarksopen,
|
||
13 years ago
|
hyperfigures=true,
|
||
15 years ago
|
colorlinks=true,
|
||
|
linkcolor=tango-green-3,
|
||
|
urlcolor=tango-blue-3]{hyperref}
|
||
16 years ago
|
\RequirePackage{tikz}
|
||
13 years ago
|
\RequirePackage{xstring}
|
||
13 years ago
|
\RequirePackage{ifthen}
|
||
13 years ago
|
\RequirePackage{framed}
|
||
12 years ago
|
\RequirePackage{currfile}
|
||
16 years ago
|
|
||
15 years ago
|
\iflyric%
|
||
|
\tabsfalse%
|
||
|
\lilypondfalse%
|
||
15 years ago
|
\nodiagramtrue%
|
||
14 years ago
|
\picturesfalse%
|
||
14 years ago
|
\renewcommand{\colbotglue}{0pt plus .5\textheight minus 0pt}%
|
||
15 years ago
|
\fi
|
||
16 years ago
|
|
||
|
% Start
|
||
16 years ago
|
\def\andname{and}
|
||
|
\def\lastandname{\unskip, and}
|
||
|
|
||
|
\newcounter{@inst}
|
||
|
\newcounter{@auth}
|
||
|
\newcounter{auco}
|
||
|
|
||
14 years ago
|
\def\clearheadinfo{
|
||
|
\gdef\@author{No Author Given}%
|
||
|
\gdef\@title{No Title Given}%
|
||
|
\gdef\@subtitle{}
|
||
|
\gdef\@version{}
|
||
|
\gdef\@web{}
|
||
|
\gdef\@mail{}
|
||
|
\gdef\@email{}
|
||
|
\gdef\@picture{}
|
||
|
\gdef\@picturecopyright{}
|
||
|
}
|
||
16 years ago
|
|
||
|
\def\subtitle#1{\gdef\@subtitle{#1}}
|
||
|
\def\version#1{\gdef\@version{#1}}
|
||
15 years ago
|
\def\web#1{\gdef\@web{#1}}
|
||
16 years ago
|
\def\mail#1{\gdef\@mail{#1}}
|
||
16 years ago
|
\def\email#1{\gdef\@email{#1}}
|
||
16 years ago
|
\def\picture#1{\gdef\@picture{#1}}
|
||
|
\def\picturecopyright#1{\gdef\@picturecopyright{#1}}
|
||
|
\def\footer#1{\gdef\@footer{#1}}
|
||
14 years ago
|
\def\lang#1{\gdef\@lang{#1}}
|
||
16 years ago
|
\clearheadinfo
|
||
|
|
||
13 years ago
|
\newcommand{\l@belVersion}{
|
||
|
\IfStrEq{\@lang}{english}{\bf version:}{}
|
||
|
\IfStrEq{\@lang}{french}{\bf version :}{}
|
||
|
}
|
||
|
\newcommand{\l@belDate}{
|
||
|
\IfStrEq{\@lang}{english}{\bf date:}{}
|
||
|
\IfStrEq{\@lang}{french}{\bf date :}{}
|
||
|
}
|
||
|
\newcommand{\l@belAuthor}{
|
||
|
\IfStrEq{\@lang}{english}{\bf authors:}{}
|
||
|
\IfStrEq{\@lang}{french}{\bf auteurs :}{}
|
||
|
}
|
||
|
\newcommand{\l@belWeb}{
|
||
|
\IfStrEq{\@lang}{english}{\bf web:}{}
|
||
|
\IfStrEq{\@lang}{french}{\bf web :}{}
|
||
|
}
|
||
|
\newcommand{\l@belMail}{
|
||
|
\IfStrEq{\@lang}{english}{\bf mail:}{}
|
||
|
\IfStrEq{\@lang}{french}{\bf mail :}{}
|
||
|
}
|
||
|
|
||
16 years ago
|
\renewcommand\maketitle{
|
||
|
\@maketitle
|
||
|
|
||
|
\thispagestyle{empty}
|
||
|
|
||
|
\clearheadinfo}
|
||
|
%
|
||
|
\def\@maketitle{\newpage
|
||
|
\markboth{}{}%
|
||
|
\def\lastand{\ifnum\value{@inst}=2\relax
|
||
|
\unskip{} \andname\
|
||
|
\else
|
||
|
\unskip \lastandname\
|
||
|
\fi}%
|
||
|
\def\and{\stepcounter{@auth}\relax
|
||
|
\ifnum\value{@auth}=\value{@inst}%
|
||
|
\lastand
|
||
|
\else
|
||
|
\unskip,
|
||
|
\fi}%
|
||
|
\begin{center}%
|
||
|
{\rule{\textwidth}{1mm}}
|
||
|
|
||
|
{\Huge \bfseries\boldmath\@title \par}
|
||
|
|
||
|
\if!\@subtitle!\else {\begin{flushright}\large \bfseries\boldmath
|
||
|
\@subtitle \par \end{flushright}}
|
||
|
\fi
|
||
|
|
||
|
{\rule{\textwidth}{1mm}}
|
||
|
|
||
|
\end{center}%
|
||
|
|
||
|
\vspace{1.5cm}
|
||
|
|
||
|
\begin{flushleft}
|
||
|
\begin{tabular}{l l}
|
||
14 years ago
|
\if!\@version!\else{\l@belVersion} & \@version \\ \fi
|
||
|
\if!\@date!\else{\l@belDate} & \@date \\ \fi
|
||
|
\if!\@author!\else{\l@belAuthor} & \@author \\ \fi
|
||
|
\if!\@web!\else{\l@belWeb} & \url{\@web} \\ \fi
|
||
|
\if!\@mail!\else{\l@belMail} & \url{\@mail} \\ \fi
|
||
16 years ago
|
\end{tabular}
|
||
|
\end{flushleft}
|
||
|
|
||
|
\vspace{1.5cm}
|
||
|
|
||
|
\begin{center}
|
||
13 years ago
|
\includegraphics[keepaspectratio=true, width=14cm, height=14cm]{\@picture}
|
||
16 years ago
|
\begin{flushright}
|
||
|
{\flushright \small \@picturecopyright}
|
||
|
\end{flushright}
|
||
|
\end{center}
|
||
|
|
||
|
\@footer
|
||
|
|
||
|
\thispagestyle{empty}
|
||
|
}
|
||
16 years ago
|
|
||
|
\makeatletter
|
||
|
|
||
|
\newlength{\coverheight}
|
||
|
\setlength{\coverheight}{2cm}
|
||
|
\newlength{\coverspace}
|
||
|
\setlength{\coverspace}{0.1cm}
|
||
|
\newcommand{\songcover}{}
|
||
14 years ago
|
\newcommand{\songalbum}{}
|
||
12 years ago
|
\newsongkey{cov}{\let\songcover\@empty}{\def\songcover{\currfiledir#1}}
|
||
12 years ago
|
\newsongkey{vcov}{\let\songcover\@empty}{\def\songcover{#1}}
|
||
14 years ago
|
\newsongkey{album}{\let\songalbum\@empty}{\def\songalbum{#1}}
|
||
13 years ago
|
\newsongkey{url}{\let\songurl\@empty}{\def\songurl{#1}}
|
||
|
\newsongkey{original}{\let\songoriginal\@empty}{\def\songoriginal{#1}}
|
||
16 years ago
|
\newcommand\cover{%
|
||
14 years ago
|
\ifpictures%
|
||
16 years ago
|
\ifx\songcover\@empty\else%
|
||
|
\mbox{%
|
||
15 years ago
|
\includegraphics[width=\coverheight]{\songcover}%
|
||
16 years ago
|
\hspace{\coverspace}%
|
||
|
}%
|
||
|
\fi%
|
||
|
\fi%
|
||
|
}
|
||
|
|
||
13 years ago
|
% display album in song header
|
||
|
\renewcommand{\extendprelude}{
|
||
|
{\bfseries\showauthors}
|
||
|
{\footnotesize\it\songalbum}
|
||
|
\IfStrEq{\songurl}{}{}{
|
||
|
\href{\songurl}{\includegraphics[width=.3cm]{internet}}
|
||
|
}
|
||
|
}
|
||
|
\renewcommand{\extendpostlude}{
|
||
|
{\footnotesize%
|
||
|
\IfStrEq{\songoriginal}{}{}{
|
||
|
\IfStrEq{\@lang}{english}{Original song:}{Chanson originale :}
|
||
|
\songoriginal
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
16 years ago
|
\newlength{\capoheight}
|
||
|
\setlength{\capoheight}{1.5cm}
|
||
|
\renewcommand\capo[1]{%
|
||
15 years ago
|
\ifchorded%
|
||
|
\iftranscapos%
|
||
|
\transpose{#1}%
|
||
|
\else%
|
||
14 years ago
|
\ifpictures
|
||
|
\mbox{%
|
||
|
\includegraphics[height=\capoheight]{capodastre}%
|
||
|
\put(-22,8){\Large #1}
|
||
|
}%
|
||
|
\else
|
||
|
\musicnote{capo: #1}%
|
||
|
\fi
|
||
15 years ago
|
\hspace{\coverspace}%
|
||
|
\fi%
|
||
16 years ago
|
\fi%
|
||
|
}%
|
||
|
|
||
13 years ago
|
\let\utab\gtab
|
||
|
\let\utab@Original\utab
|
||
|
\newcommand{\utab@Hidden}[2]{}%
|
||
|
|
||
13 years ago
|
\let\gtab@Original\gtab
|
||
|
\newcommand{\gtab@Hidden}[2]{}%
|
||
13 years ago
|
|
||
15 years ago
|
\ifnodiagram%
|
||
13 years ago
|
\renewcommand{\gtab}{\@ifstar
|
||
|
\gtab@Hidden%
|
||
|
\gtab@Hidden%
|
||
|
}
|
||
13 years ago
|
\renewcommand{\utab}{\@ifstar
|
||
|
\utab@Hidden%
|
||
|
\utab@Hidden%
|
||
|
}
|
||
13 years ago
|
\else%
|
||
|
\ifimportantdiagramonly%
|
||
|
\renewcommand{\gtab}{\@ifstar
|
||
|
\gtab@Original%
|
||
|
\gtab@Hidden%
|
||
|
}
|
||
13 years ago
|
\renewcommand{\utab}{\@ifstar
|
||
|
\utab@Original%
|
||
|
\utab@Hidden%
|
||
|
}
|
||
13 years ago
|
\else%
|
||
|
\renewcommand{\gtab}{\@ifstar
|
||
|
\gtab@Original%
|
||
|
\gtab@Original%
|
||
|
}
|
||
13 years ago
|
\renewcommand{\utab}{\@ifstar
|
||
|
\utab@Original%
|
||
|
\utab@Original%
|
||
|
}
|
||
|
\fi%
|
||
|
\fi%
|
||
|
|
||
|
\ifguitar%
|
||
|
\else
|
||
|
\renewcommand{\gtab}{\@ifstar
|
||
|
\gtab@Hidden%
|
||
|
\gtab@Hidden%
|
||
|
}
|
||
13 years ago
|
\fi%
|
||
13 years ago
|
|
||
|
\ifukulele%
|
||
|
\else
|
||
|
\renewcommand{\utab}{\@ifstar
|
||
|
\utab@Hidden%
|
||
|
\utab@Hidden%
|
||
|
}
|
||
16 years ago
|
\fi%
|
||
|
|
||
11 years ago
|
% On-the-fly compilation of lilypond files
|
||
|
\epstopdfDeclareGraphicsRule{.ly}{pdf}{.pdf}{lilypond --format=pdf -e '(define-public songbookstaff "")' --output=\Gin@base\ETE@suffix\space #1}
|
||
|
\AppendGraphicsExtensions{.ly}
|
||
|
|
||
16 years ago
|
\newcommand{\lilypond}[1]{%
|
||
11 years ago
|
\iflilypond%
|
||
|
\includegraphics{\currfiledir#1}%
|
||
|
\fi%
|
||
|
}
|
||
|
\newcommand{\vlilypond}[1]{%
|
||
16 years ago
|
\iflilypond%
|
||
12 years ago
|
\includegraphics{#1}%
|
||
16 years ago
|
\fi%
|
||
|
}
|
||
|
|
||
14 years ago
|
\newcommand{\image}[2][]{%
|
||
14 years ago
|
\ifpictures%
|
||
16 years ago
|
\begin{flushright}%
|
||
14 years ago
|
\includegraphics[#1]{#2}%
|
||
16 years ago
|
\end{flushright}%
|
||
|
\fi%
|
||
|
}
|
||
|
|
||
|
% Configuration of the songs package
|
||
|
\titleprefixword{}
|
||
|
\renewcommand{\stitlefont}{\LARGE\bf}
|
||
|
\renewcommand{\printchord}[1]{\small{\it#1}}
|
||
|
\renewcommand{\chorusfont}{\it}
|
||
|
\renewcommand{\showauthors}{%
|
||
|
\hbox{\normalsize\songauthors}%
|
||
|
}
|
||
|
\renewcommand{\idxtitlefont}{\sffamily\bfseries}
|
||
|
\renewcommand{\idxauthfont}{\sffamily\bfseries}
|
||
|
\renewcommand{\idxheadfont}{\sffamily\it\LARGE}
|
||
|
\renewcommand{\idxrefsfont}{\bfseries}
|
||
|
|
||
15 years ago
|
% Paragraph indentation space
|
||
|
\setlength{\parindent}{0.3cm}
|
||
|
|
||
|
%
|
||
|
% songs class options
|
||
|
%
|
||
|
% Horizontal space reserved to verse number
|
||
|
\setlength{\versenumwidth}{1em}
|
||
|
% Modifier to the space between consecutive lines of lyrics
|
||
13 years ago
|
\baselineadj=-6pt plus 0pt minus 2pt
|
||
15 years ago
|
% Space between verses and chorus
|
||
|
\versesep=6pt plus 2pt minus 2pt
|
||
13 years ago
|
% lyrics font
|
||
15 years ago
|
\renewcommand{\lyricfont}{\normalfont\normalsize}
|
||
|
|
||
15 years ago
|
|
||
|
% color used to shade song numbers.
|
||
16 years ago
|
\definecolor{SongbookShade}{HTML}{d1e4ae}
|
||
|
|
||
16 years ago
|
%
|
||
|
\iftabs%
|
||
16 years ago
|
%% Code from tabs.sty
|
||
|
% Counters
|
||
|
\newcounter{tab-string}
|
||
|
\newcounter{tab-tempo}
|
||
|
\newcounter{tab-line}
|
||
|
% Length
|
||
|
\newlength{\tablen}
|
||
|
% Variables
|
||
|
\def\chordtuning{E,A,D,G,B,e}
|
||
15 years ago
|
\def\xunit{0.35}
|
||
|
\def\yunit{0.2}
|
||
16 years ago
|
% The tab environmant
|
||
|
% \begin{tab}
|
||
|
\newenvironment{tab}
|
||
|
{
|
||
15 years ago
|
\normalsize
|
||
16 years ago
|
\setcounter{tab-line}{0}
|
||
|
\setcounter{tab-tempo}{0}
|
||
|
|
||
|
\setlength{\tablen}{\xunit cm}
|
||
|
|
||
|
% A single note
|
||
|
% \single <string> <fret>
|
||
|
\newcommand{\single}[2]{
|
||
|
% draw tuning if we are at the beginining of a new tab line
|
||
|
\ifnum\value{tab-tempo}=0
|
||
|
\setcounter{tab-string}{6}
|
||
|
\foreach \tuning in \chordtuning
|
||
|
{
|
||
|
\node at (-1,\value{tab-line}+\value{tab-string}) {\tuning};
|
||
|
\addtocounter{tab-string}{-1}
|
||
|
}
|
||
|
\fi
|
||
|
|
||
|
% draw the 6 strings
|
||
|
\foreach \string in {1,...,6}
|
||
|
{
|
||
|
\draw[xshift=-0.5cm] (\value{tab-tempo},\value{tab-line}+\string) -- +(1,0);
|
||
|
}
|
||
|
\draw node[single] at (\value{tab-tempo},\value{tab-line}+##1) {##2};
|
||
|
\addtocounter{tab-tempo}{1}
|
||
|
\addtolength{\tablen}{\xunit cm}
|
||
15 years ago
|
\ifnum\hsize<\tablen
|
||
16 years ago
|
\addtocounter{tab-line}{8}
|
||
|
\setlength{\tablen}{\xunit cm}
|
||
|
\setcounter{tab-tempo}{0}
|
||
|
\end{tikzpicture}
|
||
|
\begin{tikzpicture}[
|
||
|
single/.style={},
|
||
|
cm={\xunit,0,0,-\yunit,(0,0)}
|
||
|
]
|
||
|
\fi
|
||
|
}
|
||
|
% A mesure bar
|
||
|
% \bar
|
||
|
\renewcommand{\bar}{
|
||
|
\draw[xshift=-0.5cm] (\value{tab-tempo},\value{tab-line}+1) --+(0,5);
|
||
|
}
|
||
15 years ago
|
|
||
|
\hspace{-\parindent}
|
||
16 years ago
|
\begin{tikzpicture}[
|
||
|
single/.style={},
|
||
|
cm={\xunit,0,0,-\yunit,(0,0)}
|
||
|
]
|
||
|
|
||
|
% draw the first bar
|
||
|
\draw[xshift=-0.5cm] (0,1) --+(0,5);
|
||
|
}
|
||
|
{
|
||
|
\end{tikzpicture}
|
||
|
}
|
||
16 years ago
|
\else%
|
||
|
\newenvironment{tab}{%
|
||
|
\newcommand{\single}[2]{}%
|
||
|
\renewcommand{\bar}{}%
|
||
|
}{}%
|
||
|
\fi%
|
||
14 years ago
|
%% End of tabs.sty file
|
||
16 years ago
|
|
||
13 years ago
|
\newcommand*{\Intro}{%
|
||
13 years ago
|
\IfStrEq{\@lang}{english}{intro}{}%
|
||
|
\IfStrEq{\@lang}{french}{intro}{}%
|
||
|
}%
|
||
13 years ago
|
\newcommand*{\Outro}{%
|
||
13 years ago
|
\IfStrEq{\@lang}{english}{outro}{}%
|
||
|
\IfStrEq{\@lang}{french}{outro}{}%
|
||
|
}%
|
||
13 years ago
|
\newcommand*{\Bridge}{%
|
||
13 years ago
|
\IfStrEq{\@lang}{english}{bridge}{}%
|
||
|
\IfStrEq{\@lang}{french}{pont}{}%
|
||
|
}%
|
||
13 years ago
|
\newcommand*{\Chorus}{%
|
||
13 years ago
|
\IfStrEq{\@lang}{english}{chorus}{}%
|
||
|
\IfStrEq{\@lang}{french}{refrain}{}%
|
||
|
}%
|
||
13 years ago
|
\newcommand*{\Verse}{%
|
||
13 years ago
|
\IfStrEq{\@lang}{english}{verse}{}%
|
||
|
\IfStrEq{\@lang}{french}{couplet}{}%
|
||
|
}%
|
||
13 years ago
|
\newcommand*{\Solo}{%
|
||
13 years ago
|
\IfStrEq{\@lang}{english}{solo}{}%
|
||
|
\IfStrEq{\@lang}{french}{solo}{}%
|
||
|
}%
|
||
13 years ago
|
\newcommand*{\Pattern}{%
|
||
13 years ago
|
\IfStrEq{\@lang}{english}{pattern}{}%
|
||
|
\IfStrEq{\@lang}{french}{motif}{}%
|
||
|
}%
|
||
13 years ago
|
\newcommand*{\Rythm}{%
|
||
13 years ago
|
\IfStrEq{\@lang}{english}{rythm}{}%
|
||
|
\IfStrEq{\@lang}{french}{rythme}{}%
|
||
|
}%
|
||
13 years ago
|
\newcommand*{\Adlib}{%
|
||
|
\emph{ad~lib.}%
|
||
|
}%
|
||
14 years ago
|
|
||
14 years ago
|
\let\musicnoteORIG\musicnote
|
||
14 years ago
|
\renewcommand{\musicnote}[2][]{%
|
||
13 years ago
|
\vspace{.1cm}
|
||
14 years ago
|
\IfStrEq{}{#1}{\musicnoteORIG{#2}}{
|
||
|
\IfStrEq{\@lang}{#1}{\musicnoteORIG{#2}}{}
|
||
|
}
|
||
14 years ago
|
}
|
||
|
|
||
|
\let\textnoteORIG\textnote
|
||
14 years ago
|
\renewcommand{\textnote}[2][]{%
|
||
13 years ago
|
\vspace{.1cm}
|
||
14 years ago
|
\IfStrEq{}{#1}{\textnoteORIG{#2}}{
|
||
|
\IfStrEq{\@lang}{#1}{\textnoteORIG{#2}}{}
|
||
|
}
|
||
14 years ago
|
}
|
||
|
|
||
13 years ago
|
\renewcommand{\FrameCommand}[1]{
|
||
|
\begin{tikzpicture}
|
||
|
\node[rectangle] (rect) {
|
||
|
\begin{minipage}{.8\textwidth}
|
||
|
#1
|
||
|
\end{minipage}
|
||
|
};
|
||
|
\draw[very thick, dashed] (rect.north west) -- (rect.south west);
|
||
|
\end{tikzpicture}
|
||
|
}
|
||
|
|
||
14 years ago
|
\newenvironment{bridge}{%
|
||
13 years ago
|
\begin{framed}
|
||
|
\vspace{-.4cm}
|
||
|
\begin{verse*}
|
||
|
}{
|
||
|
\end{verse*}
|
||
|
\vspace{-.2cm}
|
||
|
\end{framed}
|
||
14 years ago
|
}
|
||
|
|
||
13 years ago
|
%% \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
|
||
|
}{}%
|
||
|
|
||
13 years ago
|
\ifonesongperpage%
|
||
|
\renewcommand\songcolumns[1]{%
|
||
|
\SB@cnt#1\relax%
|
||
|
\ifSB@preamble\else{\SB@clearpage}\fi%
|
||
|
\SB@numcols\SB@cnt%
|
||
|
\ifnum\SB@numcols>\z@%
|
||
|
\SB@colwidth-\columnsep%
|
||
|
\multiply\SB@colwidth\SB@numcols%
|
||
|
\advance\SB@colwidth\columnsep%
|
||
|
\advance\SB@colwidth\textwidth%
|
||
|
\divide\SB@colwidth\SB@numcols%
|
||
|
\else%
|
||
|
\ifrepchorus\SB@warnrc\fi%
|
||
|
\fi%
|
||
|
}
|
||
|
\fi
|
||
13 years ago
|
|
||
|
\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%
|
||
|
}%
|
||
|
|
||
16 years ago
|
\makeatother
|