mirror of https://github.com/patacrep/patacrep.git
Engine 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.
113 lines
4.4 KiB
113 lines
4.4 KiB
%!- Copyright (C) 2014 The Patacrep team (www.patacrep.com)
|
|
%!-
|
|
%!- 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.
|
|
%!-
|
|
%!- The latest version of this program can be obtained from
|
|
%!- https://github.com/patacrep/
|
|
|
|
(* variables *)
|
|
{
|
|
"instruments": {"description": {"english": "Instruments", "french": "Instruments"},
|
|
"type": "flag",
|
|
"values": {"guitar": {"english": "Guitare", "french": "Guitare"},
|
|
"ukulele": {"english": "Ukulele", "french": "Ukulele"}
|
|
},
|
|
"join": ",",
|
|
"mandatory": true,
|
|
"default": {"default":["guitar"]}
|
|
},
|
|
"bookoptions": {"description": {"english": "Options", "french": "Options"},
|
|
"type": "flag",
|
|
"values": {"diagram": {"english": "Chords diagrams", "french": "Diagrammes d'accords"},
|
|
"importantdiagramonly": {"english": "Only importants diagrames", "french": "Diagrammes importants uniquement"},
|
|
"lilypond": {"english": "Lilypond music sheets", "french": "Partitions lilypond"},
|
|
"pictures": {"english": "Cover pictures", "french": "Couvertures d'albums"},
|
|
"tabs": {"english": "Tablatures", "french": "Tablatures"},
|
|
"repeatchords": {"english": "Repeat chords", "french": "Répéter les accords"},
|
|
"onesongperpage": {"english": "One song per page", "french": "Une chanson par page"}
|
|
},
|
|
"join": ",",
|
|
"mandatory": true,
|
|
"default": {"default":["diagram","pictures"]}
|
|
},
|
|
"booktype": {"description": {"english": "Type", "french": "Type"},
|
|
"type": "enum",
|
|
"values": {"chorded": {"english": "With guitar chords", "french": "Avec accords de guitare" },
|
|
"lyric": {"english": "Lyrics only", "french": "Paroles uniquement"}
|
|
},
|
|
"default": {"default":"chorded"},
|
|
"mandatory": true
|
|
},
|
|
"lang": {"description": {"english": "Language", "french": "Langue"},
|
|
"default": {"english": "en", "french": "fr"}
|
|
},
|
|
"titleprefixwords": {"description": {"english": "Ignore some words in the beginning of song titles",
|
|
"french": "Ignore des mots dans le classement des chansons"},
|
|
"default": {"default": []}
|
|
},
|
|
"authwords": {"description": {"english": "Set of options to process author string (LaTeX commands authsepword, authignoreword, authbyword)",
|
|
"french": "Options pour traiter les noms d'auteurs (commandes LaTeX authsepword, authignoreword, authbyword)"},
|
|
"default": {"default": {}}
|
|
}
|
|
}
|
|
(* endvariables -*)
|
|
|
|
(*- extends "layout.tex" -*)
|
|
|
|
(* block songbookpackages *)
|
|
\usepackage[
|
|
((booktype)),
|
|
(* for option in bookoptions *)((option)),
|
|
(* endfor *)
|
|
(* for instrument in instruments *)((instrument)),
|
|
(* endfor *)
|
|
]{patacrep}
|
|
(* endblock *)
|
|
|
|
(* block songbookpreambule *)
|
|
(( super() ))
|
|
|
|
(* for lang in _langs -*)
|
|
\PassOptionsToPackage{(( lang2babel(lang) ))}{babel}
|
|
(* endfor *)
|
|
\usepackage[(( lang2babel(lang) ))]{babel}
|
|
\lang{(( lang2babel(lang) ))}
|
|
|
|
\usepackage{graphicx}
|
|
\graphicspath{ %
|
|
(* for dir in datadir *)
|
|
{(( path2posix(dir) ))/img/} %
|
|
(* endfor *)
|
|
}
|
|
|
|
|
|
\makeatletter
|
|
\@ifpackageloaded{hyperref}{}{
|
|
\usepackage{url}
|
|
\newcommand{\phantomsection}{}
|
|
\newcommand{\hyperlink}[2]{#2}
|
|
\newcommand{\href}[2]{\expandafter\url\expandafter{#1}}
|
|
}
|
|
\makeatother
|
|
(* endblock *)
|
|
|
|
(* block songs *)
|
|
\phantomsection
|
|
\addcontentsline{toc}{section}{\songlistname}
|
|
|
|
(( render(content) ))
|
|
|
|
(* endblock *)
|
|
|