Bug 68755 - Need field for first/last ${referencetext} for a style (Live header)
Summary: Need field for first/last ${referencetext} for a style (Live header)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: Fields Writer-Enhancements
  Show dependency treegraph
 
Reported: 2013-08-30 14:18 UTC by Ulrich Windl
Modified: 2019-06-14 05:10 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Manual page (screenshot from PDF with manual highlights) from Ventura Publisher explaining live headers (66.86 KB, image/png)
2013-08-30 14:18 UTC, Ulrich Windl
Details
ToC with capitalized first letter (27.77 KB, image/png)
2019-06-11 09:22 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Windl 2013-08-30 14:18:08 UTC
Created attachment 84916 [details]
Manual page (screenshot from PDF with manual highlights) from Ventura Publisher explaining live headers

An important feature (that was present in Xerox' Ventura Publisher already more than 20 years ago) is still missing in LibreOffice: "Live Headers" with contents derived from the refernece text of some paragraph style

For example, if you create an index that is several pages long, you might want to add a heading that contains the text "K - M" if index entries from K to M are present on the particular page.

Suppose you have a paragraph style named "Index Letter" that is applied to every "T" index element. Now if you could add a field that references a specific paragraph style ("Index Letter") and evaluates to either the reference text of the style's first occurrence, or the style's last occurrence on the particular page, you would be done. To my knowledge such a feature does not exist in LibreOffice Writer.

Imagine you write a phonebook with Writer you might even want these new fields to evaluate to a substring of the beforementioned reference text, so that you get "Mil - Shn" instead of "Miller - Shneider".

I found a copy of the original manual for the Ventura publisher; let me quote: "(...) The 1st Match and Last Match buttons are the key to creating
powerful and versatile live headers. Live headers change for
each page, depending on the contents of that page. Pick up any
phone book for an example. You'll see something like "Smith-
Snider" on the top of one page and "Snider-Socha" on the next. (...)"

I'll add one page (screenshot with manual highlighting added) from Ventura's manual.
Comment 1 Robinson Tryon (qubit) 2014-12-09 23:19:43 UTC
(In reply to Ulrich Windl from comment #0)
> An important feature (that was present in Xerox' Ventura Publisher already
> more than 20 years ago) is still missing in LibreOffice: "Live Headers" with
> contents derived from the refernece text of some paragraph style
> ...
> Imagine you write a phonebook with Writer you might even want these new
> fields to evaluate to a substring of the beforementioned reference text, so
> that you get "Mil - Shn" instead of "Miller - Shneider".

I'm not sure how much work it would take to implement, but it sounds like a reasonable feature.

Status -> NEW
Comment 2 Heiko Tietze 2019-06-11 09:22:43 UTC
Created attachment 152095 [details]
ToC with capitalized first letter

We cannot implement features that are not defined in the format. So "live headers" are a WF. However, I believe most of this is possible out of the box. The screenshot shows an alphabetical ToC for the dummy text where I applied a special character style to the first letter. Regina, any idea how to achieve this programmatically?
Comment 3 Ulrich Windl 2019-06-11 11:21:57 UTC
The "TeX approach" would probably be like this:
Put all occurrences of ${referencetext} in a queue (a text file for TeX actually), together with the page number. Then for every page pick the first occurrence as the first occurrence, and the last occurrence as the last ocurrence.

I mean if they could do it in 16-bit MS-DOS 28 years ago, it seems ridiculous to say it's not possible with today's bloated software.

Regarding comment #2:
It's not about having the first letter printed in bold (TeX can do that, too); it's about having a header or a footer saying "A-C" (e.g. for your example page). Also think on when creating PDFs: Once could quickly navigate from the bookmark (e.g. named "A-C") to the page you are looking for.
Comment 4 QA Administrators 2019-06-14 03:01:22 UTC Comment hidden (obsolete)