summaryrefslogtreecommitdiff
path: root/tex/context/base/core-mak.tex
blob: 56d4cdb23afa4eedda6d4d93996c164659d4d279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
%D \module
%D   [       file=core-mak,
%D        version=1997.10.05,
%D          title=\CONTEXT\ Core Macros,
%D       subtitle=General Makeup Commands,
%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 / General Makeup Commands}

\unprotect

% \definieerplaats[naam][instellingen]
% \plaats<naam>[[instellingen]]
% 
% - still undocumented and also not in setupb yet
% - kan ook intern/direct (scheelt duplicatie), zie \framedtext

\def\dodefinieerplaats[#1][#2]%
  {\getparameters 
     [\??pl#1]
     [\c!links=\hss,
      \c!rechts=\hss,
      \c!regelcorrectie=\v!uit,
      \c!dieptecorrectie=\v!uit,
      \c!marge=\v!standaard,
      %\c!voor=,
      %\c!na=, 
     #2]%
   \setvalue{\e!plaats#1}{\doplaats[\??pl#1]}}

\def\definieerplaats%
  {\dodoubleempty\dodefinieerplaats}

\def\doplaats%
  {\dodoubleempty\dodoplaats}

\def\dodoplaats[#1][#2]% correctie moet mooier 
  {\bgroup 
   \dowithnextbox
     {\setlocalhsize
      \getparameters[#1][#2]%
      \getvalue{#1\c!voor}%
      \doifvalue{#1\c!regelcorrectie}  {\v!aan} {\startbaselinecorrection}%
      \doifinset{\getvalue{#1\c!marge}}{\v!standaard,\v!ja}{\noindent}% 
      \hbox to \localhsize
        {\getvalue{#1\c!links}%
         \box\nextbox
         \getvalue{#1\c!rechts}}%
      \doifvalue{#1\c!dieptecorrectie} {\v!aan} {\baselinecorrection}%
      \doifvalue{#1\c!regelcorrectie}  {\v!aan} {\stopbaselinecorrection}%
      \getvalue{#1\c!na}%
      \egroup}
   \vbox}

\protect

\endinput