Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footnote numbering in Document Server for ODT files #3056

Open
1 task done
polifr opened this issue Dec 17, 2024 · 0 comments
Open
1 task done

Footnote numbering in Document Server for ODT files #3056

polifr opened this issue Dec 17, 2024 · 0 comments

Comments

@polifr
Copy link

polifr commented Dec 17, 2024

This issue is unique.

  • I have used the search tool and did not find an issue describing my bug.

Operating System of DocumentServer

Linux (RPM package), Docker

Version information

8.1.3

Expected Behavior

On a Document Server + Nextcloud environment, I need to work with ODT (Open Document) text files.
These files contain various footnotes, I expect that whenever I load a file that contains a footnote the number in the text is correctly set, i.e. if I save a file with a "1" marked note, it will be still numbered as "1" the next time I load that file.

Actual Behavior

When dealing with ODT files, the number of the footnote is not correctly managed in the text, because is replicated each time the file is opened. For example, a "1" marked note in the text is shown as "11" on the following file opening, "111" on the third, and so on. Looking at the context.xml file of the saved document, I noticed this:

<text:span>Lorem ipsum text, with a footnote</text:span>
<text:span text:style-name="T37">
	<text:note text:id="note_1" text:note-class="footnote">
		<text:note-citation>1</text:note-citation>
		<text:note-body>
			<text:p text:style-name="P28">
				<text:span text:style-name="T38"/>
				<text:span text:style-name="T39">This is the footnote</text:span>
				<text:span text:style-name="T40"/>
				<text:span text:style-name="T41"/>
			</text:p>
		</text:note-body>
	</text:note>111
</text:span>
<text:span> on the text.</text:span>

Each time the file is opened, the value of the text:note-citation is appened after the </text:note> closure tag.

I am quite sure that this happens when opening the file, because otherwise if it happens each time the auto-save is triggered, the note reference in the text shall be longer.

This behavior only happens with ODT files; using DOCX the footnotes are managed correctly.

Reproduction Steps

On the shared folder (as I wrote before, I am using a Document Server connected with a NextCloud storage), create a new ODT file, save an existing docx file as an ODT or upload an ODT file that you already have on your local drive.

Write some text, then create a new footnote and put some text in it.
This will create a footnote that is marked as "1" in the text and in the footer of the page.

Save the file, close the editor.

Reopen the ODT file; now the note will be displayed as "11" in the text, and as "1" in the footer.
Deleting the rightmost "1" will fix the notation, while deleting the leftmost "1" will delete also the footnote.

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant