Close this window

Using the <label> tag

Description

The label tag is used to override the default label for CNXML elements that use labels, such as figure and example. This can be particularly helpful when translating content to other languages. The label tag does not affect numbering; numbering is controlled by the parent tag's "type" attribute.

Example

This CNXML:


<figure id="fig1">
  <label>Figura</label>
  <media id="dogpic" alt="Perro sentado en la cama">
    <image mime-type="image/jpeg" src="image1.jpg" />
  </media>
  <caption>Este es mi perro Benny
    haciendo lo que hace mejor.</caption>
</figure>
        

Results in this display:

Figura 1: Este es mi perro Benny haciendo lo que hace mejor.
Un perro sentado en una cama

Example

This CNXML:


<exercise id="science-exercise">
  <label>Short Answer</label>
  <problem id="se-problem">
    <para id="se-question">
      In your opinion, what is the single 
      greatest scientific accomplishment 
      of the 20th century?  Why?
    </para>
  </problem>
</exercise>
        

Results in this display:

Short Answer 1

In your opinion, what is the single greatest scientific accomplishment of the 20th century? Why?

Attributes(what's this?)

Children(what's this?)

term, cite, cite-title, foreign, emphasis, sub, sup, code, preformat, quote, note, list, media, footnote, link, newline, space, Unicode text

Parents(what's this?)

section, quote, equation, note, list, item, code, figure, subfigure, example, exercise, problem, solution, commentary, definition, seealso, rule, statement, proof, table
Close this window