Browse Source

Réorganisation et cemmentaires

pull/32/head
Louis 11 years ago
parent
commit
151f74941f
  1. 129
      songbook_core/data/latex/SongbookUtils.sty
  2. 8
      songbook_core/data/latex/crepbook.sty

129
songbook_core/data/latex/SongbookUtils.sty

@ -223,12 +223,16 @@
% End of the new informations % End of the new informations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Lilypond
% On-the-fly compilation of lilypond files % On-the-fly compilation of lilypond files
\iflilypondauto \iflilypondauto
\epstopdfDeclareGraphicsRule{.ly}{pdf}{.pdf}{lilypond --format=pdf --output=\Gin@base\ETE@suffix\space #1} \epstopdfDeclareGraphicsRule{.ly}{pdf}{.pdf}{lilypond --format=pdf --output=\Gin@base\ETE@suffix\space #1}
\AppendGraphicsExtensions{.ly} \AppendGraphicsExtensions{.ly}
\fi \fi
% Conditional inclusion of lilypond sheet music.
\newcommand{\lilypond}[1]{% \newcommand{\lilypond}[1]{%
\iflilypond% \iflilypond%
\includegraphics{\currfiledir#1}% \includegraphics{\currfiledir#1}%
@ -239,7 +243,10 @@
\includegraphics{#1}% \includegraphics{#1}%
\fi% \fi%
} }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Useful commands
\newcommand{\image}[2][]{% \newcommand{\image}[2][]{%
\ifpictures% \ifpictures%
\begin{flushright}% \begin{flushright}%
@ -276,60 +283,6 @@
\emph{ad~lib.}% \emph{ad~lib.}%
}% }%
% Configuration of the songs package
% Horizontal space reserved to verse number
\setlength{\versenumwidth}{1em}
% Modifier to the space between consecutive lines of lyrics
\baselineadj=-6pt plus 0pt minus 2pt
% Space between verses and chorus
\versesep=6pt plus 2pt minus 2pt
% Paragraph indentation space
\setlength{\parindent}{0.3cm}
\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
%% \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}{%
\ifrepeatchords%
\else%
\CB@chordshidden%
\fi
}{}%
% Use a new framed command for bridges % Use a new framed command for bridges
\renewcommand{\FrameCommand}[1]{ \renewcommand{\FrameCommand}[1]{
\begin{tikzpicture} \begin{tikzpicture}
@ -353,6 +306,27 @@
\end{framed} \end{framed}
} }
%% \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}{%
\ifrepeatchords%
\else%
\CB@chordshidden%
\fi
}{}%
\def\removefirstch@r#1{} \def\removefirstch@r#1{}
\newcommand{\transposition}[1]{% \newcommand{\transposition}[1]{%
\ifrepeatchords% \ifrepeatchords%
@ -365,6 +339,7 @@
\fi% \fi%
}% }%
% Definition of environment "tab"
\iftabs \iftabs
\RequirePackage{tabs} \RequirePackage{tabs}
\else \else
@ -372,6 +347,51 @@
\newenvironment{tab}{\comment}{\endcomment} \newenvironment{tab}{\comment}{\endcomment}
\fi \fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Layout tweaks
% Configuration of the songs package
% Horizontal space reserved to verse number
\setlength{\versenumwidth}{1em}
% Modifier to the space between consecutive lines of lyrics
\baselineadj=-6pt plus 0pt minus 2pt
% Space between verses and chorus
\versesep=6pt plus 2pt minus 2pt
% Paragraph indentation space
\setlength{\parindent}{0.3cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% One song per page?
\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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO: Move this stuff to crepbook.sty? -- spalax
\let\@textnoteold\textnote \let\@textnoteold\textnote
\renewcommand{\textnote}[2][]{% \renewcommand{\textnote}[2][]{%
\vspace{.1cm} \vspace{.1cm}
@ -387,5 +407,6 @@
\iflanguage{#1}{\@musicnoteold{#2}}{} \iflanguage{#1}{\@musicnoteold{#2}}{}
} }
} }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput \endinput

8
songbook_core/data/latex/crepbook.sty

@ -46,6 +46,7 @@
% End of multilanguage management % End of multilanguage management
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page % Title page
\long\def\subtitle#1{\long\def\@subtitle{#1}} \long\def\subtitle#1{\long\def\@subtitle{#1}}
\def\version#1{\def\@version{#1}} \def\version#1{\def\@version{#1}}
@ -127,7 +128,9 @@
\end{flushright} \end{flushright}
\end{titlepage} \end{titlepage}
} }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fancy capo % Fancy capo
\iffancycapo % \iffancycapo %
\newlength{\capoheight} \newlength{\capoheight}
@ -142,7 +145,9 @@
}% }%
} }
\fi \fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fonts definitions % Fonts definitions
\def\chordfont#1{\gdef\@chordfont{#1}} \def\chordfont#1{\gdef\@chordfont{#1}}
\def\@chordfont{\small\it} \def\@chordfont{\small\it}
@ -151,8 +156,10 @@
\renewcommand{\idxauthfont}{\sffamily\bfseries} \renewcommand{\idxauthfont}{\sffamily\bfseries}
\renewcommand{\idxheadfont}{\sffamily\it\LARGE} \renewcommand{\idxheadfont}{\sffamily\it\LARGE}
\renewcommand{\idxrefsfont}{\bfseries} \renewcommand{\idxrefsfont}{\bfseries}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Configuration of the songs package % Configuration of the songs package
\titleprefixword{} \titleprefixword{}
\renewcommand{\stitlefont}{\LARGE\bf} \renewcommand{\stitlefont}{\LARGE\bf}
@ -162,5 +169,6 @@
\renewcommand{\showauthors}{% \renewcommand{\showauthors}{%
\hbox{\normalsize\songauthors}% \hbox{\normalsize\songauthors}%
} }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput \endinput

Loading…
Cancel
Save