Skip to content

Commit

Permalink
add commentaryraise
Browse files Browse the repository at this point in the history
- commentaryraise now rules the space between the top of the score and the
  baseline of the commentary
- \grecommentary now has an optional argument to tune this space
  • Loading branch information
eroux committed Jan 5, 2016
1 parent 25f1fcd commit 20768ee
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
15 changes: 12 additions & 3 deletions doc/Command_Index_User.tex
Original file line number Diff line number Diff line change
Expand Up @@ -693,11 +693,12 @@ \subsubsection{Text Elements}

\textbf{Nota Bene:} The first argument does not affect the alignment of lines already in the annotation, only the way the new line aligns with the existing lines as a whole.

\macroname{\textbackslash grecommentary}{\{\#1\}}{gregoriotex-main.tex}
Macro to add commentary (the text flush right at the top, usually a scripture reference) to a score. While a single call of this function does not support multiple lines, successive calls to the function will add a new line to the commentary directly below the previous.
\macroname{\textbackslash grecommentary}{[\#1]\{\#2\}}{gregoriotex-main.tex}
Macro to add commentary (the text flush right at the top, usually a scripture reference) to a score. While a single call of this function does not support multiple lines, successive calls to the function will add a new line to the commentary directly below the previous. The space between the top of the score (the top bar, or a note, a bar, etc. depending on the score) and the base line of the commentary is the space called \texttt{commentaryraise}.

\begin{argtable}
\#1 & string & The text of the commentary.\\
\#1 & dimension & An optional additional space added between the score and the commentary (optional, can be negative, default \texttt{0pt})\\
\#2 & string & the text of the commentary
\end{argtable}

\textbf{Nota Bene:} This command should appear directly before \verb=\gregorioscore= when used.
Expand Down Expand Up @@ -1191,6 +1192,14 @@ \subsection{Distances}\label{distances}
Amount to raise (positive) or lower (negative) the annotation from it's normal position (baseline of the first line aligned with the top line of the staff).
\end{gdimension}

\begin{gdimension}{commentaryraise}
Space between the top of the score (the highest line, a note, a bar, etc. depending on the score) and the baseline of the commentary.

As a new paragraph starts after the commentary, \texttt{\textbackslash baselineskip} is substracted to this value, in order for this space not to change if \texttt{\textbackslash baselineskip} does.

Warning: font proportional units (em, en, ex) are proportional to the font in use before \texttt{\textbackslash grecommentary} call.
\end{gdimension}

\begin{gdimension}{noclefspace}
Space at the beginning of the lines if there is no clef.
\end{gdimension}
Expand Down
3 changes: 1 addition & 2 deletions examples/main-lualatex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
\greannotation{\small \textsc{\textbf{VII}}}

% We type a text in the top right corner of the score:
\grecommentary{{\footnotesize \emph{Cf. Is. 30, 19 . 30 ; Ps. 79}}}

\grecommentary{{\footnotesize \emph{Cf. Is. 30, 19 . 30 ; Ps. 79}}} % no new paragraph here!
% and finally we include the scores. The file must be in the same directory as this one.
\gregorioscore[a]{PopulusSion}

Expand Down
1 change: 1 addition & 0 deletions tex/gregoriotex-spaces.tex
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@
\IfStrEq{#1}{initialraise}{\gre@rubberfalse}{\relax}%
\IfStrEq{#1}{beforealterationspace}{\gre@rubberfalse}{\relax}%
\IfStrEq{#1}{alterationspace}{\gre@rubberfalse}{\relax}%
\IfStrEq{#1}{commentaryraise}{\gre@rubberfalse}{\relax}%
}%

%% an aux function adapting the value #1 from the factor #2 to the factor #3
Expand Down
7 changes: 5 additions & 2 deletions tex/gsp-default.tex
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,15 @@
\def\grewidowpenalty{0}%
\def\greclubpenalty{0}%



%%%%%%%%%%%%%%%%%%%
%% And finally, all the spacings:
%%%%%%%%%%%%%%%%%%%

% Space between the top of the score (top of the highest glyph of the first line)
% and the baseline of the commentary. Warning: font proportional units (em, en, ex)
% are proportional to the font in use before \grecommentary call.
\grecreatedim{commentaryraise}{0.3 ex}{fixed}%

%This count tells gregoriotex what \gre@factor the below values correspond to.
%% All the following values correspond to a gre@factor of 17. At this size the scores should be approximately the size usually seen in a gradual.
%% If you’re creating your own space configuration file, you may set this to some other value, should you so desire.
Expand Down

0 comments on commit 20768ee

Please sign in to comment.