Horizontal Whitespace¶
Markup annotation introducing horizontal whitespace
Note
Do not confuse this with the <whitespace>
structure element and <t-whitespace>
markup element that are used for vertical whitespace, see
Vertical Whitespace.
Specification¶
Annotation Category: | |
---|---|
Declaration: |
|
Version History: | |
Since the v2.5.0 |
|
Element: |
|
API Class: |
|
Required Attributes: | |
Optional Attributes: | |
|
|
Accepted Data: |
|
Valid Context: |
Description & Examples¶
If normal spacing is not enough and you need to express horizontal whitespace explicitly, then you can use the
<t-hspace>
element.
<t>To be<t-hspace class="long" />or not to be</t>
The vocabulary is defined by your set definition and you can assign your own size-interpretation. Tools that are not aware of your vocabulary should simply render a single space.
An alternative to t-hspace
is to use the xml:space="preserve"
attribute as described in
Preserving whitespace (advanced), but the use of <t-hspace>
is preferred.
The last section in this example shows horizontal whitespace:
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 | <?xml version="1.0" encoding="utf-8"?> <FoLiA xmlns="http://ilk.uvt.nl/folia" version="2.5.0" xml:id="example"> <metadata> <annotations> <text-annotation> <annotator processor="p1" /> </text-annotation> <division-annotation set="https://raw.githubusercontent.com/LanguageMachines/uctodata/master/setdefinitions/divisions.foliaset.xml"> <annotator processor="p1" /> </division-annotation> <whitespace-annotation> <annotator processor="p1" /> </whitespace-annotation> <hspace-annotation> <annotator processor="p1" /> </hspace-annotation> <linebreak-annotation> <annotator processor="p1" /> </linebreak-annotation> <hyphenation-annotation> <annotator processor="p1" /> </hyphenation-annotation> </annotations> <provenance> <processor xml:id="p1" name="proycon" type="manual" /> </provenance> </metadata> <text xml:id="example.text"> <div xml:id="example.div.1" class="section" n="1"> <t>Blah...</t> </div> <whitespace /> <br newpage="yes" pagenr="2" /> <div xml:id="example.div.2" class="section" n="2"> <!-- BR has a double role, it can be used a text markup element as well, as seen on the next line --> <t>To be, <br />or not to be!</t> </div> <div xml:id="example.div.3" class="section" n="3"> <t>Don't leave me bro<t-hbr/>ken and alone!</t> </div> <div xml:id="example.div.4" class="section" n="4"> <t>Space,<t-hspace/>the<t-hspace/>final<t-hspace/> frontier</t> </div> </text> </FoLiA> |