First attempt at adding Tradition below subtitle in web and print.

This commit is contained in:
Jim Hague 2017-10-08 17:06:09 +01:00
parent 573c14c04f
commit 193d7fde2f
5 changed files with 21 additions and 8 deletions

View File

@ -21,6 +21,7 @@
# * name. The file base name. Base filename without extension.
# * title. The tune title.
# * subtitle. The tune subtitle (second Title field), if any.
# * tradition. The Morris tradition the dance tune is from.
# * composer. The tune composer.
# * key. The tune key.
# * changefile. The name of the 'change' file, if any.
@ -66,6 +67,7 @@ if __name__ == "__main__":
vars["name"] = fname
vars["title"] = getFieldDisplayText(lines, fdir, "T", latex=args.latex)
vars["subtitle"] = getFieldDisplayText(lines, fdir, "T", n=2, latex=args.latex)
vars["tradition"] = getFieldDisplayText(lines, fdir, "A", latex=args.latex)
vars["composer"] = getFieldDisplayText(lines, fdir, "C", latex=args.latex)
vars["key"] = getFieldDisplayText(lines, fdir, "K", latex=args.latex)
vars["notes"] = getFieldDisplayText(lines, fdir, "N", starts="Dottes:", latex=args.latex)

View File

@ -37,6 +37,7 @@
<div class="dottes-tune-header-title">
<h1>${title}</h1>
<h2>${subtitle}</h2>
<h3>${tradition}</h3>
</div>
<div class="dottes-tune-header-composer">
<em>${composer}</em>

View File

@ -45,23 +45,26 @@
\makeatother
% Show the main tune graphic and optional change.
% Args are tune name, tune title, tune subtitle, composer, tune graphic
% filename, notes, history.
\newcommand{\showtune}[7]{%
% Args are tune name, tune title, tune subtitle, tradition, composer,
% tune graphic, filename, notes, history.
\newcommand{\showtune}[8]{%
\phantomsection
\begin{tabularx}{\textwidth}{LCR}
\addcontentsline{toc}{section}{#2}
& \hypertarget{#1}{\Large{#2}} & \emph{#4} \tabularnewline
& \hypertarget{#1}{\Large{#2}} & \emph{#5} \tabularnewline
\ifemptyarg{#3}{}{%
& #3 & \tabularnewline
}
\ifemptyarg{#4}{}{%
& \emph{#4} & \tabularnewline
}
\multicolumn{3}{c}{%
\includegraphics[width=\textwidth,height=0.8\textheight,keepaspectratio]{#5}%
\includegraphics[width=\textwidth,height=0.8\textheight,keepaspectratio]{#6}%
}\tabularnewline
\end{tabularx}
#6
#7
#8
\vfill
}

View File

@ -1 +1 @@
\showtune{$name}{$title}{$subtitle}{$composer}{$graphicsdir/$name}{$notes}{$history}
\showtune{$name}{$title}{$subtitle}{$tradition}{$composer}{$graphicsdir/$name}{$notes}{$history}

View File

@ -176,6 +176,13 @@ div.dottes-tune-header-title h2
margin: 0px;
}
div.dottes-tune-header-title h3
{
font-style: italic;
text-align: center;
margin: 0px;
}
div.dottes-tune-header-composer
{
display: table-cell;