Bug 145239 - Customize footnote symbols
Summary: Customize footnote symbols
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 86741 (view as bug list)
Depends on:
Blocks: Numbering-Formats
  Show dependency treegraph
 
Reported: 2021-10-20 14:03 UTC by Walter Tuvell
Modified: 2022-05-31 10:44 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Custom footnote demo file with abbreviated ordinal-number footnote numbering style (12.30 KB, application/vnd.oasis.opendocument.text)
2022-05-30 12:13 UTC, László Németh
Details
Modified numbertext/en.sor (7.12 KB, text/plain)
2022-05-30 12:14 UTC, László Németh
Details
screenshot: custom footnote numbering (38.31 KB, image/png)
2022-05-30 12:17 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Tuvell 2021-10-20 14:03:36 UTC
It should be possible to customize the sequence of symbolic (non-serialized/numeric) footnotes in LO Writer. (Mostly usable for per-page usage.)

Currently, there's only the single hard-coded (traditional) sequence: * † ‡ § ** †† ‡‡ §§ …

I'd like to use, instead: 🞶 † § ¶ ‡ 🞶🞶 †† §§ ¶¶ ‡‡ … (where 🞶=U+1F7B6 ≠ *=U+002A)
Comment 1 Roman Kuznetsov 2022-05-20 20:39:36 UTC
Add UX-team

Personally I don't have strong opinion here. Let's say "I'm not against it" but it may be some devs problem with those new symbols that we get from OpenSymbol font
Comment 2 Heiko Tietze 2022-05-23 07:48:29 UTC
Footnotes can use all kind of auto-numbering, though all are hard-coded. ODF seems to allow a flexible assignment: "20.322 style:num-format...a value of type string" and I wonder if we can do something like for list styles with a user-defined character per level. Simplest solution from the UI POV is to have a string like "①②③" that continues similar to the Chicago style (introduced for bug 55436) after the maximum number showing ①①, ①② etc.
Comment 3 Heiko Tietze 2022-05-23 07:49:38 UTC
*** Bug 86741 has been marked as a duplicate of this bug. ***
Comment 4 Heiko Tietze 2022-05-23 07:53:03 UTC
More duplicates: bug 52048, bug 115679 and also solving the other issues in bug 113072.
Comment 5 V Stuart Foote 2022-05-23 13:39:33 UTC
bug 55436 added a fixed table of 'Chicago' sequence footnote markers.

It is a specific enhancement with hardcoded table with logic for repeating markers as the sequence expands.

Doing this one-off per reference system, or "simply" giving the user a means to specify their own sequence of footnote marks would lead to endless enhancement and feature creep.

Instead, we really should be looking to implement support for CSL (Citation Style List) where in addition to Footnote markings: parenthetical refs, list sequence, indentation, font, fontsize, etc. are defined.

See bug 121945 and dupes for what CSL offers and what is gained by pursuing more reasonable CSL support to parse and load document styling, greatly improving integration with referencing/authoring tools like Zotero or Mendeley.
Comment 6 Eyal Rozenberg 2022-05-24 19:02:54 UTC
My opinion:

Yes, some footnote reference mechanisms have auto-progression/numbering. But - some do not; and that may be sufficient for justifying this feature - even as a more general implementation of what we have now, which simply gets exposed for user addition. The implemented feature, at this point, could be customizing only fixed finite lists with no auto-progression.

However - I would only be in favor of this if there are multiple obvious examples. OP's example is one. Are there more? I'm not sure I buy ①②③. That is, without auto-numbering, it's not as useful, and even with it - I kind of doubt anybody would actually use this.

If there's only one or two obvious examples, we could for now just expand the  non-customizable selection.


(In reply to V Stuart Foote from comment #5)
> Instead, we really should be looking to implement support for CSL (Citation
> Style List)

But isn't that only for references/citations? Footnotes are distinct from that.
Comment 7 Heiko Tietze 2022-05-27 09:20:46 UTC
We discussed the topic in the design meeting.

While the user-defined string idea is easy to integrate into the UI it opens a can of worms. There are alternatives for special demands, eg. you could manually number the footnotes. Unless there is a clear need based on standards the advice is to resolve as WF. So do you have any reference?
Comment 8 Walter Tuvell 2022-05-27 17:06:59 UTC
As for references, Google for "sequence of symbols used for footnotes". When I did this just now, the first 4 hits showed 4 different sequences for the "standard/suggested" (LO's hard-coded sequence matched Wikipedia's).

But note also my comment about "🞶=U+1F7B6 ≠ *=U+002A". When using "star" as a footnote marker, you want to use "star," and not "asterisk." That's because asterisk is ALREADY superscript, so when used as footnote marker it becomes double-superscripted. Which is just plain wrong.
Comment 9 QA Administrators 2022-05-28 03:34:48 UTC Comment hidden (obsolete)
Comment 10 Heiko Tietze 2022-05-30 11:27:28 UTC
(In reply to Walter Tuvell from comment #8)
> As for references, Google for "sequence of symbols used for footnotes". 

http://printwiki.org/Footnote

"1. asterisk (*), 2. dagger (†), 3. double dagger (††), 4. paragraph symbol (¶), 5. section mark (§), 6. parallel rules (||), 7. number sign (#)."

https://en.wikipedia.org/wiki/Note_(typography)

"...the traditional order of these symbols in English is *, †, ‡, §, ‖, ¶."

> ...the first 4 hits showed 4 different sequences

Which is a good reason to pre-define the sequence. CMOS did that and we follow.

> But note also my comment about "🞶=U+1F7B6 ≠ *=U+002A".
Have seen it. Quite dangerous for a hard-coded character using a variable font.


So again: the idea is charming, brings all the flexibility we want to offer, and might be not too difficult to implement. But we better do not allow deviations from the standard.
If you want to use the "MEDIUM SIX SPOKED ASTERISK" just do it without the automatic numbering.
Comment 11 László Németh 2022-05-30 12:09:44 UTC
It's possible to customize footnote symbols:

– choose a Numbertext-based numbering style for the footnote numbers in Tools->Footnotes and Endnotes...;

– and modify the associated text file, e.g. en.sor for the English locale (Note: it seems, the language is locale dependent for footnotes, and not related to the document language, like the other orderings).

E.g. the patch for it:

$ diff  share/numbertext/en.sor.orig  share/numbertext/en.sor
191,195c191,211
< (.*1\d)	\1th
< (.*1)	\1st
< (.*2)	\1nd
< (.*3)	\1rd
< (.*)	\1th
---
> 1 🞶
> 2 †
> 3 §
> 4 ¶
> 5 ‡
> 6 🞶🞶
> 7 ††
> 8 §§
> 9 ¶¶
> 10 ‡‡
> 11 🞶🞶🞶
> 12 †††
> 13 §§§
> 14 ¶¶¶
> 15 ‡‡‡
> 16 🞶🞶🞶🞶
> 17 ††††
> 18 §§§§
> 19 ¶¶¶¶
> 20 ‡‡‡‡
> (.*)	\1

A test document, and the modified en.sor are attached. Check with an English locale setting (Tools->Options...->Language settings->Languages).
Comment 12 László Németh 2022-05-30 12:13:41 UTC
Created attachment 180468 [details]
Custom footnote demo file with abbreviated ordinal-number footnote numbering style

This numbering style ("1st, 2nd, 3rd...") is defined in Numbertext's en.sor text file in a LO installation, so it's easy to modify it under the ordinal-number section to get custom footnote numbering.

Note: footnote numbering uses the language filed defined in the locale setting, not language file of the document language.
Comment 13 László Németh 2022-05-30 12:14:48 UTC
Created attachment 180469 [details]
Modified numbertext/en.sor
Comment 14 László Németh 2022-05-30 12:17:19 UTC
Created attachment 180470 [details]
screenshot: custom footnote numbering
Comment 15 Heiko Tietze 2022-05-30 13:32:27 UTC
(In reply to László Németh from comment #11)
> It's possible to customize footnote symbols:

Doesn't these sor file belong to the external package and are hard-coded after changing it? (Don't find any *.sor file on this maschine, macOS host with LO sources and Arch Linux in a VBox with LO installed).
Comment 16 László Németh 2022-05-30 14:41:23 UTC
(In reply to Heiko Tietze from comment #15)
> (In reply to László Németh from comment #11)
> > It's possible to customize footnote symbols:
> 
> Doesn't these sor file belong to the external package and are hard-coded
> after changing it? (Don't find any *.sor file on this maschine, macOS host
> with LO sources and Arch Linux in a VBox with LO installed).

At least Debian has got a system-wide numbertext installation, maybe macOS has got the same. TDF's packages install them under /opt/libreoffice*/share/numbertext.
Comment 17 Heiko Tietze 2022-05-31 08:34:42 UTC
I'm on Arch Linux.

> find /usr/lib/libreoffice/ -name *.sor
Zarro results
> find ~/.config/libreoffice/ -name *.sor
Zarro results
> find /usr/lib/libreoffice/ -name *.sor
Sources/libreoffice/instdir/share/numbertext/Roman.sor
...
Sources/libreoffice/workdir/UnpackedTarball/libnumbertext/data/Roman.sor

Anyway, it would be super cool if those sor files were accessible at the user space so we can enhance per extension.
Comment 18 László Németh 2022-05-31 10:44:22 UTC
(In reply to Heiko Tietze from comment #17)
> Anyway, it would be super cool if those sor files were accessible at the
> user space so we can enhance per extension.

I agree, and it seems, the solution is the way. The April version of the package contains the other files, too, under usr/share/libnumbertext:

https://archlinux.org/packages/extra/x86_64/libnumbertext/

But I strongly think of fixing the recent bad list in Writer, because double superscripted asterisk is a bug obviously.