From ba15ad1093fd28103521feed923b764102be8923 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Mon, 28 Apr 2014 19:35:31 +0100 Subject: [PATCH 01/29] =?UTF-8?q?WIP=20:=20transformation=20de=20crepbok.c?= =?UTF-8?q?ls=20en=20packages=20\maketitle=20ne=20fonctionne=20pas,=20et?= =?UTF-8?q?=20tabs.sty=20n'est=20pas=20utilis=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/data/latex/SongbookUtils.sty | 364 +++++++++++++ songbook_core/data/latex/crepbook.cls | 596 --------------------- songbook_core/data/latex/crepbook.sty | 170 ++++++ songbook_core/data/latex/tabs.sty | 117 ++++ songbook_core/data/templates/layout.tex | 13 +- 5 files changed, 658 insertions(+), 602 deletions(-) create mode 100644 songbook_core/data/latex/SongbookUtils.sty delete mode 100644 songbook_core/data/latex/crepbook.cls create mode 100644 songbook_core/data/latex/crepbook.sty create mode 100644 songbook_core/data/latex/tabs.sty diff --git a/songbook_core/data/latex/SongbookUtils.sty b/songbook_core/data/latex/SongbookUtils.sty new file mode 100644 index 00000000..7218fb67 --- /dev/null +++ b/songbook_core/data/latex/SongbookUtils.sty @@ -0,0 +1,364 @@ +% Songbook Package -- version 0.1 for LaTeX2e +% +% This package provide macro for automatic songbook +% generation. See http://github.com/patacrep/songbook-core/ + +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{SongbookUtils}[2014/04/13 Songbook Package, version 0.1] + + + +\RequirePackage{graphicx,xcolor} % +\RequirePackage{epstopdf} % +\RequirePackage{songs} % +\RequirePackage{fancybox} +\definecolor{tango-green-3}{HTML}{4e9a06} +\definecolor{tango-blue-3}{HTML}{204a87} +\RequirePackage[bookmarks, + bookmarksopen, + hyperfigures=true, + colorlinks=true, + linkcolor=tango-green-3, + urlcolor=tango-blue-3]{hyperref} +\RequirePackage{xstring} +\RequirePackage{framed} +\RequirePackage{currfile} + +\newif{\iftabs} +\DeclareOption{tabs}{\tabstrue} +%\DeclareOption{notabs}{\tabsfalse} % This is the default. + +\newif{\iflilypond} +\DeclareOption{lilypond}{\lilypondtrue} +%\DeclareOption{nolilypond}{\lilypondfalse} + +\newif{\iflilypondauto} +\DeclareOption{lilypond}{\lilypondautotrue\lilypondtrue} + +\newif{\ifdiagram} +\DeclareOption{diagram}{\diagramtrue} +%\DeclareOption{nodiagram}{\diagramfalse} + + +\newif{\ifimportantdiagramonly} +\DeclareOption{importantdiagramonly}{\importantdiagramonlytrue\diagramtrue} + +\newif{\ifpictures} +\DeclareOption{pictures}{\picturestrue} +%\DeclareOption{nopictures}{\picturesfalse} + +\newif{\ifrepeatchords} +\DeclareOption{repeatchords}{\repeatchordstrue} +%\DeclareOption{norepeatchords}{\repeatchordsfalse} + +\newif{\ifukulele} +\DeclareOption{ukulele}{\ukuleletrue} +%\DeclareOption{noukulele}{\ukulelefalse} + +\newif{\ifguitar} +\DeclareOption{guitar}{\guitartrue} +%\DeclareOption{noguitar}{\guitarfalse} + +\newif{\ifonesongperpage} +\DeclareOption{onesongperpage}{\onesongperpagetrue} + +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{songs}} + +\ProcessOptions\relax + +\iflyric + \tabsfalse % + \lilypondfalse% + \nodiagramtrue% + \picturesfalse% + \renewcommand{\colbotglue}{0pt plus .5\textheight minus 0pt}% +\fi + +% Patch for Debian TeXLive 2012 +% A bug may produce corrupted PDF +\pdfobjcompresslevel=0 + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Multilanguage management + +\AtBeginDocument{ + % Default names (english) + \def\songlistname{Songs list} + \def\originalsongname{Original song:} + \def\introname{intro} + \def\outroname{outro} + \def\bridgename{bridge} + \def\chorusname{chorus} + \def\versename{verse} + \def\soloname{solo} + \def\patternname{pattern} + \def\rythmname{rythm} + \def\transpositionname{transposition:} + \def\songindexname{Songs Index} + \def\authorindexname{Authors Index} + \def\chordlistname{Chords list} + +\IfStrEq{\mainlanguage}{french}{ + % French names + \def\songlistname{Liste des chansons} + \def\originalsongname{Chanson originale :} + \def\introname{intro} + \def\outroname{outro} + \def\bridgename{pont} + \def\chorusname{refrain} + \def\versename{couplet} + \def\soloname{solo} + \def\patternname{motif} + \def\rythmname{rythme} + \def\transpositionname{transposition :} + \def\songindexname{Index des chansons} + \def\authorindexname{Index des auteurs} + \def\chordlistname{Liste des accords} + }{} +} + +\def\andname{and} +\def\lastandname{\unskip, and} + +% End of multilanguage management +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Add some informations to the songs +\newlength{\coverheight} +\setlength{\coverheight}{2cm} +\newlength{\coverspace} +\setlength{\coverspace}{0.1cm} +\newcommand{\songcover}{} +\newcommand{\songalbum}{} +\newsongkey{cov}{\let\songcover\@empty}{\def\songcover{\currfiledir#1}} +\newsongkey{vcov}{\let\songcover\@empty}{\def\songcover{#1}} +\newsongkey{album}{\let\songalbum\@empty}{\def\songalbum{#1}} +\newsongkey{url}{\let\songurl\@empty}{\def\songurl{#1}} +\newsongkey{original}{\let\songoriginal\@empty}{\def\songoriginal{#1}} + +% Insert cover pictures +\newcommand\cover{% + \ifpictures% + \ifx\songcover\@empty\else% + \mbox{% + \includegraphics[width=\coverheight]{\songcover}% + \hspace{\coverspace}% + }% + \fi% + \fi% +} + +% display album in song header +\renewcommand{\extendprelude}{ + {\bfseries\showauthors} + {\footnotesize\it\songalbum} + \IfStrEq{\songurl}{}{}{ + \href{\songurl}{\includegraphics[width=.3cm]{internet}} + } +} + +% display original song name in the postlude +\renewcommand{\extendpostlude}{ + {\footnotesize% + \IfStrEq{\songoriginal}{}{}{ + \originalsongname + \songoriginal + } + } +} + +\let\utab\gtab +\let\utab@Original\utab +\newcommand{\utab@Hidden}[2]{}% + +\let\gtab@Original\gtab +\newcommand{\gtab@Hidden}[2]{}% + +\ifnodiagram% +\renewcommand{\gtab}{\@ifstar + \gtab@Hidden% + \gtab@Hidden% +} +\renewcommand{\utab}{\@ifstar + \utab@Hidden% + \utab@Hidden% +} +\else% +\ifimportantdiagramonly% +\renewcommand{\gtab}{\@ifstar + \gtab@Original% + \gtab@Hidden% +} +\renewcommand{\utab}{\@ifstar + \utab@Original% + \utab@Hidden% +} +\else% +\renewcommand{\gtab}{\@ifstar + \gtab@Original% + \gtab@Original% +} +\renewcommand{\utab}{\@ifstar + \utab@Original% + \utab@Original% +} +\fi% +\fi% + +\ifguitar% +\else + \renewcommand{\gtab}{\@ifstar + \gtab@Hidden% + \gtab@Hidden% + } +\fi% + +\ifukulele% +\else + \renewcommand{\utab}{\@ifstar + \utab@Hidden% + \utab@Hidden% + } +\fi% + +% End of the new informations +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% On-the-fly compilation of lilypond files +\iflilypondauto + \epstopdfDeclareGraphicsRule{.ly}{pdf}{.pdf}{lilypond --format=pdf --output=\Gin@base\ETE@suffix\space #1} + \AppendGraphicsExtensions{.ly} +\fi + +\newcommand{\lilypond}[1]{% + \iflilypond% + \includegraphics{\currfiledir#1}% + \fi% +} +\newcommand{\vlilypond}[1]{% + \iflilypond% + \includegraphics{#1}% + \fi% +} + +\newcommand{\image}[2][]{% + \ifpictures% + \begin{flushright}% + \includegraphics[#1]{#2}% + \end{flushright}% + \fi% +} + +\newcommand*{\Intro}{% + \introname% +}% +\newcommand*{\Outro}{% + \outroname% +}% +\newcommand*{\Bridge}{% + \bridgename% +}% +\newcommand*{\Chorus}{% + \chorusname% +}% +\newcommand*{\Verse}{% + \versename% +}% +\newcommand*{\Solo}{% + \soloname% +}% +\newcommand*{\Pattern}{% + \patternname% +}% +\newcommand*{\Rythm}{% + \rythmname% +}% +\newcommand*{\Adlib}{% + \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}{% + \ifnorepeatchords% + \CB@chordshidden% + \fi +}{}% + +\newenvironment{bridge}{% + \begin{framed} + \vspace{-.4cm} + \begin{verse*} + }{ + \end{verse*} + \vspace{-.2cm} +\end{framed} +} + +\def\removefirstch@r#1{} +\newcommand{\transposition}[1]{% + \ifnorepeatchords% + \musicnote{% + \transpositionname~ + \ifthenelse{#1>0}{#1$\Uparrow$}{\removefirstch@r#1$\Downarrow$}% + }% + \else% + \transpose{#1} + \fi% +}% + +\iftab + \RequirePackage{tabs} +\fi + +\endinput \ No newline at end of file diff --git a/songbook_core/data/latex/crepbook.cls b/songbook_core/data/latex/crepbook.cls deleted file mode 100644 index 78681d12..00000000 --- a/songbook_core/data/latex/crepbook.cls +++ /dev/null @@ -1,596 +0,0 @@ -% CREPBOOK DOCUMENT CLASS -- version 0.2.2 -% for LaTeX2e -% -\NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesClass{crepbook}[2012/02/19 v0.5.0 LaTeX document class for Crep - Books] - -\makeatletter\def\input@path{{tex/}} - -\newif{\iftabs} -\newif{\iflilypond} -\newif{\ifnodiagram} -\newif{\ifimportantdiagramonly} -\newif{\ifpictures} -\newif{\ifnorepeatchords} -\newif{\ifukulele} -\newif{\ifguitar} -\newif{\ifonesongperpage} - -\tabsfalse -\lilypondfalse -\nodiagramtrue -\picturesfalse -\importantdiagramonlyfalse -\norepeatchordstrue -\ukulelefalse -\guitarfalse -\onesongperpagefalse - -% Options -\DeclareOption{tabs}{\tabstrue} -\DeclareOption{notabs}{\tabsfalse} -\DeclareOption{lilypond}{\lilypondtrue} -\DeclareOption{nolilypond}{\lilypondfalse} -\DeclareOption{nodiagram}{\nodiagramtrue} -\DeclareOption{diagram}{\nodiagramfalse} -\DeclareOption{importantdiagramonly}{\importantdiagramonlytrue\nodiagramfalse} -\DeclareOption{pictures}{\picturestrue} -\DeclareOption{nopictures}{\picturesfalse} -\DeclareOption{norepeatchords}{\norepeatchordstrue} -\DeclareOption{repeatchords}{\norepeatchordsfalse} -\DeclareOption{ukulele}{\ukuleletrue} -\DeclareOption{noukulele}{\ukulelefalse} -\DeclareOption{guitar}{\guitartrue} -\DeclareOption{noguitar}{\guitarfalse} -\DeclareOption{onesongperpage}{\onesongperpagetrue} - -\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 - -% Base class -\LoadClass{article} - -% Main packages -\RequirePackage{graphicx,xcolor} -\RequirePackage{epstopdf} -\RequirePackage{songs} -\RequirePackage{fancybox} -\definecolor{tango-green-3}{HTML}{4e9a06} -\definecolor{tango-blue-3}{HTML}{204a87} -\RequirePackage[bookmarks, - bookmarksopen, - hyperfigures=true, - colorlinks=true, - linkcolor=tango-green-3, - urlcolor=tango-blue-3]{hyperref} -\RequirePackage{tikz} -\RequirePackage{xstring} -\RequirePackage{ifthen} -\RequirePackage{framed} -\RequirePackage{currfile} - -\iflyric% - \tabsfalse% - \lilypondfalse% - \nodiagramtrue% - \picturesfalse% - \renewcommand{\colbotglue}{0pt plus .5\textheight minus 0pt}% -\fi - -% Start - -% Patch for Debian TeXLive 2012 -% A bug may produce corrupted PDF -\pdfobjcompresslevel=0 - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Multilanguage management - -\AtBeginDocument{ - % Default names (english) - \newcommand{\songlistname}{Songs list} - \newcommand{\labelversionname}{version:} - \newcommand{\labeldatename}{date:} - \newcommand{\labelauthorname}{authors:} - \newcommand{\labelwebname}{web:} - \newcommand{\labelmailname}{mail:} - \newcommand{\originalsongname}{Original song:} - \newcommand{\introname}{intro} - \newcommand{\outroname}{outro} - \newcommand{\bridgename}{bridge} - \newcommand{\chorusname}{chorus} - \newcommand{\versename}{verse} - \newcommand{\soloname}{solo} - \newcommand{\patternname}{pattern} - \newcommand{\rythmname}{rythm} - \newcommand{\transpositionname}{transposition:} - \newcommand{\songindexname}{Songs Index} - \newcommand{\authorindexname}{Authors Index} - \newcommand{\chordlistname}{Chords list} - - \IfStrEq{\mainlanguage}{french}{ - % French names - \renewcommand{\songlistname}{Liste des chansons}{} - \renewcommand{\labelversionname}{version :} - \renewcommand{\labeldatename}{date :} - \renewcommand{\labelauthorname}{auteurs :} - \renewcommand{\labelwebname}{web :} - \renewcommand{\labelmailname}{mail :} - \renewcommand{\originalsongname}{Chanson originale :} - \renewcommand{\introname}{intro} - \renewcommand{\outroname}{outro} - \renewcommand{\bridgename}{pont} - \renewcommand{\chorusname}{refrain} - \renewcommand{\versename}{couplet} - \renewcommand{\soloname}{solo} - \renewcommand{\patternname}{motif} - \renewcommand{\rythmname}{rythme} - \renewcommand{\transpositionname}{transposition :} - \renewcommand{\songindexname}{Index des chansons} - \renewcommand{\authorindexname}{Index des auteurs} - \renewcommand{\chordlistname}{Liste des accords} - }{} -} - -% End of multilanguage management -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\def\andname{and} -\def\lastandname{\unskip, and} - -\newcounter{@inst} -\newcounter{@auth} -\newcounter{auco} - -\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{} -} - -\def\subtitle#1{\gdef\@subtitle{#1}} -\def\version#1{\gdef\@version{#1}} -\def\web#1{\gdef\@web{#1}} -\def\mail#1{\gdef\@mail{#1}} -\def\email#1{\gdef\@email{#1}} -\def\picture#1{\gdef\@picture{#1}} -\def\picturecopyright#1{\gdef\@picturecopyright{#1}} -\def\footer#1{\gdef\@footer{#1}} -\def\lang#1{\gdef\mainlanguage{#1}} -\clearheadinfo - -\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} - \if!\@version!\else{\textbf{\labelversionname}} & \@version \\ \fi - \if!\@date!\else{\textbf{\labeldatename}} & \@date \\ \fi - \if!\@author!\else{\textbf{\labelauthorname}} & \@author \\ \fi - \if!\@web!\else{\textbf{\labelwebname}} & \url{\@web} \\ \fi - \if!\@mail!\else{\textbf{\labelmailname}} & \url{\@mail} \\ \fi - \end{tabular} - \end{flushleft} - - \vspace{1.5cm} - - \begin{center} - \includegraphics[keepaspectratio=true, width=14cm, height=14cm]{\@picture} - \begin{flushright} - {\flushright \small \@picturecopyright} - \end{flushright} - \end{center} - - \@footer - - \thispagestyle{empty} -} - -\newlength{\coverheight} -\setlength{\coverheight}{2cm} -\newlength{\coverspace} -\setlength{\coverspace}{0.1cm} -\newcommand{\songcover}{} -\newcommand{\songalbum}{} -\newsongkey{cov}{\let\songcover\@empty}{\def\songcover{\currfiledir#1}} -\newsongkey{vcov}{\let\songcover\@empty}{\def\songcover{#1}} -\newsongkey{album}{\let\songalbum\@empty}{\def\songalbum{#1}} -\newsongkey{url}{\let\songurl\@empty}{\def\songurl{#1}} -\newsongkey{original}{\let\songoriginal\@empty}{\def\songoriginal{#1}} -\newcommand\cover{% - \ifpictures% - \ifx\songcover\@empty\else% - \mbox{% - \includegraphics[width=\coverheight]{\songcover}% - \hspace{\coverspace}% - }% - \fi% - \fi% -} - -% 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}{}{}{ - \originalsongname - \songoriginal - } - } -} - -\newlength{\capoheight} -\setlength{\capoheight}{1.5cm} -\renewcommand\capo[1]{% - \ifchorded% - \iftranscapos% - \transpose{#1}% - \else% - \ifpictures - \mbox{% - \includegraphics[height=\capoheight]{capodastre}% - \put(-22,8){\Large #1} - }% - \else - \musicnote{capo: #1}% - \fi - \hspace{\coverspace}% - \fi% - \fi% -}% - -\let\utab\gtab -\let\utab@Original\utab -\newcommand{\utab@Hidden}[2]{}% - -\let\gtab@Original\gtab -\newcommand{\gtab@Hidden}[2]{}% - -\ifnodiagram% -\renewcommand{\gtab}{\@ifstar - \gtab@Hidden% - \gtab@Hidden% -} -\renewcommand{\utab}{\@ifstar - \utab@Hidden% - \utab@Hidden% -} -\else% -\ifimportantdiagramonly% -\renewcommand{\gtab}{\@ifstar - \gtab@Original% - \gtab@Hidden% -} -\renewcommand{\utab}{\@ifstar - \utab@Original% - \utab@Hidden% -} -\else% -\renewcommand{\gtab}{\@ifstar - \gtab@Original% - \gtab@Original% -} -\renewcommand{\utab}{\@ifstar - \utab@Original% - \utab@Original% -} -\fi% -\fi% - -\ifguitar% -\else -\renewcommand{\gtab}{\@ifstar - \gtab@Hidden% - \gtab@Hidden% -} -\fi% - -\ifukulele% -\else -\renewcommand{\utab}{\@ifstar - \utab@Hidden% - \utab@Hidden% -} -\fi% - -% On-the-fly compilation of lilypond files -\epstopdfDeclareGraphicsRule{.ly}{pdf}{.pdf}{lilypond --format=pdf --output=\Gin@base\ETE@suffix\space #1} -\AppendGraphicsExtensions{.ly} - -\newcommand{\lilypond}[1]{% - \iflilypond% - \includegraphics{\currfiledir#1}% - \fi% -} -\newcommand{\vlilypond}[1]{% - \iflilypond% - \includegraphics{#1}% - \fi% -} - -\newcommand{\image}[2][]{% - \ifpictures% - \begin{flushright}% - \includegraphics[#1]{#2}% - \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} - -% 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 -\baselineadj=-6pt plus 0pt minus 2pt -% Space between verses and chorus -\versesep=6pt plus 2pt minus 2pt -% lyrics font -\renewcommand{\lyricfont}{\normalfont\normalsize} - - -% color used to shade song numbers. -\definecolor{SongbookShade}{HTML}{d1e4ae} - -% -\iftabs% -%% 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} -\def\xunit{0.35} -\def\yunit{0.2} -% The tab environmant -% \begin{tab} -\newenvironment{tab} -{ - \normalsize - \setcounter{tab-line}{0} - \setcounter{tab-tempo}{0} - - \setlength{\tablen}{\xunit cm} - - % A single note - % \single - \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} - \ifnum\hsize<\tablen - \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); - } - - \hspace{-\parindent} - \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} -} -\else% -\newenvironment{tab}{% - \newcommand{\single}[2]{}% - \renewcommand{\bar}{}% -}{}% -\fi% -%% End of tabs.sty file - -\newcommand*{\Intro}{% - \introname% -}% -\newcommand*{\Outro}{% - \outroname% -}% -\newcommand*{\Bridge}{% - \bridgename% -}% -\newcommand*{\Chorus}{% - \chorusname% -}% -\newcommand*{\Verse}{% - \versename% -}% -\newcommand*{\Solo}{% - \soloname% -}% -\newcommand*{\Pattern}{% - \patternname% -}% -\newcommand*{\Rythm}{% - \rythmname% -}% -\newcommand*{\Adlib}{% - \emph{ad~lib.}% -}% - -\let\musicnoteORIG\musicnote -\renewcommand{\musicnote}[2][]{% - \vspace{.1cm} - \IfStrEq{}{#1}{\musicnoteORIG{#2}}{ - \iflanguage{#1}{\musicnoteORIG{#2}}{} - } -} - -\let\textnoteORIG\textnote -\renewcommand{\textnote}[2][]{% - \vspace{.1cm} - \IfStrEq{}{#1}{\textnoteORIG{#2}}{ - \iflanguage{#1}{\textnoteORIG{#2}}{} - } -} - -\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} -} - -\newenvironment{bridge}{% - \begin{framed} - \vspace{-.4cm} - \begin{verse*} -}{ - \end{verse*} - \vspace{-.2cm} - \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}{% - \ifnorepeatchords% - \CB@chordshidden% - \fi -}{}% - -\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 - -\def\removefirstch@r#1{} -\newcommand{\transposition}[1]{% - \ifnorepeatchords% - \musicnote{% - \transpositionname~ - \ifthenelse{#1>0}{#1$\Uparrow$}{\removefirstch@r#1$\Downarrow$}% - }% - \else% - \transpose{#1} - \fi% -}% - -\makeatother diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty new file mode 100644 index 00000000..fb3b7f8c --- /dev/null +++ b/songbook_core/data/latex/crepbook.sty @@ -0,0 +1,170 @@ +% Crepbook Package -- version 0.1 for LaTeX2e +% +% This package is intend to use with the songbook package. +% It defines some layout for automatic songbook generation. +% See http://github.com/patacrep/songbook-core/ + +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{crepbook}[2014/04/13 Crepbook Package, version 0.1] + +\RequirePackage{SongbookUtils} + +\newif{\iffancycapo} +\DeclareOption{fancy-capo}{\iffancycapotrue} +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{SongbookUtils}} + + +\ProcessOptions\relax + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Multilanguage management + +\AtBeginDocument{ + % Default names (english) + \def\labelversionname{Version:} + \def\labeldatename{dDate:} + \def\labelauthorname{aAuthors:} + \def\labelwebname{Web:} + \def\labelmailname{Email:} + + \IfStrEq{\mainlanguage}{french}{ + % French names + \def\labelversionname{Version :} + \def\labeldatename{Date :} + \def\labelauthorname{Auteurs :} + \def\labelwebname{Web :} + \def\labelmailname{Mail :} + }{} +} + +\def\andname{and} +\def\lastandname{\unskip, and} + +% End of multilanguage management +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +% Title page +\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{} +} + +\def\subtitle#1{\gdef\@subtitle{#1}} +\def\version#1{\gdef\@version{#1}} +\def\web#1{\gdef\@web{#1}} +\def\mail#1{\gdef\@mail{#1}} +\def\email#1{\gdef\@email{#1}} +\def\picture#1{\gdef\@picture{#1}} +\def\picturecopyright#1{\gdef\@picturecopyright{#1}} +\def\footer#1{\gdef\@footer{#1}} +\def\lang#1{\gdef\mainlanguage{#1}} +\clearheadinfo + +\def\maketitle{ + \@maketitle + \clearheadinfo +} + + +\newcounter{@inst} +\newcounter{@auth} +\newcounter{auco} + +\def\@titlefont{\Huge\bfseries\boldmath} +\def\@subtitlefont{\large\bfseries\boldmath} + +\def\@maketitle{ + \begin{titlepage} + \thispagestyle{empty} +% \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}} + {\@titlefont\@title\par} + \if!\@subtitle!\else + {\hfil\@subtitlefont\@subtitle\par} + \fi + {\rule{\textwidth}{1mm}} + \end{center}% + + \vfil + + \begin{flushleft} + \begin{tabular}{l l} + \if!\@version!\else{\textbf{\labelversionname}} & \@version \\ \fi + \if!\@date!\else{\textbf{\labeldatename}} & \@date \\ \fi + \if!\@author!\else{\textbf{\labelauthorname}} & \@author \\ \fi + \if!\@web!\else{\textbf{\labelwebname}} & \url{\@web} \\ \fi + \if!\@mail!\else{\textbf{\labelmailname}} & \url{\@mail} \\ \fi + \end{tabular} + \end{flushleft} + + \vfil + + \begin{center} + \includegraphics[keepaspectratio=true, width=12cm, height=12cm]{\@picture} + {\hfil \small \@picturecopyright} + \end{center} + + \@footer + \end{titlepage} +} + +% Fancy capo +\iffancycapo % + \newlength{\capoheight} + \setlength{\capoheight}{1.5cm} + \renewcommand\capo[1]{% + \iftranscapos% + \transpose{#1}% + \fi% + \mbox{% + \includegraphics[height=\capoheight]{capodastre}% + \put(-22,8){\Large #1} + }% +\fi + +% Fonts definitions +\def\chordfont#1{\gdef\@chordfont{#1}} +\def\@chordfont{\small\it} + +\renewcommand{\idxtitlefont}{\sffamily\bfseries} +\renewcommand{\idxauthfont}{\sffamily\bfseries} +\renewcommand{\idxheadfont}{\sffamily\it\LARGE} +\renewcommand{\idxrefsfont}{\bfseries} + + +% Configuration of the songs package +\titleprefixword{} +\renewcommand{\stitlefont}{\LARGE\bf} +\renewcommand{\printchord}[1]{\@chordfont #1} +\renewcommand{\chorusfont}{\it} +\renewcommand{\lyricfont}{\normalfont\normalsize} +\renewcommand{\showauthors}{% + \hbox{\normalsize\songauthors}% +} + + +% color used to shade song numbers. +%\definecolor{SongbookShade}{HTML}{d1e4ae} + + +\endinput \ No newline at end of file diff --git a/songbook_core/data/latex/tabs.sty b/songbook_core/data/latex/tabs.sty new file mode 100644 index 00000000..53df6aa3 --- /dev/null +++ b/songbook_core/data/latex/tabs.sty @@ -0,0 +1,117 @@ +% Tabs Package -- version 0.1 for LaTeX2e +% +% This package provide macros for tablatures creations + +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{tabs}[2014/04/13 Tabs Package, version 0.1] + +\RequirePackage{tikz} + +% Counters +\newcounter{tab-string} +\newcounter{tab-tempo} +\newcounter{tab-line} +% Length +\newlength{\tablen} +% Variables +\def\chordtuning{E,A,D,G,B,e} +\def\xunit{0.35} +\def\yunit{0.2} +% The tab environmant +% \begin{tab} +\newenvironment{tab} +{ + \normalsize + \setcounter{tab-line}{0} + \setcounter{tab-tempo}{0} + + \setlength{\tablen}{\xunit cm} + + % A single note + % \single + \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} + \ifnum\hsize<\tablen + \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); + } + + \hspace{-\parindent} + \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} +} +\else% +\newenvironment{tab}{% + \newcommand{\single}[2]{}% + \renewcommand{\bar}{}% +}{}% +\fi% +%% End of tabs.sty file + + + +\let\musicnoteORIG\musicnote +\renewcommand{\musicnote}[2][]{% + \vspace{.1cm} + \IfStrEq{}{#1}{\musicnoteORIG{#2}}{ + \iflanguage{#1}{\musicnoteORIG{#2}}{} + } +} + +\let\textnoteORIG\textnote +\renewcommand{\textnote}[2][]{% + \vspace{.1cm} + \IfStrEq{}{#1}{\textnoteORIG{#2}}{ + \iflanguage{#1}{\textnoteORIG{#2}}{} + } +} + +\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} +} + +\endinput \ No newline at end of file diff --git a/songbook_core/data/templates/layout.tex b/songbook_core/data/templates/layout.tex index a0d50dcc..e59e8866 100644 --- a/songbook_core/data/templates/layout.tex +++ b/songbook_core/data/templates/layout.tex @@ -70,12 +70,13 @@ (* endvariables *) (* block documentclass *) -\documentclass[((booktype)), - (* for option in bookoptions *)((option)), - (* endfor *) - (* for instrument in instruments *)((instrument)), - (* endfor *) - ((mainfontsize))pt]{crepbook} +\documentclass[((mainfontsize))pt]{article} + +\usepackage[((booktype)), + (* for option in bookoptions *)((option)), + (* endfor *) + (* for instrument in instruments *)((instrument)), + (* endfor *)]{crepbook} (* endblock *) (* block songbookpreambule *) From ece5d0ab7ba1fc5ab44ca978693ef47b6c6b5bcc Mon Sep 17 00:00:00 2001 From: Luthaf Date: Wed, 7 May 2014 18:01:04 +0100 Subject: [PATCH 02/29] =?UTF-8?q?Fin=20de=20la=20s=C3=A9paration=20de=20cr?= =?UTF-8?q?epbook.cls=20en=20deux=20packages.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/data/latex/SongbookUtils.sty | 65 +++++++++++----------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/songbook_core/data/latex/SongbookUtils.sty b/songbook_core/data/latex/SongbookUtils.sty index 7218fb67..ba629392 100644 --- a/songbook_core/data/latex/SongbookUtils.sty +++ b/songbook_core/data/latex/SongbookUtils.sty @@ -69,7 +69,7 @@ \iflyric \tabsfalse % \lilypondfalse% - \nodiagramtrue% + \diagramfalse% \picturesfalse% \renewcommand{\colbotglue}{0pt plus .5\textheight minus 0pt}% \fi @@ -180,35 +180,35 @@ \let\gtab@Original\gtab \newcommand{\gtab@Hidden}[2]{}% -\ifnodiagram% -\renewcommand{\gtab}{\@ifstar - \gtab@Hidden% - \gtab@Hidden% -} -\renewcommand{\utab}{\@ifstar - \utab@Hidden% - \utab@Hidden% -} -\else% -\ifimportantdiagramonly% -\renewcommand{\gtab}{\@ifstar - \gtab@Original% - \gtab@Hidden% -} -\renewcommand{\utab}{\@ifstar - \utab@Original% - \utab@Hidden% -} +\ifdiagram% + \ifimportantdiagramonly% + \renewcommand{\gtab}{\@ifstar + \gtab@Original% + \gtab@Hidden% + } + \renewcommand{\utab}{\@ifstar + \utab@Original% + \utab@Hidden% + } + \else% + \renewcommand{\gtab}{\@ifstar + \gtab@Original% + \gtab@Original% + } + \renewcommand{\utab}{\@ifstar + \utab@Original% + \utab@Original% + } + \fi% \else% -\renewcommand{\gtab}{\@ifstar - \gtab@Original% - \gtab@Original% -} -\renewcommand{\utab}{\@ifstar - \utab@Original% - \utab@Original% -} -\fi% + \renewcommand{\gtab}{\@ifstar + \gtab@Hidden% + \gtab@Hidden% + } + \renewcommand{\utab}{\@ifstar + \utab@Hidden% + \utab@Hidden% + } \fi% \ifguitar% @@ -330,8 +330,9 @@ } \newenvironment{repeatedchords}{% - \ifnorepeatchords% - \CB@chordshidden% + \ifrepeatchords% + \else% + \CB@chordshidden% \fi }{}% @@ -357,7 +358,7 @@ \fi% }% -\iftab +\iftabs \RequirePackage{tabs} \fi From 02fd41605f4d7826d819db1e003171021c593a6a Mon Sep 17 00:00:00 2001 From: Luthaf Date: Wed, 7 May 2014 20:22:20 +0100 Subject: [PATCH 03/29] =?UTF-8?q?Maketitle=20fix.=20Les=20commandes=20nece?= =?UTF-8?q?ssaires=20sont=20a=20pr=C3=A9sent=20longues.=20Fix=20#29?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/data/latex/crepbook.sty | 113 +++++++++++--------------- 1 file changed, 47 insertions(+), 66 deletions(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index fb3b7f8c..2057c6ec 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -40,32 +40,35 @@ \def\andname{and} \def\lastandname{\unskip, and} + +\def\lang#1{\def\mainlanguage{#1}} + % End of multilanguage management %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - % Title page +\long\def\subtitle#1{\long\def\@subtitle{#1}} +\def\version#1{\def\@version{#1}} +\def\web#1{\def\@web{#1}} +\def\mail#1{\def\@mail{#1}} +\def\email#1{\def\@email{#1}} +\def\picture#1{\def\@picture{#1}} +\def\picturecopyright#1{\def\@picturecopyright{#1}} +\def\footer#1{\def\@footer{#1}} + + \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{} + \author{No Author Given}% + \title{No Title Given}% + \subtitle{}% + \version{}% + \web{}% + \mail{}% + \email{}% + \picture{}% + \picturecopyright{}% } -\def\subtitle#1{\gdef\@subtitle{#1}} -\def\version#1{\gdef\@version{#1}} -\def\web#1{\gdef\@web{#1}} -\def\mail#1{\gdef\@mail{#1}} -\def\email#1{\gdef\@email{#1}} -\def\picture#1{\gdef\@picture{#1}} -\def\picturecopyright#1{\gdef\@picturecopyright{#1}} -\def\footer#1{\gdef\@footer{#1}} -\def\lang#1{\gdef\mainlanguage{#1}} \clearheadinfo \def\maketitle{ @@ -83,48 +86,31 @@ \def\@maketitle{ \begin{titlepage} - \thispagestyle{empty} -% \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}} - {\@titlefont\@title\par} - \if!\@subtitle!\else - {\hfil\@subtitlefont\@subtitle\par} - \fi - {\rule{\textwidth}{1mm}} - \end{center}% - - \vfil - - \begin{flushleft} - \begin{tabular}{l l} - \if!\@version!\else{\textbf{\labelversionname}} & \@version \\ \fi - \if!\@date!\else{\textbf{\labeldatename}} & \@date \\ \fi - \if!\@author!\else{\textbf{\labelauthorname}} & \@author \\ \fi - \if!\@web!\else{\textbf{\labelwebname}} & \url{\@web} \\ \fi - \if!\@mail!\else{\textbf{\labelmailname}} & \url{\@mail} \\ \fi - \end{tabular} - \end{flushleft} - - \vfil - - \begin{center} - \includegraphics[keepaspectratio=true, width=12cm, height=12cm]{\@picture} - {\hfil \small \@picturecopyright} - \end{center} - - \@footer + \thispagestyle{empty} + \hfil% + {\rule{\textwidth}{1mm}} + {\@titlefont\@title\par} + \if!\@subtitle!\else + {\hfil\@subtitlefont\@subtitle\par} + \fi + {\rule{\textwidth}{1mm}} + \hfil% + \vfil + \begin{flushleft} + \begin{tabular}{l l} + \if!\@version!\else{\textbf{\labelversionname}} & \@version \\ \fi + \if!\@date!\else{\textbf{\labeldatename}} & \@date \\ \fi + \if!\@author!\else{\textbf{\labelauthorname}} & \@author \\ \fi + \if!\@web!\else{\textbf{\labelwebname}} & \url{\@web} \\ \fi + \if!\@mail!\else{\textbf{\labelmailname}} & \url{\@mail} \\ \fi + \end{tabular} + \end{flushleft} + \vfil + \begin{center} + \includegraphics[keepaspectratio=true, width=12cm, height=12cm]{\@picture} + {\hfil \small \@picturecopyright} + \end{center} + \@footer \end{titlepage} } @@ -162,9 +148,4 @@ \hbox{\normalsize\songauthors}% } - -% color used to shade song numbers. -%\definecolor{SongbookShade}{HTML}{d1e4ae} - - \endinput \ No newline at end of file From 72cac8edc373de5162aa4730c86cd3782ee33051 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Wed, 7 May 2014 20:22:45 +0100 Subject: [PATCH 04/29] Fix some graphical errors --- songbook_core/data/latex/SongbookUtils.sty | 43 ++++++++++++++++++---- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/songbook_core/data/latex/SongbookUtils.sty b/songbook_core/data/latex/SongbookUtils.sty index ba629392..a83fa423 100644 --- a/songbook_core/data/latex/SongbookUtils.sty +++ b/songbook_core/data/latex/SongbookUtils.sty @@ -23,6 +23,8 @@ \RequirePackage{xstring} \RequirePackage{framed} \RequirePackage{currfile} +\RequirePackage{ifthen} +\RequirePackage{tikz} \newif{\iftabs} \DeclareOption{tabs}{\tabstrue} @@ -336,30 +338,55 @@ \fi }{}% -\newenvironment{bridge}{% + +% Use a new framed command for bridges +\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} +} +\newenvironment{bridge} +{% \begin{framed} - \vspace{-.4cm} - \begin{verse*} - }{ + \vspace{-.4cm} + \begin{verse*} +} +{% \end{verse*} \vspace{-.2cm} -\end{framed} + \end{framed} } \def\removefirstch@r#1{} \newcommand{\transposition}[1]{% - \ifnorepeatchords% + \ifrepeatchords% + \transpose{#1} + \else% \musicnote{% \transpositionname~ \ifthenelse{#1>0}{#1$\Uparrow$}{\removefirstch@r#1$\Downarrow$}% }% - \else% - \transpose{#1} \fi% }% \iftabs \RequirePackage{tabs} +\else + \RequirePackage{verbatim} + \newenvironment{tab}{\comment}{\endcomment} \fi +\let\@textnoteold\textnote +\renewcommand{\textnote}[2][]{% + \vspace{.1cm} + \IfStrEq{}{#1}{\@textnoteold{#2}}{ + \iflanguage{#1}{\@textnoteold{#2}}{} + } +} + \endinput \ No newline at end of file From 19dbdc1cd16bc7c14cced07c5e1ae9c0592fac44 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Thu, 8 May 2014 21:49:16 +0100 Subject: [PATCH 05/29] =?UTF-8?q?Corrections.=20Les=20options=20sont=20?= =?UTF-8?q?=C3=A0=20pr=C3=A9sent=20bien=20pass=C3=A9es=20au=20packages.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/data/latex/crepbook.sty | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 2057c6ec..5e2362d4 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -7,15 +7,18 @@ \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{crepbook}[2014/04/13 Crepbook Package, version 0.1] -\RequirePackage{SongbookUtils} - \newif{\iffancycapo} -\DeclareOption{fancy-capo}{\iffancycapotrue} +\DeclareOption{fancy-capo}{\fancycapotrue} \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{SongbookUtils}} - \ProcessOptions\relax +\RequirePackage{SongbookUtils} + +\ifpictures + \fancycapotrue +\fi + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Multilanguage management @@ -119,13 +122,14 @@ \newlength{\capoheight} \setlength{\capoheight}{1.5cm} \renewcommand\capo[1]{% - \iftranscapos% - \transpose{#1}% - \fi% - \mbox{% - \includegraphics[height=\capoheight]{capodastre}% - \put(-22,8){\Large #1} - }% + \iftranscapos% + \transpose{#1}% + \fi% + \mbox{% + \includegraphics[height=\capoheight]{capodastre}% + \put(-22,8){\Large #1} + }% + } \fi % Fonts definitions From 66913f79d93600854db79b4955697a0d9a46e0b1 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Thu, 8 May 2014 21:49:24 +0100 Subject: [PATCH 06/29] Nettoyage --- songbook_core/data/latex/SongbookUtils.sty | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/songbook_core/data/latex/SongbookUtils.sty b/songbook_core/data/latex/SongbookUtils.sty index a83fa423..fd127e05 100644 --- a/songbook_core/data/latex/SongbookUtils.sty +++ b/songbook_core/data/latex/SongbookUtils.sty @@ -6,8 +6,6 @@ \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{SongbookUtils}[2014/04/13 Songbook Package, version 0.1] - - \RequirePackage{graphicx,xcolor} % \RequirePackage{epstopdf} % \RequirePackage{songs} % @@ -28,38 +26,30 @@ \newif{\iftabs} \DeclareOption{tabs}{\tabstrue} -%\DeclareOption{notabs}{\tabsfalse} % This is the default. \newif{\iflilypond} \DeclareOption{lilypond}{\lilypondtrue} -%\DeclareOption{nolilypond}{\lilypondfalse} \newif{\iflilypondauto} \DeclareOption{lilypond}{\lilypondautotrue\lilypondtrue} \newif{\ifdiagram} \DeclareOption{diagram}{\diagramtrue} -%\DeclareOption{nodiagram}{\diagramfalse} - \newif{\ifimportantdiagramonly} \DeclareOption{importantdiagramonly}{\importantdiagramonlytrue\diagramtrue} \newif{\ifpictures} \DeclareOption{pictures}{\picturestrue} -%\DeclareOption{nopictures}{\picturesfalse} \newif{\ifrepeatchords} \DeclareOption{repeatchords}{\repeatchordstrue} -%\DeclareOption{norepeatchords}{\repeatchordsfalse} \newif{\ifukulele} \DeclareOption{ukulele}{\ukuleletrue} -%\DeclareOption{noukulele}{\ukulelefalse} \newif{\ifguitar} \DeclareOption{guitar}{\guitartrue} -%\DeclareOption{noguitar}{\guitarfalse} \newif{\ifonesongperpage} \DeclareOption{onesongperpage}{\onesongperpagetrue} From 3357df920346f66c76c099a842a6e2d20961f9b6 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Thu, 8 May 2014 21:55:07 +0100 Subject: [PATCH 07/29] Commande manquante --- songbook_core/data/latex/SongbookUtils.sty | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/songbook_core/data/latex/SongbookUtils.sty b/songbook_core/data/latex/SongbookUtils.sty index fd127e05..22b0aedb 100644 --- a/songbook_core/data/latex/SongbookUtils.sty +++ b/songbook_core/data/latex/SongbookUtils.sty @@ -379,4 +379,12 @@ } } +\let\@musicnoteold\musicnote +\renewcommand{\musicnote}[2][]{% + \vspace{.1cm} + \IfStrEq{}{#1}{\@musicnoteold{#2}}{ + \iflanguage{#1}{\@musicnoteold{#2}}{} + } +} + \endinput \ No newline at end of file From 0905e686f1f7ffef75c4c152fb460231df8d3cd7 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Thu, 8 May 2014 22:48:07 +0100 Subject: [PATCH 08/29] Ordre de chargement des packages --- songbook_core/data/latex/SongbookUtils.sty | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/songbook_core/data/latex/SongbookUtils.sty b/songbook_core/data/latex/SongbookUtils.sty index 22b0aedb..76dde0bf 100644 --- a/songbook_core/data/latex/SongbookUtils.sty +++ b/songbook_core/data/latex/SongbookUtils.sty @@ -8,7 +8,6 @@ \RequirePackage{graphicx,xcolor} % \RequirePackage{epstopdf} % -\RequirePackage{songs} % \RequirePackage{fancybox} \definecolor{tango-green-3}{HTML}{4e9a06} \definecolor{tango-blue-3}{HTML}{204a87} @@ -58,6 +57,8 @@ \ProcessOptions\relax +\RequirePackage{songs} % + \iflyric \tabsfalse % \lilypondfalse% From 12f4063139a2ebf97e137019ada3280cef49e3e6 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Thu, 8 May 2014 22:48:45 +0100 Subject: [PATCH 09/29] Nettoyage et finalisation de la page de titre --- songbook_core/data/latex/crepbook.sty | 19 +++++++++++++------ songbook_core/data/templates/default.tex | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 5e2362d4..f2d317d9 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -59,10 +59,11 @@ \def\picturecopyright#1{\def\@picturecopyright{#1}} \def\footer#1{\def\@footer{#1}} +\long\def\author#1{\long\def\@author{#1}} \def\clearheadinfo{ - \author{No Author Given}% - \title{No Title Given}% + \author{}% + \title{No title}% \subtitle{}% \version{}% \web{}% @@ -90,19 +91,19 @@ \def\@maketitle{ \begin{titlepage} \thispagestyle{empty} - \hfil% + \begin{center} {\rule{\textwidth}{1mm}} {\@titlefont\@title\par} \if!\@subtitle!\else {\hfil\@subtitlefont\@subtitle\par} \fi {\rule{\textwidth}{1mm}} - \hfil% + \end{center} \vfil \begin{flushleft} \begin{tabular}{l l} \if!\@version!\else{\textbf{\labelversionname}} & \@version \\ \fi - \if!\@date!\else{\textbf{\labeldatename}} & \@date \\ \fi + \if!\@date!\else{\textbf{\labeldatename}} & \@date \\ \fi \if!\@author!\else{\textbf{\labelauthorname}} & \@author \\ \fi \if!\@web!\else{\textbf{\labelwebname}} & \url{\@web} \\ \fi \if!\@mail!\else{\textbf{\labelmailname}} & \url{\@mail} \\ \fi @@ -111,10 +112,16 @@ \vfil \begin{center} \includegraphics[keepaspectratio=true, width=12cm, height=12cm]{\@picture} - {\hfil \small \@picturecopyright} + \vskip1em + {\hfil\hbox{\small \@picturecopyright}} \end{center} + \begin{flushright} + \vfil + {\hfil\rule{.4\textwidth}{.75pt}\par} \@footer + \end{flushright} \end{titlepage} + \newpage } % Fancy capo diff --git a/songbook_core/data/templates/default.tex b/songbook_core/data/templates/default.tex index a13fa507..31c2c020 100644 --- a/songbook_core/data/templates/default.tex +++ b/songbook_core/data/templates/default.tex @@ -49,7 +49,7 @@ "default": {"default": "Dbolton \\url{http://commons.wikimedia.org/wiki/User:Dbolton}"} }, "footer": {"description": {"english": "Footer", "french": "Pied de page"}, - "default": {"default": "\\begin{flushright}Generated using Songbook (\\url{http://www.patacrep.com})\\end{flushright}"} + "default": {"default": "Generated using Songbook (\\url{http://www.patacrep.com})"} }, "titleprefixwords": {"description": {"english": "Ignore some words in the beginning of song titles", "french": "Ignore des mots dans le classement des chansons"}, From db2a1e5493fb72910a691578966d1bf1e9c28b76 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Fri, 9 May 2014 12:17:25 +0100 Subject: [PATCH 10/29] Suppression d'un newpage --- songbook_core/data/latex/crepbook.sty | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index f2d317d9..50559ba2 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -121,7 +121,6 @@ \@footer \end{flushright} \end{titlepage} - \newpage } % Fancy capo @@ -159,4 +158,4 @@ \hbox{\normalsize\songauthors}% } -\endinput \ No newline at end of file +\endinput From d83be38af3830f53e3ab4782beb7893200d56493 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Sun, 11 May 2014 14:04:47 +0100 Subject: [PATCH 11/29] Gestion de la nouvelle syntaxe pour content Fix #9 --- songbook_core/build.py | 23 ++++++++---- songbook_core/data/examples/example.sb | 11 ++++-- songbook_core/data/templates/songs.tex | 12 +++++-- songbook_core/songs.py | 50 +++++++++++++------------- 4 files changed, 59 insertions(+), 37 deletions(-) diff --git a/songbook_core/build.py b/songbook_core/build.py index bd50d0a3..c81affad 100644 --- a/songbook_core/build.py +++ b/songbook_core/build.py @@ -14,7 +14,7 @@ from songbook_core import __DATADIR__ from songbook_core import errors from songbook_core.files import recursive_find from songbook_core.index import process_sxd -from songbook_core.songs import Song, SongsList +from songbook_core.songs import Song, SongbookContent from songbook_core.templates import TexRenderer LOGGER = logging.getLogger(__name__) @@ -95,17 +95,26 @@ class Songbook(object): # Compute song list if self.config['content'] is None: - self.config['content'] = [ + self.config['content'] = [( + "song", os.path.relpath( filename, os.path.join(self.config['datadir'], 'songs'), - ) + )) for filename in recursive_find( os.path.join(self.config['datadir'], 'songs'), '*.sg', ) ] + else: + content = self.config["content"] + self.config["content"] = [] + for elem in content: + if isinstance(elem, unicode): + self.config["content"].append(("song", elem)) + else: + self.config["content"].append((elem[0], elem[1])) # Ensure self.config['authwords'] contains all entries for (key, value) in DEFAULT_AUTHWORDS.items(): @@ -113,9 +122,9 @@ class Songbook(object): self.config['authwords'][key] = value def _parse_songs(self): - """Parse songs included in songbook.""" - self.songslist = SongsList(self.config['datadir']) - self.songslist.append_list(self.config['content']) + """Parse content included in songbook.""" + self.contentlist = SongbookContent(self.config['datadir']) + self.contentlist.append_list(self.config['content']) def write_tex(self, output): """Build the '.tex' file corresponding to self. @@ -133,7 +142,7 @@ class Songbook(object): context = renderer.get_variables() context.update(self.config) context['titleprefixkeys'] = ["after", "sep", "ignore"] - context['songlist'] = self.songslist + context['content'] = self.contentlist context['filename'] = output.name[:-4] self._set_songs_default(context) diff --git a/songbook_core/data/examples/example.sb b/songbook_core/data/examples/example.sb index 327ed801..a003440e 100644 --- a/songbook_core/data/examples/example.sb +++ b/songbook_core/data/examples/example.sb @@ -10,5 +10,12 @@ "authwords" : { "sep" : ["and", "et"] }, - "datadir" : "." -} + "datadir" : ".", + "content" : [["section", "Traditional"], + "chevaliers_de_la_table_ronde.sg", + "greensleeves.sg", + "vent_frais.sg", + ["section", "Example"], + "example-fr.sg", + "example-en.sg"] +} \ No newline at end of file diff --git a/songbook_core/data/templates/songs.tex b/songbook_core/data/templates/songs.tex index b630a919..8ae2bf26 100644 --- a/songbook_core/data/templates/songs.tex +++ b/songbook_core/data/templates/songs.tex @@ -25,7 +25,7 @@ (( super() )) - (* for lang in songlist.languages() *) + (* for lang in content.languages() *) \PassOptionsToPackage{((lang))}{babel} (* endfor *) \usepackage[((lang))]{babel} @@ -38,8 +38,14 @@ \addcontentsline{toc}{section}{\songlistname} \begin{songs}{((indexes|default('')))} - (* for song in songlist.songs *) - \input{((song.path))} + (* for type, elem in content.content *) + (* if type=="song" *) + \input{((elem.path))} + (* elif type=="section" *) + \end{songs} + \songsection{((elem))} + \begin{songs}{((indexes|default('')))} + (* endif *) (* endfor *) \end{songs} (* endblock *) diff --git a/songbook_core/songs.py b/songbook_core/songs.py index ccb9c7fc..19d732af 100644 --- a/songbook_core/songs.py +++ b/songbook_core/songs.py @@ -87,16 +87,16 @@ def unprefixed_title(title, prefixes): return title -class SongsList(object): +class SongbookContent(object): """Manipulation et traitement de liste de chansons""" def __init__(self, library): self._songdir = os.path.join(library, 'songs') - # Liste triée des chansons - self.songs = [] + # Sorted list of the content + self.content = [] - def append(self, filename): + def append_song(self, filename): """Ajout d'une chanson à la liste Effets de bord : analyse syntaxique plus ou moins sommaire du fichier @@ -104,36 +104,36 @@ class SongsList(object): album, etc.). """ LOGGER.debug('Parsing file "{}"…'.format(filename)) - # Exécution de PlasTeX + # Data extraction from the song with plastex data = parsetex(filename) - song = Song(filename, data['languages'], data['titles'], data['args']) - low, high = 0, len(self.songs) - while low != high: - middle = (low + high) / 2 - if song < self.songs[middle]: - high = middle - else: - low = middle + 1 - self.songs.insert(low, song) + self.content.append(("song", song)) + + def append(self, type, value): + """ Append a generic element to the content list""" + self.content.append((type, value)) - def append_list(self, filelist): + def append_list(self, contentlist): """Ajoute une liste de chansons à la liste L'argument est une liste de chaînes, représentant des noms de fichiers sous la forme d'expressions régulières destinées à être analysées avec le module glob. """ - for regexp in filelist: - before = len(self.songs) - for filename in glob.iglob(os.path.join(self._songdir, regexp)): - self.append(filename) - if len(self.songs) == before: - # No songs were added - LOGGER.warning( - "Expression '{}' did not match any file".format(regexp) - ) + for type, elem in contentlist: + if type == "song": + # Add all the songs matching the regex + before = len(self.content) + for filename in glob.iglob(os.path.join(self._songdir, elem)): + self.append_song(filename) + if len(self.content) == before: + # No songs were added + LOGGER.warning( + "Expression '{}' did not match any file".format(regexp) + ) + else: + self.append(type, elem) def languages(self): """Renvoie la liste des langues utilisées par les chansons""" - return set().union(*[set(song.languages) for song in self.songs]) + return set().union(*[set(song.languages) for type, song in self.content if type=="song"]) From 550b809a275a7394d8e30586f9b137567236c389 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 16 May 2014 20:04:27 +0200 Subject: [PATCH 12/29] =?UTF-8?q?R=C3=A9solution=20d'un=20bug=20si=20la=20?= =?UTF-8?q?variable=20`titleprefixwords`=20n'est=20pas=20d=C3=A9finie=20da?= =?UTF-8?q?ns=20les=20templates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/songbook_core/build.py b/songbook_core/build.py index c81affad..4b78beda 100644 --- a/songbook_core/build.py +++ b/songbook_core/build.py @@ -70,7 +70,10 @@ class Songbook(object): - config : a dictionary containing the configuration """ Song.sort = config['sort'] - Song.prefixes = config['titleprefixwords'] + if 'titleprefixwords' in config: + Song.prefixes = config['titleprefixwords'] + else: + Song.prefixes = [] Song.authwords['after'] = [ re.compile(r"^.*%s\b(.*)" % after) for after From 49165d1c945db48490201da0c198e372b6f6c004 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 16 May 2014 22:55:28 +0200 Subject: [PATCH 13/29] typo --- songbook_core/data/latex/crepbook.sty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 50559ba2..c4df7a56 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -25,7 +25,7 @@ \AtBeginDocument{ % Default names (english) \def\labelversionname{Version:} - \def\labeldatename{dDate:} + \def\labeldatename{Date:} \def\labelauthorname{aAuthors:} \def\labelwebname{Web:} \def\labelmailname{Email:} From baed32f3de7468e27466b2e88afedaf37e05fc18 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 16 May 2014 23:32:38 +0200 Subject: [PATCH 14/29] =?UTF-8?q?Correction=20:=20les=20`\and`=20sont=20?= =?UTF-8?q?=C3=A0=20nouveau=20accept=C3=A9s=20dans=20les=20noms=20d'auteur?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/data/latex/crepbook.sty | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index c4df7a56..471bf43f 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -59,8 +59,6 @@ \def\picturecopyright#1{\def\@picturecopyright{#1}} \def\footer#1{\def\@footer{#1}} -\long\def\author#1{\long\def\@author{#1}} - \def\clearheadinfo{ \author{}% \title{No title}% @@ -104,7 +102,7 @@ \begin{tabular}{l l} \if!\@version!\else{\textbf{\labelversionname}} & \@version \\ \fi \if!\@date!\else{\textbf{\labeldatename}} & \@date \\ \fi - \if!\@author!\else{\textbf{\labelauthorname}} & \@author \\ \fi + \if!\@author!\else{\textbf{\labelauthorname}} & \begin{tabular}[t]{c}\@author\end{tabular} \\ \fi \if!\@web!\else{\textbf{\labelwebname}} & \url{\@web} \\ \fi \if!\@mail!\else{\textbf{\labelmailname}} & \url{\@mail} \\ \fi \end{tabular} From 44a1c4f2fe6692b4bd5a23a779f9b94a5baac17f Mon Sep 17 00:00:00 2001 From: Luthaf Date: Fri, 16 May 2014 23:27:40 +0100 Subject: [PATCH 15/29] =?UTF-8?q?Utilisation=20de=20TeX=20au=20lieu=20de?= =?UTF-8?q?=20tabulars=20imbriqu=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/data/latex/crepbook.sty | 43 ++++++++++++++++----------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 471bf43f..68e400d8 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -26,23 +26,20 @@ % Default names (english) \def\labelversionname{Version:} \def\labeldatename{Date:} - \def\labelauthorname{aAuthors:} + \def\labelauthorname{Authors:} \def\labelwebname{Web:} \def\labelmailname{Email:} \IfStrEq{\mainlanguage}{french}{ % French names - \def\labelversionname{Version :} - \def\labeldatename{Date :} - \def\labelauthorname{Auteurs :} - \def\labelwebname{Web :} - \def\labelmailname{Mail :} + \def\labelversionname{Version~:} + \def\labeldatename{Date~:} + \def\labelauthorname{Auteurs~:} + \def\labelwebname{Web~:} + \def\labelmailname{Mail~:} }{} } -\def\andname{and} -\def\lastandname{\unskip, and} - \def\lang#1{\def\mainlanguage{#1}} @@ -86,7 +83,18 @@ \def\@titlefont{\Huge\bfseries\boldmath} \def\@subtitlefont{\large\bfseries\boldmath} + +\def\@getelement#1{\csname @#1\endcsname} +\def\@labelelement#1{\csname label#1name\endcsname} +\def\@insertelement#1{\if!\@getelement{#1}! + \else % + \@labelelement{#1}& % + \@getelement{#1} \cr % + \fi % + } + \def\@maketitle{ + \def\and{\unskip,\cr&} \begin{titlepage} \thispagestyle{empty} \begin{center} @@ -98,15 +106,14 @@ {\rule{\textwidth}{1mm}} \end{center} \vfil - \begin{flushleft} - \begin{tabular}{l l} - \if!\@version!\else{\textbf{\labelversionname}} & \@version \\ \fi - \if!\@date!\else{\textbf{\labeldatename}} & \@date \\ \fi - \if!\@author!\else{\textbf{\labelauthorname}} & \begin{tabular}[t]{c}\@author\end{tabular} \\ \fi - \if!\@web!\else{\textbf{\labelwebname}} & \url{\@web} \\ \fi - \if!\@mail!\else{\textbf{\labelmailname}} & \url{\@mail} \\ \fi - \end{tabular} - \end{flushleft} + \ialign{ + \bf{##} \hfil & ## \hfil \cr % Lines definition + \@insertelement{version} % + \@insertelement{date} % + \@insertelement{author} % + \@insertelement{web} % + \@insertelement{mail} % + } \vfil \begin{center} \includegraphics[keepaspectratio=true, width=12cm, height=12cm]{\@picture} From a4fa93062d7a657e5baf43a2d8bdf952f6c9d53b Mon Sep 17 00:00:00 2001 From: Louis Date: Sat, 17 May 2014 09:08:44 +0200 Subject: [PATCH 16/29] =?UTF-8?q?Suppression=20d'un=20commentaire=20obsol?= =?UTF-8?q?=C3=A8te?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/data/latex/tabs.sty | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/songbook_core/data/latex/tabs.sty b/songbook_core/data/latex/tabs.sty index 53df6aa3..8d1a4211 100644 --- a/songbook_core/data/latex/tabs.sty +++ b/songbook_core/data/latex/tabs.sty @@ -83,7 +83,6 @@ \renewcommand{\bar}{}% }{}% \fi% -%% End of tabs.sty file @@ -114,4 +113,4 @@ \end{tikzpicture} } -\endinput \ No newline at end of file +\endinput From 174e103c9f02d4347e23f9c9c7f5ffd378b16503 Mon Sep 17 00:00:00 2001 From: Louis Date: Sat, 17 May 2014 11:46:37 +0200 Subject: [PATCH 17/29] [templates] Isolation du \documentclass --- songbook_core/data/templates/default.tex | 6 +++++- songbook_core/data/templates/layout.tex | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/songbook_core/data/templates/default.tex b/songbook_core/data/templates/default.tex index 24705059..fb64d884 100644 --- a/songbook_core/data/templates/default.tex +++ b/songbook_core/data/templates/default.tex @@ -69,10 +69,14 @@ (* extends "songs.tex" *) (* set indexes = "titleidx,authidx" *) -(* block songbookpreambule *) +(* block songbookpackages *) (( super() )) \usepackage{chords} +(* endblock *) + +(* block songbookpreambule *) + (( super() )) \title{((title))} \author{((author))} diff --git a/songbook_core/data/templates/layout.tex b/songbook_core/data/templates/layout.tex index 3b895191..284cab7f 100644 --- a/songbook_core/data/templates/layout.tex +++ b/songbook_core/data/templates/layout.tex @@ -71,7 +71,9 @@ (* block documentclass *) \documentclass[((mainfontsize))pt]{article} +(* endblock *) +(* block songbookpackages *) \usepackage[((booktype)), (* for option in bookoptions *)((option)), (* endfor *) From a0b2b9264dfb1298b7b57c5523580b78ebbc5b6a Mon Sep 17 00:00:00 2001 From: Louis Date: Sat, 17 May 2014 11:53:51 +0200 Subject: [PATCH 18/29] orthographe --- songbook_core/data/latex/SongbookUtils.sty | 4 ++-- songbook_core/data/latex/crepbook.sty | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/songbook_core/data/latex/SongbookUtils.sty b/songbook_core/data/latex/SongbookUtils.sty index 76dde0bf..6aea62ab 100644 --- a/songbook_core/data/latex/SongbookUtils.sty +++ b/songbook_core/data/latex/SongbookUtils.sty @@ -1,6 +1,6 @@ % Songbook Package -- version 0.1 for LaTeX2e % -% This package provide macro for automatic songbook +% This package provides macro for automatic songbook % generation. See http://github.com/patacrep/songbook-core/ \NeedsTeXFormat{LaTeX2e}[1994/06/01] @@ -388,4 +388,4 @@ } } -\endinput \ No newline at end of file +\endinput diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 68e400d8..3e2c9046 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -1,6 +1,6 @@ % Crepbook Package -- version 0.1 for LaTeX2e % -% This package is intend to use with the songbook package. +% This package is intended to be used with the songbook package. % It defines some layout for automatic songbook generation. % See http://github.com/patacrep/songbook-core/ From 151f74941f70245bb74cecd356fb4452d132a1dd Mon Sep 17 00:00:00 2001 From: Louis Date: Sat, 17 May 2014 12:14:25 +0200 Subject: [PATCH 19/29] =?UTF-8?q?R=C3=A9organisation=20et=20cemmentaires?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/data/latex/SongbookUtils.sty | 129 ++++++++++++--------- songbook_core/data/latex/crepbook.sty | 8 ++ 2 files changed, 83 insertions(+), 54 deletions(-) diff --git a/songbook_core/data/latex/SongbookUtils.sty b/songbook_core/data/latex/SongbookUtils.sty index 6aea62ab..126eaba0 100644 --- a/songbook_core/data/latex/SongbookUtils.sty +++ b/songbook_core/data/latex/SongbookUtils.sty @@ -223,12 +223,16 @@ % End of the new informations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Lilypond + % On-the-fly compilation of lilypond files \iflilypondauto \epstopdfDeclareGraphicsRule{.ly}{pdf}{.pdf}{lilypond --format=pdf --output=\Gin@base\ETE@suffix\space #1} \AppendGraphicsExtensions{.ly} \fi +% Conditional inclusion of lilypond sheet music. \newcommand{\lilypond}[1]{% \iflilypond% \includegraphics{\currfiledir#1}% @@ -239,7 +243,10 @@ \includegraphics{#1}% \fi% } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Useful commands \newcommand{\image}[2][]{% \ifpictures% \begin{flushright}% @@ -276,60 +283,6 @@ \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 \renewcommand{\FrameCommand}[1]{ \begin{tikzpicture} @@ -353,6 +306,27 @@ \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{} \newcommand{\transposition}[1]{% \ifrepeatchords% @@ -365,6 +339,7 @@ \fi% }% +% Definition of environment "tab" \iftabs \RequirePackage{tabs} \else @@ -372,6 +347,51 @@ \newenvironment{tab}{\comment}{\endcomment} \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 \renewcommand{\textnote}[2][]{% \vspace{.1cm} @@ -387,5 +407,6 @@ \iflanguage{#1}{\@musicnoteold{#2}}{} } } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \endinput diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 3e2c9046..c02a41cb 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -46,6 +46,7 @@ % End of multilanguage management %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Title page \long\def\subtitle#1{\long\def\@subtitle{#1}} \def\version#1{\def\@version{#1}} @@ -127,7 +128,9 @@ \end{flushright} \end{titlepage} } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Fancy capo \iffancycapo % \newlength{\capoheight} @@ -142,7 +145,9 @@ }% } \fi +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Fonts definitions \def\chordfont#1{\gdef\@chordfont{#1}} \def\@chordfont{\small\it} @@ -151,8 +156,10 @@ \renewcommand{\idxauthfont}{\sffamily\bfseries} \renewcommand{\idxheadfont}{\sffamily\it\LARGE} \renewcommand{\idxrefsfont}{\bfseries} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Configuration of the songs package \titleprefixword{} \renewcommand{\stitlefont}{\LARGE\bf} @@ -162,5 +169,6 @@ \renewcommand{\showauthors}{% \hbox{\normalsize\songauthors}% } +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \endinput From a69219e8cb02bae31b5ad4390cb11050396c33b4 Mon Sep 17 00:00:00 2001 From: Louis Date: Sat, 17 May 2014 12:44:32 +0200 Subject: [PATCH 20/29] Commentaires --- songbook_core/data/latex/SongbookUtils.sty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/songbook_core/data/latex/SongbookUtils.sty b/songbook_core/data/latex/SongbookUtils.sty index 126eaba0..e1669b93 100644 --- a/songbook_core/data/latex/SongbookUtils.sty +++ b/songbook_core/data/latex/SongbookUtils.sty @@ -390,7 +390,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% TODO: Move this stuff to crepbook.sty? -- spalax +% Enhance \textnote and \musicnote, to display them according to the current language. \let\@textnoteold\textnote \renewcommand{\textnote}[2][]{% From 0ef22fa6a42240a2315f4b6654ee9153c68c5816 Mon Sep 17 00:00:00 2001 From: Louis Date: Sat, 17 May 2014 12:52:02 +0200 Subject: [PATCH 21/29] Commentaires --- songbook_core/data/latex/crepbook.sty | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index c02a41cb..1954dd59 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -156,12 +156,6 @@ \renewcommand{\idxauthfont}{\sffamily\bfseries} \renewcommand{\idxheadfont}{\sffamily\it\LARGE} \renewcommand{\idxrefsfont}{\bfseries} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Configuration of the songs package -\titleprefixword{} \renewcommand{\stitlefont}{\LARGE\bf} \renewcommand{\printchord}[1]{\@chordfont #1} \renewcommand{\chorusfont}{\it} @@ -169,6 +163,8 @@ \renewcommand{\showauthors}{% \hbox{\normalsize\songauthors}% } + +\titleprefixword{} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \endinput From cdad575fb00fff5e7611ab1de6c084c1b0378082 Mon Sep 17 00:00:00 2001 From: Louis Date: Tue, 20 May 2014 23:29:54 +0200 Subject: [PATCH 22/29] Ajout des sections dans les exemples --- songbook_core/data/examples/example-layout.sb | 9 ++++++++- songbook_core/data/examples/example-patacrep.sb | 9 ++++++++- songbook_core/data/examples/example-songs.sb | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/songbook_core/data/examples/example-layout.sb b/songbook_core/data/examples/example-layout.sb index 56e545de..e252ed5d 100644 --- a/songbook_core/data/examples/example-layout.sb +++ b/songbook_core/data/examples/example-layout.sb @@ -11,5 +11,12 @@ "authwords" : { "sep" : ["and", "et"] }, - "datadir" : "." + "datadir" : ".", + "content" : [["section", "Traditional"], + "chevaliers_de_la_table_ronde.sg", + "greensleeves.sg", + "vent_frais.sg", + ["section", "Example"], + "example-fr.sg", + "example-en.sg"] } diff --git a/songbook_core/data/examples/example-patacrep.sb b/songbook_core/data/examples/example-patacrep.sb index bd722524..dcb27587 100644 --- a/songbook_core/data/examples/example-patacrep.sb +++ b/songbook_core/data/examples/example-patacrep.sb @@ -11,5 +11,12 @@ "authwords" : { "sep" : ["and", "et"] }, - "datadir" : "." + "datadir" : ".", + "content" : [["section", "Traditional"], + "chevaliers_de_la_table_ronde.sg", + "greensleeves.sg", + "vent_frais.sg", + ["section", "Example"], + "example-fr.sg", + "example-en.sg"] } diff --git a/songbook_core/data/examples/example-songs.sb b/songbook_core/data/examples/example-songs.sb index 668eaca3..40ed8ebc 100644 --- a/songbook_core/data/examples/example-songs.sb +++ b/songbook_core/data/examples/example-songs.sb @@ -11,5 +11,12 @@ "authwords" : { "sep" : ["and", "et"] }, - "datadir" : "." + "datadir" : ".", + "content" : [["section", "Traditional"], + "chevaliers_de_la_table_ronde.sg", + "greensleeves.sg", + "vent_frais.sg", + ["section", "Example"], + "example-fr.sg", + "example-en.sg"] } From fb4095fa7750d0e31cb426d30594a5fba6171763 Mon Sep 17 00:00:00 2001 From: Louis Date: Tue, 20 May 2014 23:30:37 +0200 Subject: [PATCH 23/29] [WIP] Application des discussions sur les packages Discussions : - http://github.com/patacrep/songbook-core/pull/32#issuecomment-43410215 - http://github.com/patacrep/songbook-core/commit/ba15ad1093fd28103521feed923b764102be8923#commitcomment-6359206 --- songbook_core/data/latex/SongbookUtils.sty | 30 ++---------------- songbook_core/data/latex/crepbook.sty | 36 +++++++++++++++++++--- songbook_core/data/latex/tabs.sty | 34 -------------------- songbook_core/data/templates/default.tex | 9 ------ songbook_core/data/templates/layout.tex | 7 ----- songbook_core/data/templates/patacrep.tex | 21 +++++++++++++ songbook_core/data/templates/songs.tex | 17 +++++++++- 7 files changed, 72 insertions(+), 82 deletions(-) diff --git a/songbook_core/data/latex/SongbookUtils.sty b/songbook_core/data/latex/SongbookUtils.sty index e1669b93..e6de97c8 100644 --- a/songbook_core/data/latex/SongbookUtils.sty +++ b/songbook_core/data/latex/SongbookUtils.sty @@ -9,14 +9,6 @@ \RequirePackage{graphicx,xcolor} % \RequirePackage{epstopdf} % \RequirePackage{fancybox} -\definecolor{tango-green-3}{HTML}{4e9a06} -\definecolor{tango-blue-3}{HTML}{204a87} -\RequirePackage[bookmarks, - bookmarksopen, - hyperfigures=true, - colorlinks=true, - linkcolor=tango-green-3, - urlcolor=tango-blue-3]{hyperref} \RequirePackage{xstring} \RequirePackage{framed} \RequirePackage{currfile} @@ -75,6 +67,8 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Multilanguage management +\def\lang#1{\def\mainlanguage{#1}} + \AtBeginDocument{ % Default names (english) \def\songlistname{Songs list} @@ -91,7 +85,7 @@ \def\songindexname{Songs Index} \def\authorindexname{Authors Index} \def\chordlistname{Chords list} - + \IfStrEq{\mainlanguage}{french}{ % French names \def\songlistname{Liste des chansons} @@ -350,24 +344,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% 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? diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 1954dd59..3ad6dc05 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -1,6 +1,7 @@ % Crepbook Package -- version 0.1 for LaTeX2e % -% This package is intended to be used with the songbook package. +% This package is intended to be used with the songbook Python program (and its +% interfaces). % It defines some layout for automatic songbook generation. % See http://github.com/patacrep/songbook-core/ @@ -19,6 +20,36 @@ \fancycapotrue \fi +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Custom hyperref options +\definecolor{tango-green-3}{HTML}{4e9a06} +\definecolor{tango-blue-3}{HTML}{204a87} +\RequirePackage[bookmarks, + bookmarksopen, + hyperfigures=true, + colorlinks=true, + linkcolor=tango-green-3, + urlcolor=tango-blue-3]{hyperref} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% 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} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Multilanguage management @@ -40,9 +71,6 @@ }{} } - -\def\lang#1{\def\mainlanguage{#1}} - % End of multilanguage management %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/songbook_core/data/latex/tabs.sty b/songbook_core/data/latex/tabs.sty index 8d1a4211..28a7cd66 100644 --- a/songbook_core/data/latex/tabs.sty +++ b/songbook_core/data/latex/tabs.sty @@ -77,40 +77,6 @@ { \end{tikzpicture} } -\else% -\newenvironment{tab}{% - \newcommand{\single}[2]{}% - \renewcommand{\bar}{}% -}{}% \fi% - - -\let\musicnoteORIG\musicnote -\renewcommand{\musicnote}[2][]{% - \vspace{.1cm} - \IfStrEq{}{#1}{\musicnoteORIG{#2}}{ - \iflanguage{#1}{\musicnoteORIG{#2}}{} - } -} - -\let\textnoteORIG\textnote -\renewcommand{\textnote}[2][]{% - \vspace{.1cm} - \IfStrEq{}{#1}{\textnoteORIG{#2}}{ - \iflanguage{#1}{\textnoteORIG{#2}}{} - } -} - -\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} -} - \endinput diff --git a/songbook_core/data/templates/default.tex b/songbook_core/data/templates/default.tex index fb64d884..1ba62c4a 100644 --- a/songbook_core/data/templates/default.tex +++ b/songbook_core/data/templates/default.tex @@ -80,15 +80,6 @@ \title{((title))} \author{((author))} - \subtitle{((subtitle))} - (* if version!="unknown" *) - \version{((version))} - (* endif *) - \mail{((mail))} - \web{((web))} - \picture{((picture))} - \picturecopyright{((picturecopyright))} - \footer{((footer))} \newindex{titleidx}{((filename))_title} \newauthorindex{authidx}{((filename))_auth} diff --git a/songbook_core/data/templates/layout.tex b/songbook_core/data/templates/layout.tex index 284cab7f..b7897ceb 100644 --- a/songbook_core/data/templates/layout.tex +++ b/songbook_core/data/templates/layout.tex @@ -74,19 +74,12 @@ (* endblock *) (* block songbookpackages *) -\usepackage[((booktype)), - (* for option in bookoptions *)((option)), - (* endfor *) - (* for instrument in instruments *)((instrument)), - (* endfor *)]{crepbook} (* endblock *) (* block songbookpreambule *) \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} - - \lang{((lang))} (* endblock songbookpreambule *) (* block preambule *) diff --git a/songbook_core/data/templates/patacrep.tex b/songbook_core/data/templates/patacrep.tex index 94ba4db4..afe2dbe7 100644 --- a/songbook_core/data/templates/patacrep.tex +++ b/songbook_core/data/templates/patacrep.tex @@ -43,6 +43,17 @@ (* extends "default.tex" *) +(* block songbookpackages *) + (( super() )) + +\usepackage[((booktype)), + (* for option in bookoptions *)((option)), + (* endfor *) + (* for instrument in instruments *)((instrument)), + (* endfor *)]{crepbook} + \usepackage{chords} +(* endblock *) + (* block songbookpreambule *) \usepackage[ a4paper % paper size @@ -64,4 +75,14 @@ \renewcommand{\snumbgcolor}{SongNumberBgColor} \renewcommand{\notebgcolor}{NoteBgColor} \renewcommand{\idxbgcolor}{IndexBgColor} + + \subtitle{((subtitle))} + (* if version!="unknown" *) + \version{((version))} + (* endif *) + \mail{((mail))} + \web{((web))} + \picture{((picture))} + \picturecopyright{((picturecopyright))} + \footer{((footer))} (* endblock *) diff --git a/songbook_core/data/templates/songs.tex b/songbook_core/data/templates/songs.tex index 8ae2bf26..2ead6152 100644 --- a/songbook_core/data/templates/songs.tex +++ b/songbook_core/data/templates/songs.tex @@ -21,16 +21,31 @@ (* extends "layout.tex" *) -(* block songbookpreambule *) +(* block songbookpackages *) (( super() )) +\usepackage[((booktype)), + (* for option in bookoptions *)((option)), + (* endfor *) + (* for instrument in instruments *)((instrument)), + (* endfor *)]{SongbookUtils} +(* endblock *) + +(* block songbookpreambule *) + (( super() )) (* for lang in content.languages() *) \PassOptionsToPackage{((lang))}{babel} (* endfor *) \usepackage[((lang))]{babel} + \lang{((lang))} + \usepackage{graphicx} \graphicspath{{((datadir))/img/}} + + \makeatletter + \@ifpackageloaded{hyperref}{}{\newcommand{\phantomsection}{}} + \makeatother (* endblock *) (* block songs *) From 5ad709d0cf2df34553d92fa6ca46160aa100ca36 Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 21 May 2014 11:28:10 +0200 Subject: [PATCH 24/29] =?UTF-8?q?D=C3=A9placement=20du=20chargement=20de?= =?UTF-8?q?=20hyperref=20du=20paquet=20au=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/data/latex/crepbook.sty | 12 ------------ songbook_core/data/templates/patacrep.tex | 10 ++++++++++ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 3ad6dc05..3488ddec 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -20,18 +20,6 @@ \fancycapotrue \fi -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Custom hyperref options -\definecolor{tango-green-3}{HTML}{4e9a06} -\definecolor{tango-blue-3}{HTML}{204a87} -\RequirePackage[bookmarks, - bookmarksopen, - hyperfigures=true, - colorlinks=true, - linkcolor=tango-green-3, - urlcolor=tango-blue-3]{hyperref} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Layout tweaks diff --git a/songbook_core/data/templates/patacrep.tex b/songbook_core/data/templates/patacrep.tex index afe2dbe7..0b4569c2 100644 --- a/songbook_core/data/templates/patacrep.tex +++ b/songbook_core/data/templates/patacrep.tex @@ -76,6 +76,16 @@ \renewcommand{\notebgcolor}{NoteBgColor} \renewcommand{\idxbgcolor}{IndexBgColor} + \definecolor{tango-green-3}{HTML}{4e9a06} + \definecolor{tango-blue-3}{HTML}{204a87} + \usepackage[bookmarks, + bookmarksopen, + hyperfigures=true, + colorlinks=true, + linkcolor=tango-green-3, + urlcolor=tango-blue-3]{hyperref} + + \subtitle{((subtitle))} (* if version!="unknown" *) \version{((version))} From f1af4df7e55e466caea93377b349601c51570e0a Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 21 May 2014 11:28:40 +0200 Subject: [PATCH 25/29] =?UTF-8?q?Am=C3=A9lioration=20du=20chargement=20de?= =?UTF-8?q?=20SongbookUtils=20et=20crepbook?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suite à cette discussion : https://github.com/patacrep/songbook-core/commit/ba15ad1093fd28103521feed923b764102be8923#commitcomment-6391205 --- songbook_core/data/templates/default.tex | 7 ++----- songbook_core/data/templates/patacrep.tex | 3 --- songbook_core/data/templates/songs.tex | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/songbook_core/data/templates/default.tex b/songbook_core/data/templates/default.tex index 1ba62c4a..491fb828 100644 --- a/songbook_core/data/templates/default.tex +++ b/songbook_core/data/templates/default.tex @@ -69,15 +69,12 @@ (* extends "songs.tex" *) (* set indexes = "titleidx,authidx" *) -(* block songbookpackages *) - (( super() )) - - \usepackage{chords} -(* endblock *) (* block songbookpreambule *) (( super() )) + \usepackage{chords} + \title{((title))} \author{((author))} diff --git a/songbook_core/data/templates/patacrep.tex b/songbook_core/data/templates/patacrep.tex index 0b4569c2..573e7051 100644 --- a/songbook_core/data/templates/patacrep.tex +++ b/songbook_core/data/templates/patacrep.tex @@ -44,14 +44,11 @@ (* extends "default.tex" *) (* block songbookpackages *) - (( super() )) - \usepackage[((booktype)), (* for option in bookoptions *)((option)), (* endfor *) (* for instrument in instruments *)((instrument)), (* endfor *)]{crepbook} - \usepackage{chords} (* endblock *) (* block songbookpreambule *) diff --git a/songbook_core/data/templates/songs.tex b/songbook_core/data/templates/songs.tex index 2ead6152..a2b5ba7f 100644 --- a/songbook_core/data/templates/songs.tex +++ b/songbook_core/data/templates/songs.tex @@ -22,8 +22,6 @@ (* extends "layout.tex" *) (* block songbookpackages *) - (( super() )) - \usepackage[((booktype)), (* for option in bookoptions *)((option)), (* endfor *) From fc93b1059db8deb6ea76d616a0d3e5c24efa2527 Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 21 May 2014 17:45:26 +0200 Subject: [PATCH 26/29] Documentation des options --- songbook_core/data/latex/SongbookUtils.sty | 17 ++++++++++++++--- songbook_core/data/latex/crepbook.sty | 3 +++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/songbook_core/data/latex/SongbookUtils.sty b/songbook_core/data/latex/SongbookUtils.sty index e6de97c8..251e1063 100644 --- a/songbook_core/data/latex/SongbookUtils.sty +++ b/songbook_core/data/latex/SongbookUtils.sty @@ -15,36 +15,47 @@ \RequirePackage{ifthen} \RequirePackage{tikz} +% tabs: display the guitar tabs \newif{\iftabs} \DeclareOption{tabs}{\tabstrue} +% lilypond: display Lilypond music sheets \newif{\iflilypond} \DeclareOption{lilypond}{\lilypondtrue} \newif{\iflilypondauto} \DeclareOption{lilypond}{\lilypondautotrue\lilypondtrue} +% diagram: display chord diagrams at the beginning \newif{\ifdiagram} \DeclareOption{diagram}{\diagramtrue} +% importantdiagramonly: only display important chords \newif{\ifimportantdiagramonly} \DeclareOption{importantdiagramonly}{\importantdiagramonlytrue\diagramtrue} +% pictures: display song covers and songbook titlepage picture \newif{\ifpictures} \DeclareOption{pictures}{\picturestrue} +% repeatchords: display chords in every verse if the song allows it \newif{\ifrepeatchords} \DeclareOption{repeatchords}{\repeatchordstrue} +% onesongperpage: force single page for each song +\newif{\ifonesongperpage} +\DeclareOption{onesongperpage}{\onesongperpagetrue} + +%%% Instruments +% ukulele: display ukulele tabs \newif{\ifukulele} \DeclareOption{ukulele}{\ukuleletrue} +% guitar: display guitar tabs \newif{\ifguitar} \DeclareOption{guitar}{\guitartrue} -\newif{\ifonesongperpage} -\DeclareOption{onesongperpage}{\onesongperpagetrue} - +% Remaining options are passed to the songs package \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{songs}} \ProcessOptions\relax diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 3488ddec..85e09861 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -8,8 +8,11 @@ \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{crepbook}[2014/04/13 Crepbook Package, version 0.1] +% fancy-capo: TODO \newif{\iffancycapo} \DeclareOption{fancy-capo}{\fancycapotrue} + +% Remaining options are passed to the SongbookUtils package \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{SongbookUtils}} \ProcessOptions\relax From ca9ffe3347393eca802dbd721867896ea822b472 Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 21 May 2014 17:53:07 +0200 Subject: [PATCH 27/29] =?UTF-8?q?Ajout=20d'une=20option=20'nocustomtitle'?= =?UTF-8?q?=20pour=20d=C3=A9sactiver=20la=20modification=20de=20la=20page?= =?UTF-8?q?=20de=20titre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/data/latex/crepbook.sty | 111 ++++++++++++++------------ 1 file changed, 60 insertions(+), 51 deletions(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 85e09861..0f9d2d34 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -12,6 +12,11 @@ \newif{\iffancycapo} \DeclareOption{fancy-capo}{\fancycapotrue} +% nocustomtitle: Disable title page fancy definition (back to LaTeX default) +\newif{\ifcustomtitle} +\customtitletrue +\DeclareOption{nocustomtitle}{\customtitlefalse} + % Remaining options are passed to the SongbookUtils package \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{SongbookUtils}} @@ -90,63 +95,67 @@ \clearheadinfo -\def\maketitle{ - \@maketitle - \clearheadinfo -} +\ifcustomtitle + \def\maketitle{ + \@maketitle + \clearheadinfo + } +\fi \newcounter{@inst} \newcounter{@auth} \newcounter{auco} -\def\@titlefont{\Huge\bfseries\boldmath} -\def\@subtitlefont{\large\bfseries\boldmath} - - -\def\@getelement#1{\csname @#1\endcsname} -\def\@labelelement#1{\csname label#1name\endcsname} -\def\@insertelement#1{\if!\@getelement{#1}! - \else % - \@labelelement{#1}& % - \@getelement{#1} \cr % - \fi % - } - -\def\@maketitle{ - \def\and{\unskip,\cr&} - \begin{titlepage} - \thispagestyle{empty} - \begin{center} - {\rule{\textwidth}{1mm}} - {\@titlefont\@title\par} - \if!\@subtitle!\else - {\hfil\@subtitlefont\@subtitle\par} - \fi - {\rule{\textwidth}{1mm}} - \end{center} - \vfil - \ialign{ - \bf{##} \hfil & ## \hfil \cr % Lines definition - \@insertelement{version} % - \@insertelement{date} % - \@insertelement{author} % - \@insertelement{web} % - \@insertelement{mail} % - } - \vfil - \begin{center} - \includegraphics[keepaspectratio=true, width=12cm, height=12cm]{\@picture} - \vskip1em - {\hfil\hbox{\small \@picturecopyright}} - \end{center} - \begin{flushright} - \vfil - {\hfil\rule{.4\textwidth}{.75pt}\par} - \@footer - \end{flushright} - \end{titlepage} -} +\ifcustomtitle + \def\@titlefont{\Huge\bfseries\boldmath} + \def\@subtitlefont{\large\bfseries\boldmath} + + + \def\@getelement#1{\csname @#1\endcsname} + \def\@labelelement#1{\csname label#1name\endcsname} + \def\@insertelement#1{\if!\@getelement{#1}! + \else % + \@labelelement{#1}& % + \@getelement{#1} \cr % + \fi % + } + + \def\@maketitle{ + \def\and{\unskip,\cr&} + \begin{titlepage} + \thispagestyle{empty} + \begin{center} + {\rule{\textwidth}{1mm}} + {\@titlefont\@title\par} + \if!\@subtitle!\else + {\hfil\@subtitlefont\@subtitle\par} + \fi + {\rule{\textwidth}{1mm}} + \end{center} + \vfil + \ialign{ + \bf{##} \hfil & ## \hfil \cr % Lines definition + \@insertelement{version} % + \@insertelement{date} % + \@insertelement{author} % + \@insertelement{web} % + \@insertelement{mail} % + } + \vfil + \begin{center} + \includegraphics[keepaspectratio=true, width=12cm, height=12cm]{\@picture} + \vskip1em + {\hfil\hbox{\small \@picturecopyright}} + \end{center} + \begin{flushright} + \vfil + {\hfil\rule{.4\textwidth}{.75pt}\par} + \@footer + \end{flushright} + \end{titlepage} + } +\fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% From 3ea3be98a19448dfcb1fdb9c274c6de324093b8f Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 21 May 2014 17:55:59 +0200 Subject: [PATCH 28/29] =?UTF-8?q?Ajout=20d=20'une=20option=20=20'nocustomf?= =?UTF-8?q?onts'=20pour=20d=C3=A9sactiver=20la=20red=C3=A9finition=20des?= =?UTF-8?q?=20fontes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- songbook_core/data/latex/crepbook.sty | 35 ++++++++++++++++----------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 0f9d2d34..23d2fa50 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -17,6 +17,11 @@ \customtitletrue \DeclareOption{nocustomtitle}{\customtitlefalse} +% nocustomfonts: Disable fancy fonts definition (back to LaTeX default) +\newif{\ifcustomfonts} +\customfontstrue +\DeclareOption{nocustomfonts}{\customfontsfalse} + % Remaining options are passed to the SongbookUtils package \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{SongbookUtils}} @@ -177,20 +182,22 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Fonts definitions -\def\chordfont#1{\gdef\@chordfont{#1}} -\def\@chordfont{\small\it} - -\renewcommand{\idxtitlefont}{\sffamily\bfseries} -\renewcommand{\idxauthfont}{\sffamily\bfseries} -\renewcommand{\idxheadfont}{\sffamily\it\LARGE} -\renewcommand{\idxrefsfont}{\bfseries} -\renewcommand{\stitlefont}{\LARGE\bf} -\renewcommand{\printchord}[1]{\@chordfont #1} -\renewcommand{\chorusfont}{\it} -\renewcommand{\lyricfont}{\normalfont\normalsize} -\renewcommand{\showauthors}{% - \hbox{\normalsize\songauthors}% -} +\ifcustomfonts + \def\chordfont#1{\gdef\@chordfont{#1}} + \def\@chordfont{\small\it} + + \renewcommand{\idxtitlefont}{\sffamily\bfseries} + \renewcommand{\idxauthfont}{\sffamily\bfseries} + \renewcommand{\idxheadfont}{\sffamily\it\LARGE} + \renewcommand{\idxrefsfont}{\bfseries} + \renewcommand{\stitlefont}{\LARGE\bf} + \renewcommand{\printchord}[1]{\@chordfont #1} + \renewcommand{\chorusfont}{\it} + \renewcommand{\lyricfont}{\normalfont\normalsize} + \renewcommand{\showauthors}{% + \hbox{\normalsize\songauthors}% + } +\fi \titleprefixword{} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% From cbab1bda49f1aa6ccd5394cf078a3b705337002f Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 21 May 2014 18:37:32 +0200 Subject: [PATCH 29/29] Documentation --- songbook_core/data/latex/crepbook.sty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/songbook_core/data/latex/crepbook.sty b/songbook_core/data/latex/crepbook.sty index 23d2fa50..45d8735c 100644 --- a/songbook_core/data/latex/crepbook.sty +++ b/songbook_core/data/latex/crepbook.sty @@ -8,7 +8,7 @@ \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{crepbook}[2014/04/13 Crepbook Package, version 0.1] -% fancy-capo: TODO +% fancy-capo: When a capo is necessary, use a picture instead of text. \newif{\iffancycapo} \DeclareOption{fancy-capo}{\fancycapotrue}