Browse Source

Allow user to define exact order of document section

pull/267/head
Olivier Radisson 4 years ago
parent
commit
be74e4ab97
  1. 56
      patacrep/data/templates/songbook/layout.tex

56
patacrep/data/templates/songbook/layout.tex

@ -25,6 +25,31 @@
%% %%
%% Generated using Songbook <http://www.patacrep.com> %% Generated using Songbook <http://www.patacrep.com>
(* variables *)
schema:
type: //rec
optional:
display:
type: //arr
contents: //str
default:
en:
display:
- "Title"
- "Preface"
- "Index"
- "Chords"
- "Songs"
- "Postface"
description:
en:
display: "Ordinate list of section to display"
fr:
display: "Liste ordonnée des sections à afficher"
(* endvariables -*)
(*- set layout_var = _template["layout.tex"] -*)
\makeatletter \makeatletter
\def\input@path{ % \def\input@path{ %
(* for dir in _datadir|iter_datadirs *) (* for dir in _datadir|iter_datadirs *)
@ -47,25 +72,30 @@
(* block preambule *) (* block preambule *)
(* endblock preambule *) (* endblock preambule *)
\begin{document} \gdef\LayoutTitle{%
(* block title *) (* block title *)
(* endblock *) (* endblock *)}
\gdef\LayoutPreface{%
(* block preface *) (* block preface *)
(* endblock *) (* endblock *)}
\gdef\LayoutIndex{%
(* block index *) (* block index *)
(* endblock *) (* endblock *)}
\gdef\LayoutChords{%
(* block chords *) (* block chords *)
(* endblock *) (* endblock *)}
\gdef\LayoutSongs{%
(* block songs *) (* block songs *)
(* endblock *) (* endblock *)}
\gdef\LayoutPostface{%
(* block postface *) (* block postface *)
(* endblock *) (* endblock *)}
\begin{document}
(* for block in layout_var.display *)
\Layout(( block ))
(* endfor *)
\end{document} \end{document}

Loading…
Cancel
Save