summaryrefslogtreecommitdiff
path: root/doc/mallard/C/mal_block_desc.xml
blob: dca52d99466afa5c8a90f694011df6b6684fe7d2 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<page xmlns="http://www.gnome.org/~shaunm/mallard"
      type="topic"
      id="mal_block_desc">

<info>
  <version number="0.1" date="2009-04-19" status="incomplete"/>

  <credit type="author">
    <name>Shaun McCance</name>
    <email>shaunm@gnome.org</email>
  </credit>
  <copyright>
    <year>2007-2009</year>
    <name>Shaun McCance</name>
  </copyright>

  <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude" />

  <desc>FIXME</desc>
</info>

<title>Block Descriptions</title>

<synopsis><code mime="application/relax-ng-compact-syntax">
mal_block_desc = element desc {
  attribute style { xsd:NMTOKENS } ?,
  attribute * - (mal:* | local:*) { text } *,

  <link xref="mal_inline">mal_inline</link>
}
</code></synopsis>

<p>The <code>desc</code> element marks a short text description for
formal block elements like <link xref="mal_block_figure">figure</link>.
The description provided by <code>desc</code> is formatted as a caption
for the formal element.</p>


<!-- BEGIN examples -->
<section id="examples">
  <title>Examples</title>

  <p>Use <code>desc</code> to provide a caption for a figure:</p>

  <example>
    <code><![CDATA[
<figure>
  <media type="image" mime="image/png" src="figures/mallard.png"/>
  <desc>Drake, the Mallard mascot</desc>
</figure>
]]></code>
    <figure>
      <desc>Drake, the Mallard mascot</desc>
      <media type="image" mime="image/png" src="figures/mallard.png"/>
    </figure>
  </example>

  <p>More exaples of figures can be found on the page <link xref="mal_block_figure"/>.</p>
</section>
<!-- END examples -->


<!-- BEGIN processing -->
<section id="processing">
  <title>Processing Expectations</title>

  <p>The exact display of a description will depend on how the enclosing formal
  element is displayed.  A description is a block of text that should be displayed
  directly above or below the normal contents of the enclosing element.</p>

  <p>Display tools should attempt to display the description in a way that makes it
  clear that it belongs to the enclosing formal element.  For example, if a display
  tool draws a frame around an enclosing figure, it may choose to place the description
  inside that frame.  If the formal element is indented from its enclosing block, the
  description should also be at the same indentation level.</p>
</section>
<!-- END processing -->

</page>