Bug 155633 - Can't use a custom bibliography database source for Insert > TOC & Indexes > Bibliography Entry
Summary: Can't use a custom bibliography database source for Insert > TOC & Indexes > ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/writer-...
Whiteboard:
Keywords:
Depends on:
Blocks: Bibliography
  Show dependency treegraph
 
Reported: 2023-06-01 15:03 UTC by ajlittoz
Modified: 2024-04-30 23:49 UTC (History)
1 user (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 ajlittoz 2023-06-01 15:03:47 UTC
Version: 7.5.3.2 (X86_64)
Build ID: 50(Build:2)
CPU threads: 4; OS: Linux 6.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded

To try and answer a question on AskLO (posted through private mail), I am experimenting with Bibliography feature.

A user has prepared a bibliography in Calc and wants to use it in replacement with the built-in dBase bibliography DB.

I succeeded in making the database visible by Tools>Bibliography Database. I can open this bibliography spreadsheet and assign Calc columns to the DB schema columns.

But when I want to Insert>TOC & Indexes>Bibliography Entry, the "Short name" menu in the dialog which pops up is empty. I double-checked that the identifier spreadsheet column has been associated to the Short name schema column.

The spreadsheet has not as many columns as the traditional bibliography schema. Suspecting it could matter, I added columns to the spreadsheet so that all bibliography columns have an equivalent in the spreadsheet, even if no data is entered.

Unfortunately the menu to select an entry is still empty.

So, how is the bibliography feature implemented? From a user point of view, of course.

- Where is stored the mapping table between a DB and the file or folder? How can I reset this table to restart from fresh? E.g. the Data Source button still displays DBs I removed from my computer; it would be nice to clean also this list. (The problem may be similar to the Recent Files menu.)

- Is it necessary to provide as many columns in the source as there are in the schema definition?

- What are the criteria for a custom bibliography DB to be recognised by Insert>TOC & Indexes>Bibliography Entry?
Comment 1 Stéphane Guillou (stragu) 2023-06-02 18:08:53 UTC
Hi ajlittoz
Unfortunately, this would be something to ask about on Ask.LibreOffice, not here.
As this isn't a report about a bug or enhancement request, I'm closing as "invalid". But after getting answers, please feel free to come back and open a new ticket asking for specific changes to the documentation, if you think they are needed. (Or report a bug if you find one, with an example database file for us to test it.)
Thank you!
Comment 2 ajlittoz 2023-06-03 09:43:12 UTC
(In reply to Stéphane Guillou (stragu) from comment #1)
> Hi ajlittoz
> Unfortunately, this would be something to ask about on Ask.LibreOffice, not
> here.
> As this isn't a report about a bug or enhancement request, I'm closing as
> "invalid".

I feared an answer like this one. As I mention, this information request stems from a question on AskLO https://ask.libreoffice.org/t/writer-how-to-use-a-spreadsheet-as-bibliographic-database/92049 which I asked following a discussion on private mail from a user requesting advice on using a spreadsheet as bibliography source.

Answers to this day don't solve the issue. It is likely that the key is too "technical" (= buried deep in the source code) for the majority of users. I consider myself as an expert in Writer usage but I never read a line of code. So, I decided to file this "information request" in the hope that some developer could give me some light.

Let's sum up the problem:
- I can have the spreadsheet recognised as a bibliography DB (it shows up in Tools>Bibliography Database)
- I can display the bibliography and edit its entries (then saved in the document)
- I _CANNOT_ insert bibliography entries because Insert>TOC & Indexes>Bibliography Entry does not recognise the data source (its list of entries in the menu is empty)

Supposing that a spreadsheet was not a correct source, I turned it into a dBase DB. Once again this DB is recognised by Tools>Bibliography Database but Insert>TOC & Indexes>Bibliography Entry still shows an empty menu.

In the end, it turns out that I can't substitute any custom datasource for the built-in bibliography. It is likely that I am missing some obvious point. I see in the user profile that the built-in bibliography has many ancillary files associated with it. I have of course no such files in the directory of my custom bibliography. Is this the cause of the issue?

The official documentation has nothing about custom bibliography sources (or I skipped over it).

I can turn this report into a bug: menu to choose a bibliography entry is empty with a custom bibliography database.
Comment 3 Stéphane Guillou (stragu) 2024-04-25 04:39:21 UTC
(In reply to ajlittoz from comment #2)
> The official documentation has nothing about custom bibliography sources (or
> I skipped over it).
> 
> I can turn this report into a bug: menu to choose a bibliography entry is
> empty with a custom bibliography database.
OK, let's do that.

My steps:
1. Create a custom bibliography as an ODB file, e.g. with a table with variables Identifier, Author, Title
2. In Writer, go to Tools > Bibliography > Data Source and pick the database that was just created. Prompt says "The following column names could not be assigned": accept to edit the column arrangement, and match variables to columns.
3. Try to insert a reference with Insert > Table of Contents and Index > Bibliography Entry

Result A: the dialog seems to require the availability of a "Short name" field.

4. Modify the bibliography database table to add a Short Name field; populate it
5. Repeat steps 2 (matching the new column to "Short name") and 3

Result B: the Short name dropdown is still empty.

ajlittoz, do you agree these are the steps?

Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 4 ajlittoz 2024-04-30 21:18:46 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)
> (In reply to ajlittoz from comment #2)
> ajlittoz, do you agree these are the steps?

Yes