summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/churchslavonic/churchslavonic.sty
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/latex/churchslavonic/churchslavonic.sty
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/latex/churchslavonic/churchslavonic.sty')
-rw-r--r--Master/texmf-dist/tex/latex/churchslavonic/churchslavonic.sty30
1 files changed, 27 insertions, 3 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