songbook [from: Songs data for LaTeX songbooks http:///www.patacrep.com]
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

154 lines
4.9 KiB

% Copyright (C) 2014 The Patacrep Team
% Copyright (C) 2009-2010 Romain Goffe, Alexandre Dupas
% Copyright (C) 2008 Kevin W. Hamlen
%
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version 2
% of the License, or (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
% MA 02110-1301, USA.
(* variables *)
{
"version":{ "description": {"english": "Version", "french": "Version"},
"default": {"default": "3.7.2"}
},
"chordfont":{ "description": {"english": "Chord font",
"french": "Police des accords"},
"default": {"default": "i"}
},
"chordcolor":{ "description": {"english": "Chord color, HTML notation",
"french": "Couleur des accords en notation HTML"},
"default": {"default": "000000"}
},
"versefont":{ "description": {"english": "Verse font",
"french": "Police des couplets"},
"default": {"default": ""}
},
"chorusfont":{ "description": {"english": "Chorus font",
"french": "Police des refrains"},
"default": {"default": "i"}
},
"papersize":{ "description": {"english": "Paper size.",
"french": "Taille du papier."},
"default": {"default":"A4"}
},
"width":{ "description": {"english": "Width.",
"french": "Largeur."},
"default": {"default":"210"}
},
"height":{ "description": {"english": "Height.",
"french": "Hauteur."},
"default": {"default":"297"}
},
"margin_top":{ "description": {"english": "Margin top.",
"french": "Marge en haut."},
"default": {"default":"13"}
},
"margin_right":{ "description": {"english": "Margin right.",
"french": "Marge à droite."},
"default": {"default":"18"}
},
"margin_bottom":{ "description": {"english": "Margin bottom.",
"french": "Marge en bas."},
"default": {"default":"13"}
},
"margin_left":{ "description": {"english": "Margin left.",
"french": "Marge à gauche."},
"default": {"default":"18"}
},
"bindingoffset":{ "description": {"english": "Binding offset.",
"french": "Reliure."},
"default": {"default":"0"}
},
"orientation":{ "description": {"english": "Paper orientation.",
"french": "Orientation du papier."},
"type": "enum",
"values": {"landscape": {"english": "Landscape", "french": "Paysage" },
"portrait": {"english": "Portrait", "french": "Portrait" }
},
"default": {"default":"portrait"}
}
}
(* endvariables *)
% begin document
(* extends "patacrep.tex" *)
(* block preambule *)
\usepackage{licence}
%! Font management
\makeatletter
\renewcommand{\chorusfont}{%
(* for letter in chorusfont *)
(* if letter=="i" *) \it %
(* elif letter=='b' *) \bf %
(* elif letter=='n' *) \normalfont %
(* endif *)
(* endfor *)
}
\def\@chordfont{%
(* for letter in chordfont *)
(* if letter=="i" *) \it %
(* elif letter=='b' *) \bf %
(* elif letter=='n' *) \normalfont %
(* endif *)
(* endfor *)
}
\definecolor{ChordColor}{HTML}{(( chordcolor ))}
\renewcommand{\printchord}[1]{\@chordfont\textcolor{ChordColor}{#1}}
\renewcommand{\lyricfont}{%
(* for letter in versefont *)
(* if letter=="i" *) \it %
(* elif letter=='b' *) \bf %
(* elif letter=='n' *) \normalfont %
(* endif *)
(* endfor *)
}
\makeatother
%! End of font management
\geometry{
total={((width))mm,((height))mm}
,left=((margin_left))mm
,right=((margin_right))mm
,top=((margin_top))mm
,bottom=((margin_bottom))mm
,asymmetric
,bindingoffset=((bindingoffset))mm % space reserved to bound pages together
}
%! Temporary hack for columns management
\let\OldSongColumns=\songcolumns
\def\songcolumns#1{%
(* if orientation=="portrait" and papersize=="A5" *)
\OldSongColumns{1}
(* elif orientation=="landscape" and papersize=="A4" *)
\count0=#1\relax\advance\count0 by 1\relax%
\OldSongColumns{\count0}
(* else *)
\OldSongColumns{#1}
(* endif *)
}
%! End of columns management
(* endblock *)
(* block preface *)
% Licence
\newpage
\input{license}
\newpage
(* endblock *)
% end document