Posted on 2010-01-01 17:59:53-08 by benctphilip
How to create a footnote or endnote in an ODT document?
Is it possible to create/insert a footnote in an ODT document? If so how? I can find methods for appending paragraphs, headings, lists, tables and bookmarks, but not for notes. /BP
Direct Responses: 12082 | Write a response
Posted on 2010-01-03 20:04:50-08 by jmgdoc in response to 12056
Re: How to create a footnote or endnote in an ODT document?

This feature is not currently supported through a 'user-friendly' method; the present API allows easy retrieval of existing footnotes but not foot/endnote creation.
Of course it's possible to create a note through the low level OODoc::XPath methods (and a bit of knowledge of the OpenDocument Format), but it's not a smart way.
If such a feature is regarded as useful for a future release, please create a ticket in the issue tracker
(http://rt.cpan.org/Public/Dist/Display.html?Name=OpenOffice-OODoc),
describe the desired feature and select the 'wishlist' option in order to avoid confusion with a bug report.
Direct Responses: 12154 | Write a response
Posted on 2010-01-10 11:08:13-08 by benctphilip in response to 12082
Re: How to create a footnote or endnote in an ODT document?
I see that you added a method for this. Many thanks! But I don't understand how the offset option should be used. Is it the index of the character of the containing element which the note mark should be placed after? If so, can one use -1 as the value to place the note at the end of the containing element?
Direct Responses: 12161 | Write a response
Posted on 2010-01-11 13:39:24-08 by jmgdoc in response to 12154
Re: How to create a footnote or endnote in an ODT document?

As said here, offset specifies the numeric position of the note in the text of the target element.

The offset option is the index of the character which the note should be placed before.
If offset=0 (the default), the note is placed before the text.
If offset=-1, the note is placed before the last character.
If the insertion point depends on the content, the application may compute the offset using index() or a regex-based search.

The meaning of the offset parameter in setNote is consistent with setBookmark.
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.