This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Referencing figure number


wongkokwai-san wrote:

> How do I reference figures' number which is auto-generated? For example, I
> like to have "see Figure x.xx" where I don't know what x.xx is in advanced.
> Is there a DOCBOOK element I can use for this purpose?

But of course.  Given:

  <figure id="figure_of_an_airplane">
    . . .
  </figure>

You could reference it with:

  The first airplane (see <xref linkend="figure_of_an_airplane"/>) shows how
  . . .

After processing, it will look like:

  The first airplane (see Figure 2.4) shows how . . .

The "Figure" is localized, so if you have lang="zh_??" in the top element, it 
will display properly for Chinese (where "??" is either cn or tw).  I know it 
works with lang="ja" (XSL ==> HTML and FO->FOP->PDF paths).

If you're doing an example, instead of <figure>, use <example>.  The <xref> 
remains the same but will output "Example 2.4" instead.

Hope this helps.

-- 
Michael Westbay
Work: Beacon-IT http://www.beacon-it.co.jp/
Home:           http://www.seaple.icc.ne.jp/~westbay
Commentary:     http://www.japanesebaseball.com/

----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]