Debian Codegraph @

lib/ChordPro/res/templates/songbook.tt

raw
1 [% # these variables are obligatory to set
2 newpage_tag = "\\newpage\n"
3 emptyline_tag = "\\newpage\n"
4 columnbreak_tag = "\\columnbreak\n"
5 beginchorus_tag = "\\beginchorus"
6 endchorus_tag = "\\endchorus"
7 beginverse_tag = "\\beginverse"
8 endverse_tag = "\\endverse"
9 beginabc_tag = "\\begin{abc}"
10 endabc_tag = "\\end{abc}"
11 beginlilypond_tag = "\\begin{lilypond}"
12 endlilypond_tag = "\\end{lilypond}"
13 begingrid_tag = "\\begin{singlespace*}\n\\begin{verbatim}"
14 endgrid_tag = "\\end{verbatim}\n\\end{singlespace*}"
15 begintab_tag = "\\begin{singlespace*}\n\\begin{verbatim}"
16 endtab_tag = "\\end{verbatim}\n\\end{singlespace*}"
17 gchordstart_tag = "\\["
18 gchordend_tag = "]"
19 chorded_line = "\\chordson " # Songs-package require this to know when to switch
20 unchorded_line = "\\chordsoff " # chordlines off - it will be printed ahead of a song line
21 start_spaces_songline = "\\hspace{0,5cm}" #if a songline starts with spaces it will be replaced by start_spaces_songline
22 eol = "\n" #sometimes this need to be to \\ or \newline
23 %]
24 % http://songs.sourceforge.net/songsdoc/songs.html
25 \documentclass[a5paper]{book}
26 \usepackage{graphicx}
27 \usepackage[TS1,T1]{fontenc}
28 \usepackage[most]{tcolorbox}
29 \usepackage[bookmarks]{hyperref}
30 \usepackage{fancyhdr}
31 \usepackage[chorded]{songs}
32
33 \pagestyle{fancy} % Eigener Seitenstil
34 \fancyhf{} % Alle Kopf- und Fußzeilenfelder bereinigen
35 %\fancyhead[L]{Titel} % Kopfzeile links
36 %\fancyhead[C]{} % Zentrierte Kopfzeile
37 %\fancyhead[R]{Name} % Kopfzeile rechts
38 %\renewcommand{\headrulewidth}{0.4pt} % Obere Trennlinie
39 \fancyfoot[C]{\thepage} % Seitennummer
40 \renewcommand{\footrulewidth}{0pt} % Untere Trennlinie löschen
41 \renewcommand{\headrulewidth}{0pt} %obere weg.
42
43 % \includeonlysongs{2}
44 %\setlength{\oddsidemargin}{1cm}
45 %\setlength{\evensidemargin}{1cm}
46 \setlength{\textwidth}{10cm}
47 \setlength{\topmargin}{-1cm}
48 \setlength{\topskip}{0in}
49 \setlength{\headheight}{0in}
50 \setlength{\headsep}{0in}
51 \setlength{\textheight}{18cm}
52 \settowidth{\versenumwidth}{1.\ }
53 \renewcommand{\printchord}[1]{\rmfamily\bf#1}
54 %\renewcommand{\songmark}{\markboth{\thesongnum}{\thesongnum}}
55 \noversenumbers
56 \setlength{\sbarheight}{0pt} % no horizontal rule above / below songs
57
58 \setcounter{songnum}{1}
59 \songpos{2} %how hard should a song match on one side 1-3
60
61 \newindex{titleidx}{cbtitle}
62 \newauthorindex{authidx}{cbauth}
63 \newscripindex{scripidx}{cbscrip}
64
65 %\songcolumns{1}
66 \songcolumns{0} %disable column management of Song package
67 %\baselineadj=-3pt plus 1pt minus 0pt % distance reduce
68
69
70 \begin{document}
71 \frontmatter
72 \showindex{Index}{titleidx}
73
74 \mainmatter
75 \begin{songs}{titleidx,authidx,scripidx}
76 [% FOREACH song IN songs %]
77 \newpage
78 \beginsong{[% song.title %][% FOREACH st IN song.subtitle %] \\ [% st %][% END %]}
79 [
80 by={[% song.meta.composer.0 %]},
81 sr={[% song.meta.lyricist.0 %]},
82 cr={[% song.meta.copyright.0 %]},
83 index={[% song.meta.index %]}]
84 [% IF song.meta.capo.0 %]\capo{[% song.meta.capo.0 %]}[% END %]
85 [% IF song.chords.0 %]\begin{tcolorbox}[colback=white,colframe=black,width=0.75\textwidth,arc=3mm, auto outer arc]
86 [% FOREACH chord IN song.chords %]\gtab{[% chord.chord %]}{[% chord.frets %]}[% elements = loop.count % 5 %][% IF ((elements == 0) and (not loop.last)) %]\newline[% END %][% END %]\end{tcolorbox}[% END %]
87
88 [% song.songlines | eval %]
89 \endsong
90
91 [% END %]
92 \end{songs}
93
94 \pagenumbering{Alph}
95 %\showindex{Index of Authors and Composers}{authidx}
96 %\showindex{Index of Scripture}{scripidx}
97
98 \end{document}