summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-10-24 21:29:01 +0000
committerKarl Berry <karl@freefriends.org>2016-10-24 21:29:01 +0000
commit11f2451c1797b36bccbafe688493259a27728911 (patch)
tree094d0ca055d25fa22ade2cda060062f3f27e16be /Master/texmf-dist/tex
parent764798e280569143f4b729acbf42963d93e13a7e (diff)
churchslavonic (24oct16)
git-svn-id: svn://tug.org/texlive/trunk@42342 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/churchslavonic/churchslavonic.sty30
-rw-r--r--Master/texmf-dist/tex/latex/churchslavonic/cu-calendar.sty28
-rw-r--r--Master/texmf-dist/tex/latex/churchslavonic/cu-kinovar.sty4
3 files changed, 45 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/churchslavonic/churchslavonic.sty b/Master/texmf-dist/tex/latex/churchslavonic/churchslavonic.sty
index b988b8e41a2..4b0f5a106a0 100644
--- a/Master/texmf-dist/tex/latex/churchslavonic/churchslavonic.sty
+++ b/Master/texmf-dist/tex/latex/churchslavonic/churchslavonic.sty
@@ -1,9 +1,9 @@
-% Copyright 2016 Slavonic Computing Initialive
+% Copyright 2016 Slavonic Computing Initiative
% http://sci.ponomar.net
%
-\ProvidesPackage{churchslavonic}[2016/04/19 v0.1 Typesetting in Church Slavonic]
+\ProvidesPackage{churchslavonic}[2016/04/19 v0.2 Typesetting in Church Slavonic]
-\DeclareOption{gray}{
+\DeclareOption*{
\PassOptionsToPackage{\CurrentOption}{cu-kinovar}
}
\ProcessOptions\relax
@@ -13,4 +13,28 @@
\RequirePackage{cu-util}
\RequirePackage{cu-kinovar}
+% underscore is a valid character in Church Slavonic
+\let\cu@oldunderscore=_
+\catcode`\_\active
+\protected\def_{\ifmmode\cu@oldunderscore\else\textunderscore\discretionary{}{}{}\fi}
+
+% suppress variable distance between lines
+\lineskiplimit -1ex
+
+% margin marks
+\def\cu@mmark@counter{0}%
+\def\cuMarginMarkSkip{0.6em}%
+\def\cuMarginMarkText#1{#1}%
+\protected\def\cuMarginMark#1{%
+\leavevmode
+\global\edef\cu@mmark@counter{\the\numexpr 1 + \cu@mmark@counter}%
+\label{mnote.\cu@mmark@counter}%
+\ifodd\getpagerefnumber{mnote.\cu@mmark@counter}\relax
+ \vadjust{\hbox{\vbox to 0pt{\vss\hbox to 0pt{\hskip\textwidth\hskip\cuMarginMarkSkip \cuMarginMarkText{#1}\hss}\vskip 0.25\baselineskip}}}%
+\else
+ \vadjust{\hbox{\vbox to 0pt{\vss\hbox to 0pt{\hss \cuMarginMarkText{#1}\hskip\cuMarginMarkSkip}\vskip 0.25\baselineskip}}}%
+\fi
+}%
+
+
\endinput
diff --git a/Master/texmf-dist/tex/latex/churchslavonic/cu-calendar.sty b/Master/texmf-dist/tex/latex/churchslavonic/cu-calendar.sty
index eb1a80914bb..1c2c685a64c 100644
--- a/Master/texmf-dist/tex/latex/churchslavonic/cu-calendar.sty
+++ b/Master/texmf-dist/tex/latex/churchslavonic/cu-calendar.sty
@@ -34,10 +34,10 @@
\the\numexpr #1 + \intcalcDiv{#2}{400} + 32083 - 32045\relax%
}%
%
-\def\cu@jdnFromJulianDate#1{%
+\def\cu@jdnFromDateJulian#1{%
\cu@jdn #1-\@firstoftwo
}%
-\def\cu@jdnFromGregorianDate#1{%
+\def\cu@jdnFromDateGregorian#1{%
\cu@jdn #1-\greg@
}%
%
@@ -72,10 +72,10 @@
}}%
%
\def\cu@julianToGregorian#1{%
- \cu@calendarGregorian{\cu@jdnFromJulianDate{#1}}%
+ \cu@calendarGregorian{\cu@jdnFromDateJulian{#1}}%
}%
\def\cu@gregorianToJulian#1{%
- \cu@calendarJulian{\cu@jdnFromGregorianDate{#1}}%
+ \cu@calendarJulian{\cu@jdnFromDateGregorian{#1}}%
}%
\let\cu@julianFromGregorian\cu@gregorianToJulian
\let\cu@gregorianFromJulian\cu@julianToGregorian
@@ -85,10 +85,10 @@
\let\cuAsJulian\cu@julianFromGregorian
\let\cuAsGregorian\cu@gregorianFromJulian
%
-\def\cuJulianDate#1{%
+\def\cuDateJulian#1{%
\expandafter\cu@formatDate\number\cu@julianFromGregorian{#1}\relax
}%
-\def\cuJulianToday{%
+\def\cuTodayJulian{%
\cu@julianFromGregorian{\year -\month -\day}%
}%
\def\cuToday{%
@@ -141,8 +141,8 @@
\expandafter\let\expandafter\cu@current@dateformat\csname cs@dateformat@#1\endcsname
}%
\def\cu@@formatDate#1-#2-#3\relax{%
- \edef\cu@JDN{\cu@jdnFromGregorianDate{#1-#2-#3}}%
- \edef\cu@JDN@March@First{\cu@jdnFromJulianDate{#1-3-1}}%
+ \edef\cu@JDN{\cu@jdnFromDateGregorian{#1-#2-#3}}%
+ \edef\cu@JDN@March@First{\cu@jdnFromDateJulian{#1-3-1}}%
\edef\cuYEAR{\number #1}%
\edef\cuYEARAM{\the\numexpr #1 + 5508\ifnum\cu@JDN<\cu@JDN@March@First\else + 1\fi}%
\edef\cuMONTH{\number #2}%
@@ -151,9 +151,9 @@
\edef\cuINDICTION{\intcalcAdd{15}{\intcalcMod{#1 - 312}{-15}}}%
\edef\cuDISPLAYDATE{\cu@current@dateformat}%
}%
-\def\cu@@formatJulianDate#1-#2-#3\relax{%
- \edef\cu@JDN{\cu@jdnFromJulianDate{#1-#2-#3}}%
- \edef\cu@JDN@March@First{\cu@jdnFromJulianDate{#1-3-1}}%
+\def\cu@@formatDateJulian#1-#2-#3\relax{%
+ \edef\cu@JDN{\cu@jdnFromDateJulian{#1-#2-#3}}%
+ \edef\cu@JDN@March@First{\cu@jdnFromDateJulian{#1-3-1}}%
\edef\cuYEAR{\number #1}%
\edef\cuYEARAM{\the\numexpr #1 + 5508\ifnum\cu@JDN<\cu@JDN@March@First\else + 1\fi}%
\edef\cuMONTH{\number #2}%
@@ -169,14 +169,14 @@
\egroup
}%
%
-\protected\def\cu@formatJulianDate#1-#2-#3\relax{%
+\protected\def\cu@formatDateJulian#1-#2-#3\relax{%
\bgroup
- \cu@@formatJulianDate#1-#2-#3\relax
+ \cu@@formatDateJulian#1-#2-#3\relax
\cuDISPLAYDATE
\egroup
}%
\cuDefineDateFormat{default}{%
- \cuNum{\cuDAY}~\cuMonthName{\cuMONTH}~лѣ́та~\cuNum{\cuYEAR}%
+ \cuNum{\cuDAY}~\cuMonthName{\cuMONTH},~лѣ́та~\cuNum{\cuYEAR}%
}%
\cuUseDateFormat{default}%
%
diff --git a/Master/texmf-dist/tex/latex/churchslavonic/cu-kinovar.sty b/Master/texmf-dist/tex/latex/churchslavonic/cu-kinovar.sty
index f678b623d76..445067e4fe9 100644
--- a/Master/texmf-dist/tex/latex/churchslavonic/cu-kinovar.sty
+++ b/Master/texmf-dist/tex/latex/churchslavonic/cu-kinovar.sty
@@ -16,6 +16,10 @@
\renewcommand{\cu@kinovar}[1]{\textcolor{kinovar-gray}{#1}}
\renewcommand{\cu@kinovar@color}{\color{kinovar-gray}}
}
+\DeclareOption{grey}{
+ \renewcommand{\cu@kinovar}[1]{\textcolor{kinovar-gray}{#1}}
+ \renewcommand{\cu@kinovar@color}{\color{kinovar-gray}}
+}
\DeclareOption{bw}{
\renewcommand{\cu@kinovar}[1]{#1}
\renewcommand{\cu@kinovar@color}{\relax}