diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-12 17:15:07 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-12 17:15:07 +0100 |
commit | 8d8d528d2ad52599f11250cfc567fea4f37f2a8b (patch) | |
tree | 94286bc131ef7d994f9432febaf03fe23d10eef8 /tex/context/base/typo-prc.mkvi | |
parent | f5aed2e51223c36c84c5f25a6cad238b2af59087 (diff) | |
download | context-8d8d528d2ad52599f11250cfc567fea4f37f2a8b.tar.gz |
2016-01-12 16:26:00
Diffstat (limited to 'tex/context/base/typo-prc.mkvi')
-rw-r--r-- | tex/context/base/typo-prc.mkvi | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/tex/context/base/typo-prc.mkvi b/tex/context/base/typo-prc.mkvi deleted file mode 100644 index 49a165696..000000000 --- a/tex/context/base/typo-prc.mkvi +++ /dev/null @@ -1,99 +0,0 @@ -%D \module -%D [ file=typo-prc, -%D version=2008.10.20, -%D title=\CONTEXT\ Structure Macros, -%D subtitle=Processors, -%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 / Processors} - -%D For the moment manipulators are loaded here too, as they're in the same -%D category as processors. This might change. (They are used in publications.) - -\registerctxluafile{typo-prc}{1.001} -\registerctxluafile{typo-man}{1.001} - -\unprotect - -%D Processors are used when we cannot easily associate typesetting directives -%D with (for instance) structural elements. Instead of ending up with numerous -%D additional definitions we can group treatments in so called processors. -%D -%D An example of where processors can be used is in separator sets (these are -%D related to typesetting numbers using structure). -%D -%D \starttyping -%D \defineprocessor[demo][style=\bfb,color=red] -%D \stoptyping -%D -%D This defines a processor named \type {demo}. Such a name ends up as prefix in -%D for instance: -%D -%D \starttyping -%D \defineseparatorset [demosep] [demo->!,demo->?,demo->!,demo->?] [demo->@] -%D \stoptyping -%D -%D Here the \type {!} and \type {?} are just the seperator characters that end -%D up between part, chapter, section, etc.\ numbers. The third argument defines the -%D default. When a separator is inserted, the \type{demo} processor will be applied. -%D Here the number will be separated by red slightly bigger than normal bold -%D exclamation marks and questionmarks -%D -%D Valid keys for defining a processor are \type {style}, \type {color}, \type {left}, -%D \type {right}, and \type {command} (the given command takes one argument). - -\installcorenamespace{processor} -\installcorenamespace{processorcheck} - -\installcommandhandler \??processor {processor} \??processor - -\appendtoks - \letvalue{\??processorcheck\currentprocessor}\relax - \clf_registerstructureprocessor{\currentprocessor}% global, but it permits using processor that are yet undefined -\to \everydefineprocessor - -%D The following command can be used by users but normally it will be -%D invoked behind the screens. After all, processor prefixes need to -%D be split off first. At the \LUA\ end we do check for a processor -%D being registered anyway. - -\unexpanded\def\applyprocessor#tag% - {\def\currentprocessor{#tag}% - \ifcsname\??processorcheck\currentprocessor\endcsname - \expandafter\typo_processor_apply - \else - \expandafter\firstofoneargument - \fi} - -\def\typo_processor_apply - {\edef\p_state{\processorparameter\c!state}% - \ifx\p_state\v!stop - \expandafter\firstofoneargument - \else - \expandafter\typo_processor_apply_indeed - \fi} - -\def\typo_processor_apply_indeed#content% - {\begingroup - \useprocessorstyleandcolor\c!style\c!color - \processorparameter\c!left - \processorparameter\c!command{#content}% - \processorparameter\c!right - \endgroup} - -%D \startbuffer -%D \defineprocessor[first] [style=bold] -%D \defineprocessor[last] [first] [color=red] -%D -%D \applyprocessor{first}{hans} \applyprocessor{last}{hagen} -%D \stopbuffer -%D -%D \typebuffer \start \blank \getbuffer \blank \stop - -\protect \endinput |