summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi63
1 files changed, 63 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi b/Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi
new file mode 100644
index 00000000000..b0d2673cd48
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-itc.mkvi
@@ -0,0 +1,63 @@
+%D \module
+%D [ file=typo-itc,
+%D version=2011.10.08,
+%D title=\CONTEXT\ Typesetting Macros,
+%D subtitle=Italic Correction,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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 Typesetting Macros / Italics Corrections}
+
+\unprotect
+
+%D The brave might try:
+%D
+%D \starttyping
+%D \definefontfeature[default][default][itlc=yes,textitalics=yes]
+%D \setupitaliccorrection[global,always]
+%D \stoptyping
+
+\registerctxluafile{typo-itc}{1.001}
+
+\definesystemattribute[italics] [public]
+\definesystemattribute[mathitalics][public]
+
+% \let\/=/
+% \let\emphasiscorrection\donothing
+
+\ifdefined \normalitaliccorrection \else
+ \let\normalitaliccorrection\italiccorrection
+\fi
+
+\unexpanded\def\italiccorrection
+ {\ifnum\attribute\italicsattribute<\plusone\normalitaliccorrection\fi}
+
+\let\/\italiccorrection
+
+% 1 = end of word
+% 2 = end of word and end of a list
+
+\unexpanded\def\setitaliccorrection[#code]% rather low level (might go away)
+ {\clf_setitaliccorrection#code\relax}
+
+\unexpanded\def\resetitaliccorrection% rather low level (might go away)
+ {\clf_resetitaliccorrection}
+
+% global : no attributes, just always (faster and less memory)
+% text : only text
+% always : text and boxes
+% none : -
+
+\unexpanded\def\setupitaliccorrection[#settings]%
+ {\clf_setupitaliccorrection{#settings}}
+
+\appendtoks
+ \attribute\italicsattribute\attributeunsetvalue
+\to \everymathematics
+
+\protect \endinput