diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2008-06-12 10:42:53 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2008-06-12 10:42:53 +0000 |
commit | 0d01365d53c456d246da0ca1f0b3cd9868f02b35 (patch) | |
tree | 01a655c8028e17cfb371456b299c1848fe08c05b /Master/texmf-dist/tex/context/base/page-par.tex | |
parent | 44f3714442da07fdfc36a7f2a8dcd5d4294c5d26 (diff) |
ConTeXt release 2008.05.21
git-svn-id: svn://tug.org/texlive/trunk@8691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/page-par.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/page-par.tex | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/page-par.tex b/Master/texmf-dist/tex/context/base/page-par.tex new file mode 100644 index 00000000000..fa1723d37ce --- /dev/null +++ b/Master/texmf-dist/tex/context/base/page-par.tex @@ -0,0 +1,58 @@ +%D \module +%D [ file=page-par, % copied from page-lin +%D version=1997.03.31, +%D title=\CONTEXT\ Core Macros, +%D subtitle=Line Numbering, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{Context Core Macros / Paragraph Numbering} + +\unprotect + +\newcount\internalparagraphnumber + +\def\setupparagraphnumbering + {\dosingleempty\dosetupparagraphnumbering} + +\def\dosetupparagraphnumbering[#1]% + {\getparameters + [\??ph][#1]% + \processaction + [\@@phstate] + [\v!start=>\let\showparagraphnumber\doshowparagraphnumberA, + \v!stop=>\let\showparagraphnumber\relax, + \v!line=>\let\showparagraphnumber\doshowparagraphnumberB, + \v!reset=>\global\internalparagraphnumber\zerocount + \let\showparagraphnumber\doshowparagraphnumberA]} + +\def\dodoshowparagraphnumber + {\global\advance\internalparagraphnumber \plusone + \inleftmargin % \tf normalizes em + {\tf{\doattributes\??ph\c!style\c!color{\the\internalparagraphnumber}}% + \kern\@@phdistance}} + +\def\doshowparagraphnumberA + {\ifprocessingverbatim + \iflinepar\dodoshowparagraphnumber\fi + \else + \dodoshowparagraphnumber + \fi} + +\def\doshowparagraphnumberB + {\ifnumberinglines + \doshowparagraphnumberA + \fi} + +\setupparagraphnumbering + [\c!state=\v!stop, + \c!style=, + \c!color=, + \c!distance=\ifcase\linenumberlocation2em\else\!!zeropoint\fi] % will change + +\protect \endinput |