From 72cac8edc373de5162aa4730c86cd3782ee33051 Mon Sep 17 00:00:00 2001 From: Luthaf Date: Wed, 7 May 2014 20:22:45 +0100 Subject: [PATCH] Fix some graphical errors --- songbook_core/data/latex/SongbookUtils.sty | 43 ++++++++++++++++++---- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/songbook_core/data/latex/SongbookUtils.sty b/songbook_core/data/latex/SongbookUtils.sty index ba629392..a83fa423 100644 --- a/songbook_core/data/latex/SongbookUtils.sty +++ b/songbook_core/data/latex/SongbookUtils.sty @@ -23,6 +23,8 @@ \RequirePackage{xstring} \RequirePackage{framed} \RequirePackage{currfile} +\RequirePackage{ifthen} +\RequirePackage{tikz} \newif{\iftabs} \DeclareOption{tabs}{\tabstrue} @@ -336,30 +338,55 @@ \fi }{}% -\newenvironment{bridge}{% + +% Use a new framed command for bridges +\renewcommand{\FrameCommand}[1]{ + \begin{tikzpicture} + \node[rectangle] (rect) { + \begin{minipage}{.8\textwidth} + #1 + \end{minipage} + }; + \draw[very thick, dashed] (rect.north west) -- (rect.south west); + \end{tikzpicture} +} +\newenvironment{bridge} +{% \begin{framed} - \vspace{-.4cm} - \begin{verse*} - }{ + \vspace{-.4cm} + \begin{verse*} +} +{% \end{verse*} \vspace{-.2cm} -\end{framed} + \end{framed} } \def\removefirstch@r#1{} \newcommand{\transposition}[1]{% - \ifnorepeatchords% + \ifrepeatchords% + \transpose{#1} + \else% \musicnote{% \transpositionname~ \ifthenelse{#1>0}{#1$\Uparrow$}{\removefirstch@r#1$\Downarrow$}% }% - \else% - \transpose{#1} \fi% }% \iftabs \RequirePackage{tabs} +\else + \RequirePackage{verbatim} + \newenvironment{tab}{\comment}{\endcomment} \fi +\let\@textnoteold\textnote +\renewcommand{\textnote}[2][]{% + \vspace{.1cm} + \IfStrEq{}{#1}{\@textnoteold{#2}}{ + \iflanguage{#1}{\@textnoteold{#2}}{} + } +} + \endinput \ No newline at end of file