/
r_command_blank.dita
164 lines (149 loc) · 5.28 KB
/
r_command_blank.dita
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="r_command_blank" xml:lang="en">
<title>\blank</title>
<shortdesc>The <cmdname>\blank</cmdname> command inserts <keyword>skip</keyword> (vertical
space) into the text block. The command can be used with keywords to indicate preset amounts
of skip, or with dimensions to create spaces of arbitrary skip.</shortdesc>
<prolog>
<metadata>
<audience type="user"/>
<category>document</category>
<prodinfo>
<prodname>ConTeXt</prodname>
<vrmlist>
<vrm version="iv" release="production" modification=""/>
</vrmlist>
</prodinfo>
</metadata>
</prolog>
<refbody>
<refsyn id="syntax">
<title>Syntax</title>
<synph>\blank <delim>[</delim><var importance="optional">OPTIONS</var><delim>]</delim></synph>
<simpletable>
<sthead>
<stentry>Name</stentry>
<stentry>Description</stentry>
<stentry>Values</stentry>
</sthead>
<strow conkeyref="command_vspacing/short_options">
<stentry/>
<stentry/>
<stentry/>
</strow>
</simpletable>
</refsyn>
<section id="options">
<title>Options</title>
<table frame="all" rowsep="1" colsep="1" id="options_table">
<tgroup cols="2">
<colspec colname="value_name" colnum="1" colwidth="1*"/>
<colspec colname="value_desc" colnum="2" colwidth="1*"/>
<thead>
<row>
<entry>Keyword</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row conkeyref="command_vspacing/options_start" conrefend="default.dita#default/options_stop" >
<entry/>
<entry/>
</row>
</tbody>
</tgroup>
</table>
</section>
<section conkeyref="command_vspacing/notes"/>
<example id="mwe" otherprops="no_output">
<title>Minimal Working Example</title>
<p>Use <cmdname>\blank</cmdname> commands directly in the text flow.</p>
<codeblock outputclass="normalize-space">
\starttext
\starttext
Here's our first sentence.
\blank[big]
We need to put more space above and less space below this sentence.
\blank[medium]
Here's our last sentence.
\stoptext
</codeblock>
</example>
<example id="example02" otherprops="no_output">
<title>Extended Example</title>
<p>Taken from the language manual; probably too involved for this reference.</p>
<codeblock>
\enableregime[utf]
% To fit all the examples on one page, we need a taller page
\definepapersize[tall][width=15cm, height=35cm]
\setuppapersize[tall]
The table below has a row for each \type{\blank[#1]} keyword, and three columns:
\startitemize[packed]
\item column 1 demonstrates \type{\blank[#1]} on its own;
\item column 2 shows what \type{\blank[#1]} does when it comes after a \type{\blank[medium]};
\item column 3 shows what does \type{\blank[#1]} when it comes before a \type{\blank[medium]}.
\stopitemize
\defineparagraphs[whiting]
[n=3,
before={\blank[none]}, % Minimal padding, please.
after={\blank[nowhite]}] %
\definestartstop[whiteafter][
before={\blank[none]} , % No padding, please
after={\blank[medium]} % The blank of interest
]
\definestartstop[whitebefore]
[before={\blank[medium]}, % The blank of interest
after={\blank[none]} % No padding, please
]
\def\example#1{%
\startwhiting
\type{#1} \crlf
Antelope, caribou, ocelot.
\blank[#1]
Don’t want an antelope nibbling the hoops.
\whiting
medium + {\tt #1}
% No crlf here, or it'll combine with \blank[none] to create a blank line anyway.
% (I assume it's equivalent to \crlf\crlf, or something.)
\startwhiteafter
Antelope, caribou, ocelot.
\stopwhiteafter
\blank[#1]
Don’t want an antelope nibbling the hoops.
\whiting
{\tt #1} + medium \crlf
Antelope, caribou, ocelot.
\blank[#1]
\startwhitebefore
Don’t want an antelope nibbling the hoops.
\stopwhitebefore
\stopwhiting
\hairline
}
\starttext
\example{small}
\example{medium}
\example{big}
\example{nowhite}
\example{back}
\example{white}
\example{disable}
\example{reset} % doesn’t seem to work with mkiv
\example{line}
\example{halfline}
\example{formula}
%\example{fixed} % mkiv only?
%\example{flexible} % mkiv only?
\example{none}
%\example{samepage} % mkiv only?
\stoptext
</codeblock>
</example>
</refbody>
<related-links>
<link href="https://source.contextgarden.net/tex/context/base/mkiv/spac-ver.mkiv" scope="external" format="html">
<linktext>Command definition in the <ph conkeyref="definitions/product_name"/> source file <filepath>spac-ver.mkiv</filepath></linktext>
</link>
</related-links>
</reference>