https://bugs.documentfoundation.org/show_bug.cgi?id=171459

            Bug ID: 171459
           Summary: Add "Number Only" format option for Cross-referencing
                    List Styles and Chapter Numbering (ignoring
                    Before/After separators)
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Currently, in LibreOffice Writer, if a user sets up a custom List Style (or
Chapter Numbering) with a prefix/suffix (e.g., List Style > Customize >
Separator > Before: "Article "), cross-referencing that numbered paragraph
forces the insertion of the entire string (e.g., "Article 32").

The Problem: For highly inflected languages (like Albanian, German, Slavic
languages), the prefix changes based on grammatical cases (e.g., "sipas nenit
32", "të nenit 32", "nenin 32"). Furthermore, spelling rules or specific style
guides often require the word to start with a lowercase letter when used
mid-sentence. Because the cross-reference pulls the hardcoded "Article " (or
"Neni ") prefix from the List Style's Separator settings, users cannot
grammatically or stylistically integrate the cross-reference into a sentence.

Proposed Solution: In the Cross-references dialog (Insert > Cross-reference >
Type: Numbered Paragraphs / Headings), please add a new format option under the
"Insert reference to" list called "Number only".

This option should fetch strictly the generated numbering variable (e.g.,
"32"), completely ignoring any text defined in the "Before" or "After"
separator fields of the applied List Style.

This feature is critical for professional legal and academic drafting in
non-English languages and is a standard feature in competing word processors
(e.g., Word's "Paragraph number (no context)").

Steps to Reproduce:
1. Open a new LibreOffice Writer document.

2. Open the Styles deck (F11), go to List Styles, right-click Numbering 1, and
select Modify.

3. Go to the Customize tab. In the Separator section, type "Article " (with a
trailing space) in the Before field. Click OK.

4. Type some text (e.g., "General Provisions") and apply the "Numbering 1" List
Style. It will automatically generate "Article 1 General Provisions".

5. Press Enter to create a second paragraph, type "Definitions", and it will
generate "Article 2 Definitions".

6. Somewhere else in the document, type a sentence where you want to reference
the number grammatically: "In accordance with article " 7. Go to Insert >
Cross-reference.

7. Set Type to Numbered Paragraphs. Select "Article 2" from the Selection list.

8. Set Insert reference to to Number (or Number (no context)). Click Insert.

Actual Results:
The cross-reference inserts the entire string including the prefix: "In
accordance with article Article 2".

Expected Results:
There should be an option (e.g., Number only) that strictly inserts just the
generated integer: "In accordance with article 2".


Reproducible: Always


User Profile Reset: No

Additional Info:
Current Workarounds — Currently, users must either:

1. Abandon the "Before/After" separator feature in List Styles entirely and
type the prefixes manually for every heading.

2. Use the "Number range" variable feature instead of standard List Styles,
which is tedious, less integrated with outline levels, and prone to user error.

Comparative Software: Microsoft Word handles this natively. When inserting a
cross-reference to a numbered item, Word provides the option "Paragraph number
(no context)", which strips the hardcoded text and inserts only the integer.
Implementing a similar "Number only" option in LibreOffice would drastically
improve its usability and adoption among legal professionals, drafters, and
academics working in highly inflected languages.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to