Browse Source

WIP for the new songbook format.

remotes/origin/translate_notes
Alexandre Dupas 15 years ago
parent
commit
0e34686d31
  1. 11
      makefile
  2. 44
      template.tex
  3. 10
      test.sb

11
makefile

@ -17,9 +17,11 @@
SRC := $(wildcard *.tex)
SONGBOOKS := $(wildcard *.sb)
SOURCES := $(shell egrep -l '^[^%]*\\begin\{document\}' *.tex)
CIBLE = $(SOURCES:%.tex=%)
CIBLE = $(SOURCES:%.tex=%) $(SONGBOOKS:%.sb=%)
PDF = $(CIBLE:%=%.pdf)
PSF = $(CIBLE:%=%.ps.gz)
@ -90,6 +92,7 @@ clean: cleandoc
@rm -f *.sbd
@rm -f *.sbx *.sxd
@rm -f ./lilypond/*.ps
@rm -f $(SONGBOOKS:%.sb=%.tex)
cleanall: clean
@rm -f $(PDF) $(PSF)
@ -151,6 +154,12 @@ $(SONGS): $(SONGS_SRC)
$(CHORDS): $(CHORDS_SRC)
$(MAKE_CHORDS) -o $@
%.tex: %.sb
$(PRINT) "\newcommand{\template}{" > $@
cat $< >> $@
$(PRINT) "}" >> $@
$(PRINT) "\input{template.tex}" >> $@
# Create an empty mybook.sgl file if it does not exist
mybook.sgl:
touch $@

44
template.tex

@ -0,0 +1,44 @@
\providecommand{\defaulttemplate}{
\title{Recueil de chansons pour guitare}
\author{Romain Goffe \and Alexandre Dupas}
\subtitle{}
\version{3.1}
\mail{crep@team-on-fire.com}
\picture{feel-the-music}
\picturecopyright{©foxygamergirl @ deviantart.com}
\footer{
\begin{flushleft}
\includegraphics[width=3cm]{on-fire}
\end{flushleft}
}
\licence{\input{license.tex}}
}
\providecommand{\template}{\defaulttemplate}
\providecommand{\songslist}{}
\providecommand{\booktype}{chorded}
\documentclass[\booktype]{crepbook}
\usepackage[utf8]{inputenc}
\usepackage[english,french]{babel}
\newindex{titleidx}{templatetitle}
\newauthorindex{authidx}{templateauth}
\graphicspath{
{img/},
}
\template
\begin{document}
\maketitle
\showindex{Index des chansons}{titleidx}
\showindex{Index des auteurs}{authidx}
\songsection{Chansons}
\begin{songs}{titleidx,authidx}
\songslist
\end{songs}
\end{document}

10
test.sb

@ -0,0 +1,10 @@
\defaulttemplate
\title{Ceci est un test du template}
\renewcommand{\songslist}{
\graphicspath{
{img/},
{songs/Le_Donjon_de_Naheulbeuk/},
}
\input{songs/Le_Donjon_de_Naheulbeuk/Geste_heroique.sg}
\input{songs/Le_Donjon_de_Naheulbeuk/La_biere_du_donjon.sg}
}
Loading…
Cancel
Save