Browse Source

Override songs enviroonment to prevent number reset

pull/208/head
Oliverpool 9 years ago
parent
commit
522b0ed0d1
  1. 17
      patacrep/data/latex/patacrep.sty
  2. 2
      patacrep/data/latex/songs.sty

17
patacrep/data/latex/patacrep.sty

@ -443,4 +443,21 @@
\def\@void[#1]{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Prevent numbering reset on new 'songs' environment
\newcounter{tempsongnum}
\let\oldsongs\songs
\let\endoldsongs\endsongs
\renewenvironment{songs}[1]{%
\setcounter{tempsongnum}{\thesongnum}%
\oldsongs{#1}%
\setcounter{songnum}{\thetempsongnum}%
}{%
\endoldsongs\ignorespacesafterend%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput

2
patacrep/data/latex/songs.sty

@ -2957,7 +2957,7 @@
\gdef\SB@indexlist{#1}%
\SB@chkidxlst%
\stepcounter{SB@songsnum}%
%\setcounter{songnum}{1}%
\setcounter{songnum}{1}%
\let\SB@sgroup\@empty%
\ifinner\else\ifdim\pagetotal>\z@%
\null\nointerlineskip%

Loading…
Cancel
Save