-%% This is an extension of Martin Väth's *guitar* package with high
-%% level environments for song sectioning: chorus, verse and
+%% This is an extension of Martin Väth's {\em guitar} package with
+%% high level environments for song sectioning: chorus, verse and
%% bridge, etc.
-%% Author: Gustav Eek <gustav.eek@fripost.org>
+%% Author: Gustav Eek \url{gustav.eek@fripost.org}
%% Licence: GNU GPL v3
-%% This is a LaTeX3 package (LaTeX3 is actually LaTeX continued on top
-%% of LaTeX2e). See [Introduction to LaTeX3
-%% ideas](http://texdoc.net/pkg/expl3) for throughout details.
+%% This is a \LaTeX3 package (\LaTeX3 is actually \LaTeX continued on
+%% top of \LaTeX2e). See ``Introduction to \LaTeX3
+%% ideas''\footnote{\url{http://texdoc.net/pkg/expl3}} for throughout
+%% details.
%% The inspiration is the ChordPro format as well as Ultimate Guitar's
-%% sectioning in their text format and Wikipedia's "Song structure",
-%% "Verse–chorus form". Pre-defined song sections:
+%% sectioning in their text format and Wikipedia's ``Song structure'',
+%% ``Verse–chorus form''. Pre-defined song sections:
%%
-%% * Introduction, intro,
-%% * Verse, verse,
-%% * Bridge, bridge,
-%% * Pre-chorus prech,
-%% * Chorus or refrain, chorus,
-%% * Post-chorus postch,
-%% * Conclusion or outro, outro,
-%% * Elision, elison,
-%% * Instrumental solo, instr,
-%% * Ad lib, ad-lib,
-%% * Break, break,
+%% \begin{itemize}
+%% \item Introduction, intro,
+%% \item Verse, verse,
+%% \item Bridge, bridge,
+%% \item Pre-chorus prech,
+%% \item Chorus or refrain, chorus,
+%% \item Post-chorus postch,
+%% \item Conclusion or outro, outro,
+%% \item Elision, elison,
+%% \item Instrumental solo, instr,
+%% \item Ad lib, ad-lib,
+%% \item Break, break,
+%% \end{itemize}
+
+%%% Package metadata
\NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage{
- guitarsections}{
- 2024-08-08}{0.2}{
- An extension of Martin Väth's {\em guitar} package with high level
- environments for sections: chorus, verse and bridge. The inspiration
+\ProvidesExplPackage{%
+ guitarsections}{%
+ 2024-08-08}{0.2}{%
+ An extension of Martin Väth's {\em guitar} package with high level%
+ environments for sections: chorus, verse and bridge. The inspiration%
is the ChordPro format.}
\RequirePackage{guitar}[v1.6]
\RequirePackage{xparse}
\setlength{\labelsep}{2.5ex}
\setlength{\labelrule}{2pt}
-%% Style declaration commands, implemented with LaTeX3 property lists
+%%% Style declaration commands, implemented with \LaTeX3 property lists
\NewDocumentCommand\guitarLabelDelim{}{:~}
\RequirePackage{xcolor}
\colorlet{gtr@default@sty}{darkgray}
-
-%%
-
\def\gtr@default@stylabel{} % empty by default
\NewDocumentCommand\guitarFont{}{\sffamily\itshape\small}
\NewDocumentCommand\guitarFontChords{}{\guitarFont\color{gtr@let@heavy-red}}
\NewDocumentCommand\guitarFontRespMusic{}{\guitarFont\color{gtr@let@heavy-purple}}
\NewDocumentCommand\guitarFontRespStruct{}{\guitarFont\color{gtr@let@heavy-blue}}
-
\tl_new:N \gtr_key %% temporary variable
\tl_new:N \gtr_val %% temporary variable
\prop_new:N \gtr_stycolors %% data structure
\IfValueT{#1}{\guitarLabelDelim#1}%
}
-
-%% Define guitar section environment commands
+%%% Define guitar section environment commands
\RequirePackage{rotating}
\setlength\fboxsep{-\fboxrule}
}%
}
-%% Provide annotation commands
+%%% Provide annotation commands
+
\newlength\gtr_annotfill
\NewDocumentCommand\guitarAnnot{m m}{%
\mbox{}\hfill\mbox{}{\guitarFont\gtr_color{#1}\hspace{1ex}#2\hspace{1ex}}\mbox{}%
}
-%% Provide a horrizontal pragraph ruler
+%%% Provide a horrizontal pragraph ruler
\NewDocumentCommand\guitarRule{o m}{%
\begin{flushleft}%
\end{flushleft}%
}
-%% Define the color pallet for pre-configured sections
+%%% Define the color pallet for pre-configured sections
\colorlet{blackgray}{black!75!darkgray}
\colorlet{turquoisegreen}{cyan!25!green}
\colorlet{gtr@sty@music}{gtr@let@heavy-purple}
\colorlet{gtr@sty@structure}{gtr@let@heavy-blue}
-%% Finally define the actual pre-configured sections
+%%% Finally define the actual pre-configured sections
\guitarSectionStyle[gtr@sty@intro]{Intro}
\guitarSectionStyle[gtr@sty@verse]{Verse}
\guitarSectionStyle[gtr@sty@adlib]{Ad lib}
\guitarSectionStyle[gtr@sty@outro]{Outro}
-%% Defnide other pre-configured annotations and other styles
+%%% Defnide other pre-configured annotations and other styles
\guitarStyle[gtr@sty@chords]{chords}
\guitarStyle[gtr@sty@music]{music}
\guitarStyle[gtr@sty@structure]{structure}
-%% Utility commands. Activation commands are for client usage. These
-%% will not be modified internally
+%%% Utility commands. Activation commands are for client usage. These
+%%% will not be modified internally
\NewDocumentCommand\guitarActivate{m}{%
\tl_set:Nx \gtr_key {\tl_lower_case:n {#1}}%