summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2021-04-06 22:14:08 +0000
committerNorbert Preining <preining@logic.at>2021-04-06 22:14:08 +0000
commit58dbfe1521587135256d763b2d52fcd759d5f122 (patch)
tree4f8c5a748c111966bb7e6ec2f003785d7d923843 /Master/texmf-dist/tex
parenta1d4e118587689d3756bfb896c6eecdf30dd2535 (diff)
missaali (7apr21)
git-svn-id: svn://tug.org/texlive/trunk@58771 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/missaali/missaali.sty190
1 files changed, 152 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/latex/missaali/missaali.sty b/Master/texmf-dist/tex/latex/missaali/missaali.sty
index 7d643b26fb9..ae3d2932125 100644
--- a/Master/texmf-dist/tex/latex/missaali/missaali.sty
+++ b/Master/texmf-dist/tex/latex/missaali/missaali.sty
@@ -1,5 +1,5 @@
-%% missaali.tex
-%% Copyright 2016 Tommi Syrjönen
+%% missaali.sty
+%% Copyright 2016-2021 (C) Tommi Syrjönen
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -15,7 +15,7 @@
%
% See file MANIFEST-Missaali.txt to a list of files that make up this
% work.
-\ProvidesPackage{missaali}[2016/12/25 v1.004 XeLaTeX Package (Use Missaali Open Type Font)]
+\ProvidesPackage{missaali}[2021/04/05 v2.0 XeLaTeX Package (Use Missaali Open Type Font)]
%% Author: Tommi Syrjänen (tssyrjan@iki.fi)
%%
@@ -42,6 +42,7 @@
\newif\ifAlternateZ
\newif\ifAltPunctuation
\newif\ifAdditionalAbbrs
+\newif\ifManuscriptSpacing
\makeatletter
@@ -51,6 +52,11 @@
\Ligaturestrue
\MissaleAbbrStyletrue
+\ManuscriptSpacingfalse
+
+%% Package option: active punctuation
+\DeclareOption{ManuscriptSpacing}{\ManuscriptSpacingtrue}
+
%% Package option: old punctuation
\DeclareOption{OldPunctuation}{\AltPunctuationtrue}
@@ -90,7 +96,13 @@
\newcommand{\@zoptions}{\ifAlternateZ +ss19; \fi}
\newcommand{\@goptions}{\ifAlternateG +ss22; \fi}
-\newcommand{\msmanualspacing}{\@enableobeylines\@enableactivechars}
+\newcommand{\msmanualspacing}{%
+ \@enableobeylines%
+ \ifManuscriptSpacing\else%
+ \@enableactivechars%
+ \fi%
+}
+
\newcommand{\msaltpunctuation}{\addfontfeature{RawFeature=+ss17:}}
\newcommand{\@abbroptions}{%
@@ -106,11 +118,30 @@
\fi%
\fi%
}
+
\begingroup
-\catcode`,=\active
-\catcode`.=\active
-\catcode`!=\active
-\catcode`:=\active
+
+ \catcode`,=\active%
+ \catcode`.=\active%
+ \catcode`!=\active%
+ \catcode`:=\active%
+
+\newcommand{\@setActiveChars}{%
+ \ifManuscriptSpacing%
+ \catcode`,=\active%
+ \catcode`.=\active%
+ \catcode`!=\active%
+ \catcode`:=\active%
+ \else%
+ \catcode`,=12%
+ \catcode`.=12%
+ \catcode`!=12%
+ \catcode`:=12%
+ \fi%
+}
+
+
+
% \@enableactivechars adds some extra space on both sides of
% punctuation symbols. The following commands are created with voodoo
@@ -149,9 +180,14 @@
}
\endgroup
-\newcommand{\@enableobeylines}{
- \obeylines\spaceskip 0.2em plus 3fill%
+\newcommand{\@enableobeylines}{%
+ \ifManuscriptSpacing%
+ \raggedright\obeylines%
+ \else%
+ \raggedright\obeylines\spaceskip 0.2em plus 3fill%
+ \fi%
}
+
\newcommand{\@createoptions}{
RawFeature=\@abbroptions\@zoptions\@goptions\@pofusionoptions\@punctoptions\@finnoptions\@histoptions\@ligaoptions\@caltoptions+dmmy;
}
@@ -171,21 +207,41 @@
% These colors correspond to the red and blue inks used in the
% facsimile reprint of Missale Aboense in the SRGB color space (as
-% interpreted by my scanner)
+% interpreted by my scanner). The green is from Codex Aboensis
\newcommand{\@blue}{455f9b}
\newcommand{\@red}{c55e47}
+\newcommand{\@green}{62876e}
% Emphasize by adding red color
\newcommand{\texturaemph}[1]{{\addfontfeature{Color=\@red}#1}}
+
+% Internal command for turning '^' and '~' into normal letters so that
+% they can be used for ligature substitution. This is complex and
+% voodoo because TeX lexer is an unreasonable beast
+\def\@tildes{}
+
+\begingroup
+\catcode`^=\active
+\catcode`^=11
+\gdef\@tildes{%
+ \def~{\char`~}%
+ \catcode`^=11%
+}
+\endgroup
+
% Change font family to textura
\newcommand{\mstexturafamily}{\parindent0pt%
\let\emph\texturaemph%
- \fontspec[\@createoptions]{Missaali}}
+ \@tildes%
+ \fontspec[\@createoptions]{Missaali}}
+
% Set an isolated text fragment in Missaali
\newcommand{\missaali}[1]{{\mstexturafamily #1}}
+% Set the the size of a font and the textura block. Width is a
+% dimension, lines is an integer count of lines
\newcommand{\mssetsizes}[3]{%
\setcounter{@texturafontsize}{#1}%
\setlength{\@texturablockwidth}{#2}%
@@ -196,6 +252,7 @@
\newlength{\@texturablockwidth}
\setlength{\@texturablockwidth}{6.40cm}
+% Set the text block width
\newcommand{\mssetblockwidth}[1]{%
\setlength{\@texturablockwidth}{#1}}
@@ -205,7 +262,7 @@
\newcommand{\mssetblocklines}[1]{%
\setcounter{@texturablocklines}{#1}}
-% The width of the gutter
+% The width of the gutter between columns
\newlength{\@texturagutterwidth}
\setlength{\@texturagutterwidth}{1cm}
\newcommand{\mssetgutterwidth}[1]{%
@@ -219,7 +276,7 @@
\newlength{\@textwidth}
\newlength{\@textheight}
-% An environment for setting textura full page at a time
+% An environment for setting textura a full page at a time
\newenvironment{mstextura}{%
\begingroup%
\setlength{\@textwidth}{\dimexpr\@texturablockwidth*2+\@texturagutterwidth}%
@@ -233,10 +290,12 @@
\end{multicols}%
\restoregeometry\endgroup}
-% Setting textura in two columns without setting the length of the
-% blocks
+% A helper length to preserve old values. This is probably not
+% actually necessary, but I'm not a TeXpert
\newlength{\@savedcolumnsep}
+% Setting textura in two columns without setting the length of the
+% blocks
\newenvironment{mstexturablocks}{%
\begingroup%
\setlength{\@textwidth}{\dimexpr\@texturablockwidth*2+\@texturagutterwidth}%
@@ -275,31 +334,49 @@
\newbox\@ibox
\newlength\@initwidth
\newcommand{\mschapterinitial}[1]{%
- \setbox\@ibox\hbox{\msrubric{\addfontfeature{Scale=2}\addfontfeature{RawFeature=+ss20;}#1}}%
- \@initwidth=\wd\@ibox%
- \mbox{\smash{\lower1.3\baselineskip\hbox to \wd\@ibox{\vbox to 2\baselineskip{\hbox to \wd\@ibox{\box\@ibox}}}}}}
+ \mschapterinitialwithcolor{#1}{\@red}}
\newcommand{\mschapterinitialblue}[1]{%
- \setbox\@ibox\hbox{\msrubricblue{\addfontfeature{Scale=2}\addfontfeature{RawFeature=+ss20;}#1}}%
+ \mschapterinitialwithcolor{#1}{\@blue}}
+
+\newcommand{\mschapterinitialgreen}[1]{%
+ \mschapterinitialwithcolor{#1}{\@green}}
+
+\newcommand{\mschapterinitialwithcolor}[2]{%
+ \setbox\@ibox\hbox{\addfontfeature{Scale=2,Color=#2}+#1+}%
\@initwidth=\wd\@ibox%
\mbox{\smash{\lower1.3\baselineskip\hbox to \wd\@ibox{\vbox to 2\baselineskip{\hbox to \wd\@ibox{\box\@ibox}}}}}}
+
% \mschapterindent adds as much horizontal space as the latest seen
% chapter initial is wide
\newcommand{\mschapterindent}{\mbox{}\hskip\@initwidth}
-% \startchapter takes three arguments. The first is the initial letter,
+% \msstartchapter takes three arguments. The first is the initial letter,
% the second is the text of the first line, and the third is the text
% of the second line.
\newcommand{\msstartchapter}[3]{%
- \par\mschapterinitial{#1}#2\\%
- \mschapterindent{}#3}
+ \msstartchapterwithcolor{#1}{#2}{#3}{\@red}}
-% \startchapterblue takes three arguments. The first is the initial letter,
+% \msstartchapterblue takes three arguments. The first is the initial letter,
% the second is the text of the first line, and the third is the text
% of the second line.
\newcommand{\msstartchapterblue}[3]{%
- \par\mschapterinitialblue{#1}#2\\%
+ \msstartchapterwithcolor{#1}{#2}{#3}{\@blue}}
+
+
+% \msstartchapterblue takes three arguments. The first is the initial letter,
+% the second is the text of the first line, and the third is the text
+% of the second line.
+\newcommand{\msstartchaptergreen}[3]{%
+ \msstartchapterwithcolor{#1}{#2}{#3}{\@green}}
+
+
+% \msstartchapterwithcolor takes four arguments. The first is the
+% initial letter, the second is the first line, the third is the text
+% of the third line, and the fourth is the color
+\newcommand{\msstartchapterwithcolor}[4]{%
+ \par\mschapterinitialwithcolor{#1}{#4}#2 \\
\mschapterindent{}#3}
@@ -308,31 +385,52 @@
% the initial letter, the third is the contents of the first line and
% the last is the contents of the second line.
\newcommand{\msstartchapterwithrubric}[4]{%
- \par\mspartialrubric{#1}%
- \mspartialline{\mschapterinitial{#2}#3}\\%
- \mschapterindent{}#4}
+ \msstartchapterwithrubricandcolors{#1}{#2}{#3}{#4}{\@red}{\@red}}
-% \startchapterwithrubricblue takes four arguments. The first argument
+% \msstartchapterwithrubricblue takes four arguments. The first argument
% is a rubric that is set at the right edge of the column in red, the
% second is the initial letter that will be set in blue, the third is
% the contents of the first line and the last is the contents of the
% second line.
\newcommand{\msstartchapterwithrubricblue}[4]{%
- \par\mspartialrubric{#1}%
- \mspartialline{\mschapterinitialblue{#2}#3}\\%
+ \msstartchapterwithrubricandcolors{#1}{#2}{#3}{#4}{\@blue}{\@red}}
+
+% \msstartchapterwithrubricgreen works as above but with green color
+\newcommand{\msstartchapterwithrubricgreen}[4]{%
+ \msstartchapterwithrubricandcolors{#1}{#2}{#3}{#4}{\@green}{\@red}}
+
+% \msstartchapterwithrubricandcolors allows selecting both the initial
+% and the rubric colors separately. The fifth argument is the initial
+% color and the sixth argument the rubric color
+\newcommand{\msstartchapterwithrubricandcolors}[6]{%
+ \par\mspartialrubricwithcolor{#1}{#6}%
+ \mspartialline{\mschapterinitialwithcolor{#2}{#5}#3}\\%
\mschapterindent{}#4}
+% Add a one-line high red lombardic initial. This changes the letter
+% to lowercase because one line intials are implemented as
+% ligature substitions for lowercase letters. The smash is intended to
+% prevent irregularities in line spacing and the strut in front of it
+% prevents line breaking problems when the initial is the first letter
+% in a line.
+\newcommand{\msparinitialwithcolor}[2]{{%
+ \addfontfeature{Color=#2}%
+ \strut\smash{+\lowercase{#1}+}}}
-% Add a one-line high red lombardic initial
\newcommand{\msparinitial}[1]{{%
- \addfontfeature{Color=\@red}%
- \addfontfeature{RawFeature=+titl;}#1}}
+ \msparinitialwithcolor{#1}{\@red}}}
+
% Add a one-line high blue lombardic initial
\newcommand{\msparinitialblue}[1]{{%
- \addfontfeature{Color=\@blue}%
- \addfontfeature{RawFeature=+titl;}#1}}
+ \msparinitialwithcolor{#1}{\@blue}}}
+
+% Add a one-line high green lombardic initial
+\newcommand{\msparinitialgreen}[1]{{%
+ \msparinitialwithcolor{#1}{\@green}}}
+
+
% Turns off the standard ligature substitutions for its argument.
\newcommand{\msnoliga}[1]{{\addfontfeature{RawFeature=-liga;}#1}}
@@ -340,7 +438,7 @@
% Use the abbreviation ligatures that are used in main text of Missale
% Aboense
\newcommand{\msabbr}[1]{{%
- \Abbreviatetrue\MsNormalAbbrStyle\mstexturafamily #1}}
+ \Abbreviatetrue\MsNormalAbbrStyle\mstexturafamily{}#1}}
% Use additional abbreviation symbols
\newcommand{\msabbra}[1]{{%
@@ -500,6 +598,9 @@
% Change font color to blue
\newcommand{\msrubricblue}[1]{{\addfontfeature{Color=\@blue}#1}}
+% Change the font color to green
+\newcommand{\msrubricgreen}[1]{{\addfontfeature{Color=\@green}#1}}
+
% The commands \mspartialrubric and \mspartialline are used together
% to set a short title on the right end of the line and normal text to
% left. These commands should be used as a pair, with \mspartialrubric
@@ -507,8 +608,21 @@
\newbox\rubricbox
\setbox\rubricbox\hbox{}
\newcommand{\mspartialrubric}[1]{%
+ \mspartialrubricwithcolor{#1}{\@red}}
+
+\newcommand{\mspartialrubricblue}[1]{%
+ \mspartialrubricwithcolor{#1}{\@blue}}
+
+\newcommand{\mspartialrubricgreen}[1]{%
+ \mspartialrubricwithcolor{#1}{\@green}}
+
+
+% Inserts a partial rubric with stated color
+\newcommand{\mspartialrubricwithcolor}[2]{%
\setbox\rubricbox\hbox{\msrubric{#1}}%
- \hfill{}\msrubric{#1}}
+ {\hfill{}\addfontfeature{Color=#2}#1}}
+
+
\newcommand{\mspartialline}[1]{\vskip-\baselineskip{}#1\phantom{\box\rubricbox}}
%% Typeset the name of the font