|
@ -18,52 +18,61 @@ |
|
|
% MA 02110-1301, USA. |
|
|
% MA 02110-1301, USA. |
|
|
|
|
|
|
|
|
(* variables *) |
|
|
(* variables *) |
|
|
{ |
|
|
schema: |
|
|
"version":{ "description": {"english": "Version", "french": "Version"}, |
|
|
type: //rec |
|
|
"default": {"default": "3.7.2"} |
|
|
optional: |
|
|
}, |
|
|
chordfont: //str |
|
|
"chordfont":{ "description": {"english": "Chord font", |
|
|
chordcolor: //str |
|
|
"french": "Police des accords"}, |
|
|
versefont: //str |
|
|
"default": {"default": "i"} |
|
|
chorusfont: //str |
|
|
}, |
|
|
geometry: //str |
|
|
"chordcolor":{ "description": {"english": "Chord color, HTML notation", |
|
|
column_adjustment: |
|
|
"french": "Couleur des accords en notation HTML"}, |
|
|
type: //any |
|
|
"default": {"default": "000000"} |
|
|
of: |
|
|
}, |
|
|
- type: //str |
|
|
"versefont":{ "description": {"english": "Verse font", |
|
|
value: "only_one" |
|
|
"french": "Police des couplets"}, |
|
|
- type: //str |
|
|
"default": {"default": ""} |
|
|
value: "one_more" |
|
|
}, |
|
|
- type: //str |
|
|
"chorusfont":{ "description": {"english": "Chorus font", |
|
|
value: "none" |
|
|
"french": "Police des refrains"}, |
|
|
default: |
|
|
"default": {"default": "i"} |
|
|
en: |
|
|
}, |
|
|
chordfont: "i" |
|
|
"geometry":{ "description": {"english": "Paper geometry (size, margin, orientation...), as options of the LaTeX geometry package.", |
|
|
chordcolor: "000000" |
|
|
"french": "Format du papier (taille, marges, orientation...), avec le même format que les options du paquet LaTeX geometry."}, |
|
|
versefont: "" |
|
|
"default": {"default":"a4paper"} |
|
|
chorusfont: "i" |
|
|
}, |
|
|
geometry: "a4paper" |
|
|
"column_adjustment":{ "description": {"english": "Column adjsutment.", |
|
|
column_adjustment: none |
|
|
"french": "Ajustement des colonnes."}, |
|
|
description: |
|
|
"type": "enum", |
|
|
en: |
|
|
"values": {"none": {"default": "none"}, |
|
|
chordfont: "Chord font (i, b, n)" |
|
|
"only_one": {"default": "only_one"}, |
|
|
chordcolor: "Chord color, hexadecimal notation" |
|
|
"one_more": {"default": "one_more"} |
|
|
versefont: "Verse font (i, b, n)" |
|
|
}, |
|
|
chorusfont: "Chorus font (i, b, n)" |
|
|
"default": {"default":"none"} |
|
|
geometry: "Paper geometry (size, margin, orientation...), as options of the LaTeX geometry package." |
|
|
} |
|
|
column_adjustment: "Column adjsutment." |
|
|
} |
|
|
fr: |
|
|
|
|
|
chordfont: "Police des accords" |
|
|
|
|
|
chordcolor: "Couleur des accords en notation hexadécimale" |
|
|
|
|
|
versefont: "Police des couplets" |
|
|
|
|
|
chorusfont: "Police des refrains" |
|
|
|
|
|
geometry: "Format du papier (taille, marges, orientation...), avec le même format que les options du paquet LaTeX geometry." |
|
|
|
|
|
column_adjustment: "Ajustement des colonnes." |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(* endvariables *) |
|
|
(* endvariables *) |
|
|
|
|
|
|
|
|
% begin document |
|
|
% begin document |
|
|
(* extends "patacrep.tex" *) |
|
|
(* extends "patacrep.tex" *) |
|
|
|
|
|
|
|
|
(* block preambule *) |
|
|
(* block preambule *) |
|
|
|
|
|
(*- set template_var = _template["data.tex"] -*) |
|
|
\usepackage{licence} |
|
|
\usepackage{licence} |
|
|
|
|
|
|
|
|
%! Font management |
|
|
%! Font management |
|
|
\makeatletter |
|
|
\makeatletter |
|
|
\renewcommand{\chorusfont}{% |
|
|
\renewcommand{\chorusfont}{% |
|
|
(* for letter in chorusfont *) |
|
|
(* for letter in template_var.chorusfont *) |
|
|
(* if letter=="i" *) \it % |
|
|
(* if letter=="i" *) \it % |
|
|
(* elif letter=='b' *) \bf % |
|
|
(* elif letter=='b' *) \bf % |
|
|
(* elif letter=='n' *) \normalfont % |
|
|
(* elif letter=='n' *) \normalfont % |
|
@ -72,18 +81,18 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
\def\@chordfont{% |
|
|
\def\@chordfont{% |
|
|
(* for letter in chordfont *) |
|
|
(* for letter in template_var.chordfont *) |
|
|
(* if letter=="i" *) \it % |
|
|
(* if letter=="i" *) \it % |
|
|
(* elif letter=='b' *) \bf % |
|
|
(* elif letter=='b' *) \bf % |
|
|
(* elif letter=='n' *) \normalfont % |
|
|
(* elif letter=='n' *) \normalfont % |
|
|
(* endif *) |
|
|
(* endif *) |
|
|
(* endfor *) |
|
|
(* endfor *) |
|
|
} |
|
|
} |
|
|
\definecolor{ChordColor}{HTML}{(( chordcolor ))} |
|
|
\definecolor{ChordColor}{HTML}{(( template_var.chordcolor ))} |
|
|
\renewcommand{\printchord}[1]{\@chordfont\textcolor{ChordColor}{#1}} |
|
|
\renewcommand{\printchord}[1]{\@chordfont\textcolor{ChordColor}{#1}} |
|
|
|
|
|
|
|
|
\renewcommand{\lyricfont}{% |
|
|
\renewcommand{\lyricfont}{% |
|
|
(* for letter in versefont *) |
|
|
(* for letter in template_var.versefont *) |
|
|
(* if letter=="i" *) \it % |
|
|
(* if letter=="i" *) \it % |
|
|
(* elif letter=='b' *) \bf % |
|
|
(* elif letter=='b' *) \bf % |
|
|
(* elif letter=='n' *) \normalfont % |
|
|
(* elif letter=='n' *) \normalfont % |
|
@ -94,15 +103,15 @@ |
|
|
%! End of font management |
|
|
%! End of font management |
|
|
|
|
|
|
|
|
\geometry{ |
|
|
\geometry{ |
|
|
((geometry)) |
|
|
((template_var.geometry)) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
%! Temporary hack for columns management |
|
|
%! Temporary hack for columns management |
|
|
\let\OldSongColumns=\songcolumns |
|
|
\let\OldSongColumns=\songcolumns |
|
|
\def\songcolumns#1{% |
|
|
\def\songcolumns#1{% |
|
|
(* if column_adjustment=="only_one" *) |
|
|
(* if template_var.column_adjustment=="only_one" *) |
|
|
\OldSongColumns{1} |
|
|
\OldSongColumns{1} |
|
|
(* elif column_adjustment=="one_more" *) |
|
|
(* elif template_var.column_adjustment=="one_more" *) |
|
|
\count0=#1\relax\advance\count0 by 1\relax% |
|
|
\count0=#1\relax\advance\count0 by 1\relax% |
|
|
\OldSongColumns{\count0} |
|
|
\OldSongColumns{\count0} |
|
|
(* else *) |
|
|
(* else *) |
|
|