On 01/05/08 10:53, Michele wrote:
On Jan 3, 2008 7:56 PM, Mats Broberg <[EMAIL PROTECTED]> wrote:

Dan,

Thanks - but I need it to print at the crossref position (physically on
paper).

The reason I need this behavior is that I am adding endnotes to the body
and
footnote area of a historical text that already has footnotes. So to
emulate
endnotes, I thought I could crossref an autonumbered list from the body
area
and the footnote area. It will look the same, but relies on that the
crossref can return the actual autonumber of the listitem.

Thanks anyway.

Best regards,
Mats


Hello Mats,

I am not sure I understand what you are trying to do, but a while ago I
needed to reference a numbered item and I "solved" the problem with simple
trick (you may want to replace simple with dirty, it's a matter of taste :-)
):
What I did was to add as *hidden text* the number of the item next to the
actual number automatically generated, then then referenced it. The drawback
is that if someone activates the show hidden text they will "call your
bluff".

If you go for it and need to repeat this several times, I suggest you create
a character style specifying the attribute "hidden" (saves a lot of
clicking).

I tried to use the hidden text variable (which I think is the right way of
doing it), but did not manage because the reference inherits the property
"hidden".

Cheers,

Michele


Docbook has a simple way of doing this.  Attached are the input .xml
file and the (pretty printed) output .html file.
Also attached is the .xsl file doing the transformation.

I read somewhere in OOoWriter docs about filters.  I'm guessing
that a filter is somewhat like the .xsl file in that it does
some kind of transform on the doc. Maybe a filter
could do this numbering semi-automatically.
IOW, maybe as your composing the doc, the cross reference
numbers might appear as ?num? and then after the filter
is run they would have the proper numbers filled in.

Are there any filter experts out there that could shed
some light on this question?

BTW, my motivation for this is that I've got a legal
document from a lawyer, and he just left the paragraph
reference number blank.  I guess he anticipates inserting
or deleting paragraphs and figured why hardcode the paragraph
number in.  I also have a similar document from another
lawyer and the paragraph number was filled in; however,
it was off by one, AFAICT.  This illustrates the
importance of having this automated.  IOW, have a unique
identifier (like the id attribute for an xml element),
which the filter (or whatever) can use to retrieve or calculate
the correct paragraph (or listitem) number.

-Larry
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
                    "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";>
<!--
  Purpose:
    test how to reference an listitem number.
-->
<chapter><title>chapter_1.title</title>
<para>
Paragraph before orderedlist.
See item <xref linkend='ordlist_1.item_2.title'/>.
</para>
<orderedlist>
<listitem><para id='ordlist_1.item_1.title'>ordlist_1.item_1.title</para>
<para>ordlist_1.item_1.para_1</para>
<para>ordlist_1.item_1.para_2</para>
</listitem>
<listitem><para id='ordlist_1.item_2.title'>ordlist_1.item_2.title</para>
<para>ordlist_1.item_2.para_1</para>
<para>ordlist_1.item_2.para_2</para>
</listitem>
</orderedlist>
<para>
Paragraph after orderedlist. 
See item <xref linkend='ordlist_1.item_1.title'/>.
</para>
</chapter>

Attachment: listitem_num_ref.xsl
Description: XML document

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to