Browse Source

add option for one song per page

remotes/karagrat/master
Romain Goffe 13 years ago
parent
commit
30a42c1f0f
  1. 2
      templates/ancient.tmpl
  2. 13
      templates/minimal.tmpl
  3. 2
      templates/patacrep-en.tmpl
  4. 2
      templates/patacrep.tmpl
  5. 19
      tex/crepbook.cls

2
templates/ancient.tmpl

@ -30,7 +30,7 @@
%%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true},
%%: {"name":"lang", "description":"Language", "default":"english"}, %%: {"name":"lang", "description":"Language", "default":"english"},
%%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]}, %%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]},
%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","pictures","tabs"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, %%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs","repeatchords","onesongperpage"], "join":",", "mandatory":true, "default":["diagram","pictures"]},
%%: {"name":"version", "description":"Version", "default":"3.5.5"}, %%: {"name":"version", "description":"Version", "default":"3.5.5"},
%%: {"name":"subtitle", "description":"Subtitle"}, %%: {"name":"subtitle", "description":"Subtitle"},
%%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, %%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"},

13
templates/minimal.tmpl

@ -28,7 +28,7 @@
%%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true},
%%: {"name":"lang", "description":"Language", "default":"english"}, %%: {"name":"lang", "description":"Language", "default":"english"},
%%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]}, %%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]},
%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","tabs","pictures"], "join":",", "mandatory":true, "default":["pictures"]}, %%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs","repeatchords","onesongperpage"], "join":",", "mandatory":true, "default":["pictures"]},
%%: {"name":"mainfontsize", "description":"Font Size", "type":"font", "default":"10"} %%: {"name":"mainfontsize", "description":"Font Size", "type":"font", "default":"10"}
%%:] %%:]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -40,19 +40,14 @@
\usepackage[portuguese,spanish,english,french]{babel} \usepackage[portuguese,spanish,english,french]{babel}
\lang{\getlang} \lang{\getlang}
\newindex{titleidx}{\getname_title}
\newauthorindex{authidx}{\getname_auth}
\graphicspath{ {covers/}, {img/} } \graphicspath{ {covers/}, {img/} }
%hide song number \nosongnumbers
\renewcommand{\printsongnum}[1]{} \pagestyle{empty}
\setlength{\songnumwidth}{0.1cm}
\begin{document} \begin{document}
\begin{songs}{titleidx,authidx} \begin{songs}{}
\getsongslist \getsongslist
\end{songs} \end{songs}

2
templates/patacrep-en.tmpl

@ -30,7 +30,7 @@
%%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true},
%%: {"name":"lang", "description":"Language", "default":"english"}, %%: {"name":"lang", "description":"Language", "default":"english"},
%%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]}, %%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]},
%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","lilypond","pictures","tabs"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, %%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs","repeatchords","onesongperpage"], "join":",", "mandatory":true, "default":["diagram","pictures"]},
%%: {"name":"version", "description":"Version", "default":"3.5.5"}, %%: {"name":"version", "description":"Version", "default":"3.5.5"},
%%: {"name":"subtitle", "description":"Subtitle"}, %%: {"name":"subtitle", "description":"Subtitle"},
%%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, %%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"},

2
templates/patacrep.tmpl

@ -30,7 +30,7 @@
%%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true}, %%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true},
%%: {"name":"lang", "description":"Language", "default":"french"}, %%: {"name":"lang", "description":"Language", "default":"french"},
%%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]}, %%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]},
%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs","repeatchords"], "join":",", "mandatory":true, "default":["diagram","pictures"]}, %%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs","repeatchords","onesongperpage"], "join":",", "mandatory":true, "default":["diagram","pictures"]},
%%: {"name":"version", "description":"Version", "default":"3.5.5"}, %%: {"name":"version", "description":"Version", "default":"3.5.5"},
%%: {"name":"subtitle", "description":"Subtitle"}, %%: {"name":"subtitle", "description":"Subtitle"},
%%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"}, %%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"},

19
tex/crepbook.cls

@ -15,6 +15,7 @@
\newif{\ifnorepeatchords} \newif{\ifnorepeatchords}
\newif{\ifukulele} \newif{\ifukulele}
\newif{\ifguitar} \newif{\ifguitar}
\newif{\ifonesongperpage}
\tabsfalse \tabsfalse
\lilypondfalse \lilypondfalse
@ -24,6 +25,7 @@
\norepeatchordstrue \norepeatchordstrue
\ukulelefalse \ukulelefalse
\guitarfalse \guitarfalse
\onesongperpagefalse
% Options % Options
\DeclareOption{tabs}{\tabstrue} \DeclareOption{tabs}{\tabstrue}
@ -41,6 +43,7 @@
\DeclareOption{noukulele}{\ukulelefalse} \DeclareOption{noukulele}{\ukulelefalse}
\DeclareOption{guitar}{\guitartrue} \DeclareOption{guitar}{\guitartrue}
\DeclareOption{noguitar}{\guitarfalse} \DeclareOption{noguitar}{\guitarfalse}
\DeclareOption{onesongperpage}{\onesongperpagetrue}
\DeclareOption{10pt}{\PassOptionsToClass{\CurrentOption}{article}} \DeclareOption{10pt}{\PassOptionsToClass{\CurrentOption}{article}}
\DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{article}} \DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{article}}
@ -503,4 +506,20 @@
\fi \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
\makeatother \makeatother

Loading…
Cancel
Save