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":"lang", "description":"Language", "default":"english"},
%%: {"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":"subtitle", "description":"Subtitle"},
%%: {"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":"lang", "description":"Language", "default":"english"},
%%: {"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"}
%%:]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -40,19 +40,14 @@
\usepackage[portuguese,spanish,english,french]{babel}
\lang{\getlang}
\newindex{titleidx}{\getname_title}
\newauthorindex{authidx}{\getname_auth}
\graphicspath{ {covers/}, {img/} }
%hide song number
\renewcommand{\printsongnum}[1]{}
\setlength{\songnumwidth}{0.1cm}
\nosongnumbers
\pagestyle{empty}
\begin{document}
\begin{songs}{titleidx,authidx}
\begin{songs}{}
\getsongslist
\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":"lang", "description":"Language", "default":"english"},
%%: {"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":"subtitle", "description":"Subtitle"},
%%: {"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":"lang", "description":"Language", "default":"french"},
%%: {"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":"subtitle", "description":"Subtitle"},
%%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"},

19
tex/crepbook.cls

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

Loading…
Cancel
Save