Re: <xref>, <term>, <systemitem> and all that sort of things

Subject: Re: <xref>, <term>, <systemitem> and all that sort of things
From: Norman Walsh <ndw@xxxxxxxxxx>
Date: Thu, 5 Nov 1998 10:40:26 -0500
| Say I have the following SGML text:
| 	<variablelist>
| 	<varlistentry>
| 	<term id="foo"><systemitem>foo</systemitem></term>
| And in some other place a text like:
| 	<para><systemitem>bar</systemitem> is actually a <xref
| 	linkend="foo" endterm="foo">.</para>
| I would expect to have the "imported" word "foo" in the refering text
| to retain the typewriter font from <systemitem>.  That is that the
| <xref> should not only copy the text to the destination, but also its
| formating.

I think you'd usually find that you _don't_ want that.  If you
insert a chapter title in running text by xrefing the chapter, you
don't expect the chapter title to get formatted as a chapter
title in the middle of your paragraph.

| This is the case for instance if the <xref> refers to an id located
| within a <refentrytitle> tag: the expansion of <xref> retain the
| effect of <systemitem>.

I don't follow. Can you provide an example?

| But it is not the case here when referring to a <term> tags: in my
| outputs, "foo" is only in italic (as for a xref to plain text) whereas
| bar is in typewriter italics (as usual with systemitem).
| Is there any special reason to drop the formating due to the original
| <systemiytem>?

XRef discards all original formatting and always uses italics.  You could
change this, by extending the mode used to format xref-endterms:

(mode xref-endterm-mode
    (make sequence
      font-posture: 'italic

| I'm wondering if it is a bug in the style-sheets or a feature.

It's a feature.  It may also be a bug, but it's definitely a feature ;-)

Norman Walsh <ndw@xxxxxxxxxx>      | Every new beginning comes from                 | some other beginning's end.

 DSSSList info and archive:

Current Thread