Bug 141429 - Insertion dialog should allow prefixing section-number reference with section symbol
Summary: Insertion dialog should allow prefixing section-number reference with section...
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: Cross-reference-dialog
  Show dependency treegraph
 
Reported: 2021-04-01 13:32 UTC by Eyal Rozenberg
Modified: 2021-05-07 07:18 UTC (History)
2 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 2021-04-01 13:32:51 UTC
The Latin-1 (and Unicode) character sets have a symbol for document sections,  or section references: § (U+00a7). It would be nice if references to section, subsections, subsubsections etc could optionally have this symbol added. This would require the reference selection dialog (i.e. the Reference pane of the Fields insertion dialog) to have a checkbox added for including this symbol right before the number or what-not.
Comment 1 Dieter 2021-04-16 06:38:14 UTC
Eyal I don't understand your idea.

I've tried as follows:
1. Insert a section into a document
2. Insert > Field > More Fields > Cross-References

I can't find an option to add reference to a section

Could you please explain your idea more detailed? Thank you.
=> NEEDINFO
Comment 2 Eyal Rozenberg 2021-04-17 15:13:29 UTC
(In reply to Dieter from comment #1)
> I can't find an option to add reference to a section

I was using LaTeX terminology which may have thrown you off, so I'll clarify / tweak the description.

It would be nice if references to numbered paragraphs - especially numbered Heading N paragraphs, typically used to indicate section, subsections, subsubsections etc - could optionally have this symbol added. This would require the dialog for inserting a reference to a numbered paragraph to have an extra checkbox, which when checked, would add the section symbol right before the rest of the reference text (e.g. "§1.2.3" or "§ 1.2.3" instead of just "1.2.3").

References to numbered paragraphs are inserted in one of (at least) two ways:

1. Menu Bar > Insert > Cross Reference...
2. Menu Bar > Insert > Field > More Fields... > Cross Reference pane

(both of the above lead to the same dialog.)
Comment 3 QA Administrators 2021-04-18 03:50:02 UTC Comment hidden (obsolete)
Comment 4 Dieter 2021-04-18 11:21:21 UTC
Eyal, just for clarification: I assume, your talking about Chapter, subchapter, susubchapter, ... instead of section, subsection, ...

If you want to add a symbol at the beginning of the heading itself, you can define that in the chapter numbering dialog. If you want to add a symbol before the cross reference you can type it as normal character before you insert the cross-reference. Does this solve your problem? Personally I don't see the need for any change here.
Comment 5 Eyal Rozenberg 2021-04-18 17:01:20 UTC
(In reply to Dieter from comment #4)
> Eyal, just for clarification: I assume, your talking about Chapter,
> subchapter, susubchapter, ... instead of section, subsection, ...

Well, the symbol is a "section sign":
https://en.wikipedia.org/wiki/Section_sign
so not really.

> If you want to add a symbol at the beginning of the heading itself,

Oh no, not at all, that's not how you use that symbol.

> If you want to add a symbol
> before the cross reference you can type it as normal character before you
> insert the cross-reference. 

1. The section reference is very difficult to type - it's not on most keyboards, and you have to have its relevant code point memorized.
2. One can always type things manually; the point of this bug is to offer this symbol to be prefixed, in the dialog; and you wouldn't need to choose it every time - the choice would persist so that it would be added next time you reference a section if you don't un-check the box.
3. People who are not aware of this custom will not think of typing in the section symbol, especially since (1.)
Comment 6 Dieter 2021-04-22 14:54:47 UTC
O.K., I understand your request. So it's up to Design-Team to decide (personally I don't see the need for it)

cc: Design-Team
Comment 7 Heiko Tietze 2021-04-23 09:02:19 UTC
(In reply to Eyal Rozenberg from comment #5)
> 1. The section reference is very difficult to type...

Once you picked it up in the special characters dialog, eg. by searching for "section", it will be on the list of recent characters. Not too difficult to use.

OTOH, changing the cross-reference dialog is cumbersome. The option would be available only in case of Heading/Numbered Paragraphs using Chapter/Number. I see users requesting other symbols, for example an arrow, or more than one character.

Any other opinion?

The more elegant solution would be to have an extra character style for the separator before a chapter numbering. You could add the symbol to all chapters but make it hidden per character style. The cross-reference wouldn't take this CS, however, and show the symbol. Not possible, and pretty questionable too.
Comment 8 Eyal Rozenberg 2021-04-23 10:32:13 UTC
(In reply to Heiko Tietze from comment #7)
> The more elegant solution would be to have an extra character style for the
> separator before a chapter numbering. You could add the symbol to all
> chapters but make it hidden per character style. The cross-reference
> wouldn't take this CS, however, and show the symbol. Not possible, and
> pretty questionable too.

I actually don't find this to be elegant... the section symbol should really not be part of the number; fundamentally, it is added when referencing, as opposed to being hidden when not-referencing.

> Once you picked it up in the special characters dialog, eg. by searching for
> "section", it will be on the list of recent characters. Not too difficult to
> use.

This means that for every insertion of a cross reference you have to perform several actions (keypresses, mouse clicks) which require a bit of concentration and aren't just some mnemonic. This is a significant de-motivator for people using the section symbol for all their references; if this were automated, they are much more likely to adopt the custom if they approve of it.

But there's another kind of difficulty which I only alluded to in my opening comment: The "discoverability" of this custom. The people who use section symbols in LO never do it because LO made them consider doing so; they saw it in print, and as the result of other typesetting systems or customs, and try to adopt this use. Part of the motivation for this issue is to expose this custom to people. Of course, not in a way which makes them take an active decision ("Do you want to add the section symbol Y/N?"), but as an option they can choose to explore or to ignore.

> OTOH, changing the cross-reference dialog is cumbersome.

Actually, I think it's a bit unwieldy right now anyway, regardless of the section symbol issue, but I should probably open a separate bug about that. But of course placing this in the dialog would require a bit of thought.

It also occurred to me that another (less flexible) option is to add this as an item in the "Insert Reference To" menu. That way it is constrained to be available only for the appropriate types of reference. The downsides are that you can't add/remove the section symbol from all relevant references after having inserted them; and also this:

> I see users requesting other symbols, for example an arrow, or more than one
> character.

That's not impossible, I suppose. However, it is not so likely to 1. happen 2. happen quickly and 3. require immediate action. After all, it's taken 10 years of LO for this bug to be filed, and that's for the most (and only?) common section-reference character. I get how you would not be thrilled about making a UI change anticipating a potential additional required change further down the line, but that shouldn't be an argument against making the change at all.

And one can always conceive of further complications, e.g. wanting a multi-character rather than single-character prefix, wanting style for the character prefix etc. etc.

> The option would be
> available only in case of Heading/Numbered Paragraphs using Chapter/Number.

I'm not sure what you mean by "using chapter/number".

Anyway, note that we already have some grayed-out elements in the dialog; so perhaps this one could get grayed-out when irrelevant, if it's placed as a checkbox.
Comment 9 Heiko Tietze 2021-04-23 18:52:38 UTC
Very good arguments. But I have another one, probably more striking: Since we are bound to the ODF definition such a prefix needs to be defined there. Adding a character before the field might be possible, ideally per extension, but consider also that the reference might change later. My take: good for an extension.
Comment 10 Eyal Rozenberg 2021-04-23 19:04:41 UTC
(In reply to Heiko Tietze from comment #9)
> Very good arguments. But I have another one, probably more striking: Since
> we are bound to the ODF definition such a prefix needs to be defined there.

Are you sure? I mean, it could just appear as a plain, non-field character in the ODF. The ODF spec doesn't have to define a "cross reference prefix" sub-field (although it might; where does file an issue about that?)
Comment 11 Heiko Tietze 2021-04-26 09:26:09 UTC
(In reply to Eyal Rozenberg from comment #10)
> it could just appear as a plain, non-field character

You may run into trouble if the source is deleted (gives a reference error). But yes, this approach is what I would do with the recommended extensions. Shouldn't be too difficult. More opinions please.
Comment 12 Heiko Tietze 2021-05-07 07:18:49 UTC
This topic was on the agenda for the design meeting. 

There are some hurdles and the feature would be better realized per extension. The prefix cannot be part of the reference as it requires to be in the ODF and will be prone to fail when the reference changes.