Download it now!
Bug 118455 - Definition List (or Definition Index or Glossary) at the end of the page - EDITING
Summary: Definition List (or Definition Index or Glossary) at the end of the page - ED...
Status: NEW
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:
Depends on:
Blocks: TableofContents-Indexes Authors
  Show dependency treegraph
 
Reported: 2018-06-29 14:27 UTC by csongor
Modified: 2020-05-21 13:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
This is what I would like to see (47.38 KB, image/png)
2018-06-29 14:27 UTC, csongor
Details
Example with Alphabetical Index and Endnotes (21.55 KB, application/vnd.oasis.opendocument.text)
2020-04-27 09:08 UTC, Heiko Tietze
Details
Working example (12.47 KB, application/vnd.oasis.opendocument.text)
2020-05-19 07:39 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description csongor 2018-06-29 14:27:02 UTC
Description:
Similarly to the Alphabetical Index, I would like to build a definition list at the end of the document. For example, if I write a 100 page long book about how to use computers then I would specify the word "file" on the first page and would use it several times later on.

With the current version of LibreOffice Writer, I can build an Index at the end of the document that lists each important word and their locations of occurrences but not their definition. Mostly, the first occurrence in the document defines the term but not necessarily. Sometimes a term is defined after building up some basic knowledge. 

Depending on where it is defined, the reader has to jump at least twice to reach the definition of a term: 
- from the usage of the term to the end of the document where the index is
- from the index to the page of the firs occurrence
- and to other occurrences if the first place was not the definition. 

Instead of this Index, I would like to build a List of Definitions at the end of the document. See the attached sample.

The steps I would like to make:
- select a word (or some adjacent words as a complete expression) within the document that I want to give the definition for.
- click a new menu item: Insert -> Table of Contents and Index -> Definition List Entry 
- in a pop-up dialog, the selected text (one or more words, let's call it "term") would appear as the Term to Define
- I would be able to modify the term because the actual form in the text can differ from the one that I want to define. For example, if I select "algorithms" from the text then probably I still would like to define the singular form "algorithm". (In other languages larger differences can also occur.)
- When I press OK in the dialog then, similarly to how a Footnote is created, the cursor would jump to the end of the document, the term would appear as a read-only content and I would be able to enter the definition. 
- if I select a term that already has been defined then I shouldn't be able to create a new definition but the cursor should jump to the existing definition.


Some extra wishes:

It would be nice if I could specify the format of 
- the terms in the Definition List
- the definitions and
- if they are written in a same paragraph or in two separated ones.

If the term and its definition appear in the same paragraph then they should be formatted by two Character Styles (say Definition List Entry and Definition List Definition) 

However, if they are in two paragraphs (like the attached sample) then a Paragraph Style should define how each looks.


Notes: this feature could be used not just in scientific documents. I can imagine that a long fantasy story with hundreds of characters could also benefit it.

Actual Results:
I cannot do it. 

(Sorry, I have no idea what to write here in case of an enhancement when the functionality doesn't exist at all but the form needs this field to fill.)

Expected Results:
I would like to do it.

(Sorry, I have no idea what to write here in case of an enhancement when the functionality doesn't exist at all but the form needs this field to fill.)


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 csongor 2018-06-29 14:27:50 UTC
Created attachment 143205 [details]
This is what I would like to see
Comment 2 Heiko Tietze 2018-07-02 08:57:33 UTC
The alphabetical list is exactly what you want. You define index entries that are listed (alphabetically) - IIRC there is a ticket on sort by occurrence. All following the standard guidelines of writing. 

What exactly is missing?
Comment 3 csongor 2018-07-04 13:56:06 UTC
If you ment "alphabetical index" (not alphabetical _list_) then it is not what I wanted. With the index I can collect the words at the end of the document but I cannot add their definitions to that place. The index just contains a reference to the single page or multitude of pages where the given word occurs.

If you check my attachment then you can see that I would like to add to the list of definitions not just the terms but their brief definition too. It can be a simplified definition in a scientific book, a simple reminder in a novel, a synonym in a document that uses foreign words, and so on.
Comment 4 Dieter 2018-07-04 14:32:22 UTC
Heiko, I tried to produce a glossary (I think this is what csongor proposes) with alphabetical list, but I wasn't really successful. So I couldn't find a workaround and I support the proposal for a glossary.
Comment 5 csongor 2018-07-04 14:50:25 UTC
(In reply to Dieter Praas from comment #4)
> Heiko, I tried to produce a glossary (I think this is what csongor proposes)
> with alphabetical list, but I wasn't really successful. So I couldn't find a
> workaround and I support the proposal for a glossary.

Thanks, @Dieter, Glossary is a much better name for it. I added it to the summary of the bug so that it can be found more easily.
Comment 6 Heiko Tietze 2018-07-05 08:35:50 UTC
(In reply to Dieter Praas from comment #4)
> Heiko, I tried to produce a glossary... but I wasn't really successful

It works well when you know how to do (Insert > ToC > Index Entry -> "insert" as many selection you like/need;  Insert > ToC > ToC -> Alphabetical Index). The help should tell you everything, including how to access a file with words to index.

(In reply to csongor from comment #3)
> ...With the index I can collect the words at the end of the
> document but I cannot add their definitions to that place.

Do you have an idea, Regina?
Comment 7 Fernando 2020-04-25 22:00:16 UTC
(In reply to Heiko Tietze from comment #6)
> (In reply to Dieter Praas from comment #4)
> > Heiko, I tried to produce a glossary... but I wasn't really successful
> 
> It works well when you know how to do (Insert > ToC > Index Entry ->
> "insert" as many selection you like/need;  Insert > ToC > ToC ->
> Alphabetical Index). The help should tell you everything, including how to
> access a file with words to index.
> 
> (In reply to csongor from comment #3)
> > ...With the index I can collect the words at the end of the
> > document but I cannot add their definitions to that place.
> 
> Do you have an idea, Regina?

Hi,

I see what the original post means. I trying to make a glossary in my document, and cannot find a way to make it.

Just to be clear, the definition of glossary is this: "an alphabetical list, with meanings, of the words or phrases in a text that are difficult to understand".

For example, at some part of the document, the glossary is a list like this:

------------------
Glossary

Anchor: a heavy metal object, usually shaped like a cross with curved arms, on a strong rope or chain, that is dropped from a boat into the water to prevent the boat from moving away.

Sextant: a device used on a ship or aircraft for measuring angles, such as those between stars or that between the sun and the earth, in order to discover the exact position of the ship or aircraft.

Yacht: a boat with sails and sometimes an engine, used for either racing or travelling on for pleasure.
------------------

A glossary would be an alphabetically ordered list of words, AND their definitions.

Regards.
Comment 8 Fernando 2020-04-26 11:56:26 UTC
To implemented this with the available Alphabetical Index tool, it would be necessary to to add a box of multiline text when adding/editing Index Entries. This multiline text is going to be associated with that Index Entry, and then the Index should be able to be edited so that it looks this way:

Index_Entry: Associated text (multiline).

Regards
Comment 9 Olivia Reed 2020-04-27 06:05:25 UTC Comment hidden (spam)
Comment 10 Heiko Tietze 2020-04-27 09:08:14 UTC
Created attachment 159987 [details]
Example with Alphabetical Index and Endnotes

We have two different ways to achieve what you want. I'm using the first key of an index entry to show the definition. And endnotes, on the other hand, are also a good option for the glossary.

Admittedly not so comfortable and less appealing than shown in the examples but it's quite flexible - and working cross-plattform/-application.
Comment 11 csongor 2020-04-27 11:40:39 UTC
With endnotes, if you have more occurrences of the same term in the main document then each occurrence will need a new item in the glossary. 

For example, if your document is "Blah file blah file blah" and you want to add "file" to the glossary then you have two options:
- marking only at one occurrence of "file" that is present in the glossary and leave all the other occurrences unmarked
- adding the term "file" twice (or more).

You cannot do what I wanted and showed in the attached example document. There, all occurrences of "file" point to the same glossary entry.


The other possibility is unclear for me. Could you explain in more details, please?
Comment 12 Heiko Tietze 2020-04-27 11:42:41 UTC
(In reply to csongor from comment #11)
> The other possibility is unclear for me. Could you explain in more details,
> please?

Just check the attachment. It seems to me, you and Fernando have slightly different use cases in mind.
Comment 13 csongor 2020-04-27 12:04:51 UTC
Thanks, Heiko, I see already what you mean. 

But the alphabetical index also has a problem. 

You need to enter the definition into the glossary itself and this text disappears as soon as you update the index. Which means, every time when you 
- add a new item to the index or
- the page numbers within the document change (if you want to show the page numbers in the glossary, which may or may not be needed).

So I don't think this is a good solution. 

Moreover, it is very hard to format the definition differently than the term's formatting. For example, if you want to see the terms in bold and the definitions in non-bold. With my original proposal, two different style would solve this task in a very elegant way.
Comment 14 Heiko Tietze 2020-05-19 07:39:11 UTC
Created attachment 160993 [details]
Working example

Checked how competitors do the trick and it's more or less the same (beside Latex): the recommendation for MS Word is to use table of authorities.

So basically it's possible out of the box to insert a definition list whether per alphabetical or user-defined index. The workflow is to insert index entries, which is pretty simple. Use the actual word, for example "file", as First Key and enter the full description under Entry. Apply to all similar texts sounds also like a good idea. And ultimately insert a ToC with alphabetical index using a different caption and some tweaks on the entries and the styles produces a DL as expected (the numbers in front doesn't look like an index; if needed it might also be possible somehow).

I vote for WFM.
Comment 15 csongor 2020-05-19 12:27:43 UTC
I am not too familiar with indexes so I just made a couple of trials to see how it works. Here is what I did:

I create the document and select one occurrence of "file". (Let's stay with this example for the sake of simplicity.). On the Insert -> Table if Contents and Index -> Index Entry dialog, I move "file" from the Entry field to the "1st key" field and type the definition into the Entry field: "A file is a seqeence of bytes.". I check the "Apply to all similar texts", click the Insert and then on the Close button. After this, I go to the end of the document and Insert -> Table of Contents and Index -> Table of Contents, Index or Biography. In the Type field on the Type tab I select "Alphabetical Index" and voila, the index is generated.

And here are my concerns.

1,
There is no indication around the occurrences of "file" showing that there is an index entry for them. 

2,
I can modify the definition in the index (if enabled) but the change gets lost once the index is re-generated. Which is needed if a new item and its definition is added to the glossary.

3.
Finding the similar words can be problematic in several languages. In English it is not so hard, "file" is always "file", perhaps "files" in worst case. With prepositions it will become "with file", "in the file", etc. But the word "file" is always "file". 

In other languages, however, the words can get prefixes and/or suffixes. Thus, finding the other occurrences is almost impossible. For example, in Hungarian:

in file -> fájlban
to file -> fájlhoz
into file -> fájlba
from file -> fájlból
with file -> fájllal

BUT

feels pain in his leg -> fájlalja a lábát 

If you compare the last two translations (fájlal vs fájllal, single L versus double LL), the substring "fájl" occurs in both but the second one has nothing to do with computer files. It is about the pain. 

Thus, automatically finding the occurrences doesn't really work. On the other hand, there is no way for manual assignment either. For example, I cannot select the word "fájllal" and tell that this is an occurrence of "fájl" and similarly, I cannot tell LO that the word "fájlal" is not related to the computer files.

AFAIK, similar problems can occur in German as well, for example the singular and plural version of "brother" is "Bruder" versus "Brüder", the plural and other forms are hard to find automatically (please, correct me if I am wrong).

With my original proposed solution this would be possible easily. 

I think this work-around with indexes would bring a very poor user experience, compared to the original proposal.
Comment 16 Heiko Tietze 2020-05-19 13:00:06 UTC
You don't need to add the IE multiple times as the list doesn't need to show the page number(s) of occurrence(s).
I would prefer to improve UX around index entries rather than adding something similar. For example, bug 43530, bug 65463, or bug 123995.
Comment 17 csongor 2020-05-19 15:34:32 UTC
I cannot see how the Index would solve the most critical points.

a) changing the selected word how to put it into the index (plural->singular, etc.)
b) indicating each occurrence (see my first attachment with the small number on the left page)
c) changing the definitions after the index has been generated and before it will be generated again (that is, the changes in the definitions should survive re-generation of the index) 
d) formatting of the defined terms and their definitions independently from each other.

Do you think the existing Index feature could be improved so that it satisfies all of these points?
Comment 18 Heiko Tietze 2020-05-20 13:18:46 UTC
(In reply to csongor from comment #17)
> Do you think the existing Index feature could be improved so that it
> satisfies all of these points?

Citing myself: "I would prefer to improve UX around index entries rather than adding something similar."
Comment 19 csongor 2020-05-21 13:10:30 UTC
If you think all the features can be implemented by simple UI changes then I happy with that solution as well. :)