Bug 55436 - Need another numbering scheme: *, †, ‡, §, etc. (mainly for footnotes)
Summary: Need another numbering scheme: *, †, ‡, §, etc. (mainly for footnotes)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.1.2 release
Hardware: All All
: medium enhancement
Assignee: Tim B
URL:
Whiteboard: target:6.4.0
Keywords: needsDevEval, topicUI
Depends on:
Blocks: DOCX-Limitations Footnote-Endnote DOCX
  Show dependency treegraph
 
Reported: 2012-09-28 21:00 UTC by Eyal Rozenberg
Modified: 2022-09-13 07:47 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2012-09-28 21:00:53 UTC
With LaTeX, I can do:

\documentclass[10pt]{article}
\usepackage[symbol*]{footmisc}

\begin{document}
One\footnote{f1} Two \footnote{f2} Three \footnote{f3} Four \footnote{f4}
\end{document}

And get *, †, ‡, § … as consecutive footnote markers. MS-Word has this feature too – an alternative footnote numbering scheme.

LibreOffice should have this too, I believe.
Comment 1 Roman Eisele 2012-09-29 08:07:52 UTC
IMHO this is a valid and useful feature request, so I set the status to NEW and the importance to “Enhancement”.
Comment 2 Roman Eisele 2012-09-29 08:16:49 UTC
However, let me add another hint:

there is no common international order of the *, †, ‡, § … footnote symbols; books about typography tell us that even in the English language and its varieties there are different convention about the order of these symbols; and, e.g., in Germany we had completely different tradition, namely to use
either
   * ** *** † †† †††
or
   * † ** †† *** †††
or just
   * ** *** **** ***** …
(I have seen all three both in real use and in textbooks).

Because of this diversity of conventions, IMHO the best solution would be to give the user the possibility to specify his/her own order. Could this done just by adding an edit field to the dialog window available in Writer via “Tools > Foot/Endnotes…”?! To the popup menu “Numbering”, we should add an entry “Custom”; and if the user selects that entry, an additional edit field near to the popup menu should get enabled, into which the user can enter the desired symbols, separated by blanks and/or commas.

But if this is too difficult, it would be also helpful to fulfill Eyal Rozenberg’s original request first, by just adding (I propose) two new entries to the “Numbering” popup menu there:
   *, †, ‡, § …
and (I suggest)
   * ** ***
Comment 3 Eyal Rozenberg 2012-10-01 14:58:27 UTC
Is there a keyword for MS Word feature parity?
Comment 4 Roman Eisele 2012-10-01 15:31:41 UTC
(In reply to comment #3)
> Is there a keyword for MS Word feature parity?

Not that I am aware of it. There is one (!) bug with the whiteboard (!) tag INTEROPERABILITY, so you can add it here, too, but this will probably not help very much … ;-) Once there was a very passionate QA volunteer who wanted to create a list of all interoperability issues, to make it easier to track and fix them, but he newer did what he announced :-(

So, what to do about this request now?

The best thing we could is to find some hacker who misses this feature, too, and wants to add it. But at the moment, I don’t know whom to ask. Caolán McNamara <caolanm@redhat.com> has implemented some similar features, cf. e.g. bug 38983, but he is one of our most important developers and very busy, so I hesitate to ask him. If you can think of some of our freelance contributors who has done similar work, and could sparse some time for this, so please ask him ...

Or we can just wait and hope ;-)
Comment 5 Emanuele Gissi 2014-09-25 07:10:30 UTC

*** This bug has been marked as a duplicate of bug 52048 ***
Comment 6 Eyal Rozenberg 2016-09-29 19:47:27 UTC
(In reply to Emanuele Gissi from comment #5)
> 
> *** This bug has been marked as a duplicate of bug 52048 ***

I know this decision was taken a while ago, but I had assumed it was in the interest of expediency somehow, and that the custom-numbering-schemes bug would be resolved soon - something which has not happened.

The common footnote numbering scheme I asked for, available in Word, is important enough to be available regardless of the ability of defining custom numbering schemes (and perhaps also the two schemes suggested by Roman Eisele). The implementation is also likely - I would think - to be simpler. So, I'm reopening this as a non-duplicate. Feel free to voice objections.
Comment 7 Yousuf Philips (jay) (retired) 2016-10-20 03:55:25 UTC
Hi Eyal,

If this can be easily fixed by simply adding a new entry into the Tools > Footnotes and Endnotes dialog, then we should go for it.

@Regina, @Stuart, @Cor: Any thoughts or code pointers?

These files seemed relevant from my search.
http://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/style/NumberingType.idl
http://opengrok.libreoffice.org/xref/core/sw/uiconfig/swriter/ui/footnotepage.ui
Comment 8 V Stuart Foote 2016-10-20 06:07:52 UTC
The "old" page and table "footnote" order for AMA (American Medical Association) is: *, †, ‡, §, ||, ¶ then doubles, then triples. But in the last manual they have limited the symbol usage to just page footnotes (using superscript lowers for tables) so fewer symbols are needed for just footnotes.

Seems we would not need the double vertical line (‖ - U+2016) while use of the pilcrow (¶ - U+00b6) would interfere with our paragraph marker when non-printing characters are showing. 

Chicago (Univ of Chicago) manual of style uses the sequence *, †, ‡, §... when Endnotes are mixed with Footnotes on a page.

So here I would agree to matching the MS Office OOXML use of just the *, †, ‡, §... sequence. As it makes sense both to provide a symbol number format--but also for interoperability--looking at an OOXML document MS Office annotates this number format as "chicago" in the XML.

Correct way would be to add a new constant entry to the NumberingType.idl and then implement the fixed sequence(s) of

* - U+002a
† - U+2020
‡ - U+2021
§ - U+00a7

then double symbols, then triple symbols. 

The NumberingType constant could be named "CHICAGO" in the IDL, or generic "SYMBOL_NUMBERING".
Comment 9 V Stuart Foote 2016-10-20 07:04:29 UTC
Would make sense to use the ISO/IEC-29500 routine from the OOXML/ECMA-376 Part 1 
http://www.ecma-international.org/publications/standards/Ecma-376.htm

(§17.18.59) pg 1413,1414

chicago

Specifies that the sequence shall consist of one or more occurrences of a single character from the set listed below.  

To determine the text that is displayed for any value, this sequence specifies a set of characters that represent positions 1–4 and then repeats those same characters using the logic defined below to construct all other values.  
The set of characters used by this numbering format for values 1–4 is U+002A, U+2020, U+2021, and U+00A7, respectively.  

For values greater than 4, the text displayed shall be constructed as follows: 1. Repeatedly subtract the size of the set (4) from the value until the result is equal to or less than the size of the set. 2. The remainder determines which character to use from the set above, and that character is written once and then written once and then repeated the number of times the size of the set was subtracted from the original value.  

[Example: The first nine items in this format are:  *, †, ‡, §, **, ††, ‡‡, §§, ***. end example

And then this would need to be added to the ww8 filter for import/export interoperability.
Comment 10 Eyal Rozenberg 2017-07-02 15:21:13 UTC
About the different orders of symbols: This is an interesting academic argument, but it's a bit beside the point. LO definitely needs the same order as MS Word has, for feature parity and importing; alternative orders can also be added as options.

How hard would it be to implement this? Is it anything beyond adding another option on a menu and a small function converting a number to a string according to the logic in comment #9? 

If it's easy - how come nobody's submitted a patch yet. If it's difficult - why?
Comment 11 Commit Notification 2019-09-02 10:57:24 UTC
Tim Bartlett committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/0fbcac4caa971bd8824c96fe9ef7d9338cd37cbc%5E%21

tdf#55436 - Add SYMBOL_CHICAGO numbering scheme (for footnotes)

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Eyal Rozenberg 2019-09-02 11:10:21 UTC
(In reply to Commit Notification from comment #11)

* What guarantees that two-daggers would be followed by two-double-daggers etc.?
* What about using the pipe (‖) and the pilcrow (¶) symbols before starting to double symbols? See https://en.wikipedia.org/wiki/Note_(typography)
Comment 13 Mike Kaganski 2019-09-02 11:35:11 UTC
(In reply to Eyal Rozenberg from comment #12)
> * What guarantees that two-daggers would be followed by two-double-daggers
> etc.?

The question is unclear. Do you mean the code? then using lcl_formatChars1 with the new table_Chicago does.

> * What about using the pipe (‖) and the pilcrow (¶) symbols before starting
> to double symbols? See https://en.wikipedia.org/wiki/Note_(typography)

IIUC, the commit adds MS Word-compatible scheme. It's good that one commit only makes one change; another scheme should go in a different commit.
Comment 14 Tim B 2019-09-02 11:39:48 UTC
(In reply to Eyal Rozenberg from comment #12)
> (In reply to Commit Notification from comment #11)
> 
> * What guarantees that two-daggers would be followed by two-double-daggers
> etc.?
> * What about using the pipe (‖) and the pilcrow (¶) symbols before starting
> to double symbols? See https://en.wikipedia.org/wiki/Note_(typography)

I was just in the process of writing basically the same thing Mike said. The double-symbol logic is calling the same internal function as for upper and lower alphabetic footnotes, just using a different character table. That function works through the entire list (in this case only four of them), and then repeats with doubled symbols, then tripled, etc.

As for the pipe / pilcrow symbols, the current patch I wrote hasn't added them as I was going for compatibility with MS Office, which uses only the first four symbols (*, †, ‡, §) and then double/triple multiples of them.
Comment 15 Eyal Rozenberg 2019-09-02 15:06:49 UTC
(In reply to Tim B from comment #14)
> I was just in the process of writing basically the same thing Mike said. The
> double-symbol logic is calling the same internal function as for upper and
> lower alphabetic footnotes, just using a different character table. That
> function works through the entire list (in this case only four of them), and
> then repeats with doubled symbols, then tripled, etc.

Ah yes, I see now, I was confused by this line in the code:

{style::NumberingType::SYMBOL_CHICAGO,          "*, " S_DAGGER ", " S_DBL_DAGGER ", " S_SECTION ", **, " S_DAGGER S_DAGGER ", ...", LANG_ALL},

> As for the pipe / pilcrow symbols, the current patch I wrote hasn't added
> them as I was going for compatibility with MS Office, which uses only the
> first four symbols (*, †, ‡, §) and then double/triple multiples of them.

Ok. I haven't used MS-Word in a few years, so I no longer remember. Just be sure that MS-Word does indeed only use those four.

Otherwise - nice going, thank you :-)
Comment 16 Tim B 2019-09-03 11:20:03 UTC
(In reply to Eyal Rozenberg from comment #15)
> Ah yes, I see now, I was confused by this line in the code:
> 
> {style::NumberingType::SYMBOL_CHICAGO,          "*, " S_DAGGER ", "
> S_DBL_DAGGER ", " S_SECTION ", **, " S_DAGGER S_DAGGER ", ...", LANG_ALL},
> 
> > As for the pipe / pilcrow symbols, the current patch I wrote hasn't added
> > them as I was going for compatibility with MS Office, which uses only the
> > first four symbols (*, †, ‡, §) and then double/triple multiples of them.
> 
> Ok. I haven't used MS-Word in a few years, so I no longer remember. Just be
> sure that MS-Word does indeed only use those four.
> 
> Otherwise - nice going, thank you :-)

Sure, that line is just the display label for it (because if left to auto-generate a label, it stops after the '**' which IMO isn't quite as clear as I'd like).

I checked this on a copy of MSWord before submitting just to be sure -- it does the same, using just these four symbols.