Download it now!
Bug 90621 - FORMATTING: Custom character styles are not applied in bibliographies
Summary: FORMATTING: Custom character styles are not applied in bibliographies
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: notBibisectable, regression
Depends on:
Blocks: Bibliography
  Show dependency treegraph
 
Reported: 2015-04-14 20:53 UTC by Rastus Vernon
Modified: 2019-07-09 02:44 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The structure line with the author part selected. (8.69 KB, image/png)
2016-01-03 17:55 UTC, Rastus Vernon
Details
The book entry type selected. (22.63 KB, image/png)
2016-01-03 17:56 UTC, Rastus Vernon
Details
Test document (29.35 KB, application/vnd.oasis.opendocument.text-flat-xml)
2016-01-03 18:22 UTC, Rastus Vernon
Details
Screenshot of test document (22.49 KB, image/png)
2016-01-03 18:23 UTC, Rastus Vernon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rastus Vernon 2015-04-14 20:53:43 UTC
When a character style is specified for the selected part on the structure line¹, in the entries tab of the window to modify a bibliography, the character style is applied only if it is one of the character styles that come with LibreOffice. If the character style was created by the user, it is not applied.

Steps to reproduce:

1. Create a new document in LibreOffice Writer.
2. Insert a bibliography.
3. Insert a bibliography entry (with type book) somewhere in the document, either from the bibliography database or from the document itself.
4. Open the dialog to modify the bibliography.
5. In the entries tab, select the book entry type and select one of the parts on the structure line.
6. Change the character style to one of the character styles in the drop-down menu.
7. Close the dialog and update the bibliography if needed.
8. Observe the style of the part you set a character style for. It should be applied.
9. Create a new character style.
10. Repeat steps 4 to 7, with the new character style you have created.
11. This time, the character style should not be applied.

Remark: if the document, at this point, is saved as a flat ODT file and is examined in a text editor, the custom character style will be seen (text:style-name="_34__20_Style_20_name") in the text:bibliography-entry-template element for the book entry template. This might mean that the change is saved, but that custom character styles are not rendered in bibliographies.

1: https://help.libreoffice.org/Writer/Entries_bibliography#Character_Style
Comment 1 Buovjaga 2015-04-17 18:29:20 UTC

*** This bug has been marked as a duplicate of bug 77919 ***
Comment 2 Rastus Vernon 2015-04-18 18:26:58 UTC
This is not a duplicate of bug 77919, if I understand correctly. That bug is about the entries section of the bibliography not showing current character styles (custom or not) and removing them when saving, while the present bug is about custom character styles not being displayed in the bibliography. I doubt fixing bug 77919 would fix this bug, but I can't know for sure.
Comment 3 Buovjaga 2015-04-18 18:41:28 UTC
Sorry about that!

Reproduced with latest master.

Luckily, this was not reproduced on 3.6.7, so a regression bibisect can be performed.

Win 7 Pro 64-bit Version: 5.0.0.0.alpha0+ (x64)
Build ID: 211c12b9c64facd1c12f637a5229bd6a6feb032a
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-04-18_01:51:17
Locale: fi_FI

Ubuntu 14.10 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 4 Robinson Tryon (qubit) 2015-12-14 05:32:33 UTC Comment hidden (obsolete)
Comment 5 Joel Madero 2016-01-03 17:08:52 UTC
I need some clarification to bibisect this.

> 5. In the entries tab, select the book entry type and select one of the
> parts on the structure line.

I'm not sure if I understand this correctly - can you explain clearer what it means?

> 6. Change the character style to one of the character styles in the
> drop-down menu.

I believe I do this.

> 7. Close the dialog and update the bibliography if needed.

When I reopen the dialog the character style is set back to <none> which leads me to believe I'm doing something wrong.

> 8. Observe the style of the part you set a character style for. It should be
> applied.
That doesn't happen for me (tested on various versions)

If you can clarify I can try to bibisect. Also a test document might help. Thanks
Comment 6 Rastus Vernon 2016-01-03 17:55:57 UTC
Created attachment 121697 [details]
The structure line with the author part selected.
Comment 7 Rastus Vernon 2016-01-03 17:56:47 UTC
Created attachment 121698 [details]
The book entry type selected.
Comment 8 Rastus Vernon 2016-01-03 18:22:40 UTC
Created attachment 121700 [details]
Test document

Test document with a bibliography and a bibliography entry. The bibliography is configured so that the "Author" structure element has character style "Strong Emphasis". This means "Artymiak, Jacek" should be in bold when the document is opened.
Comment 9 Rastus Vernon 2016-01-03 18:23:03 UTC
Created attachment 121701 [details]
Screenshot of test document
Comment 10 Rastus Vernon 2016-01-03 18:29:46 UTC
> > 5. In the entries tab, select the book entry type and select one of the
> > parts on the structure line.
> 
> I'm not sure if I understand this correctly - can you explain clearer what it means?

The "Book" entry type is in the list of entry types under the "Type" header (see book_entry_type.png), but the reproduction steps work with any entry type. Attachment structure_line_author.png shows the structure line with the author part selected.

> > 7. Close the dialog and update the bibliography if needed.
> 
> When I reopen the dialog the character style is set back to <none> which leads me to believe I'm doing something wrong.

That's bug 77919.

> > 8. Observe the style of the part you set a character style for. It should be
> > applied.
> That doesn't happen for me (tested on various versions)

It does for me on LibreOffice 5.0.4.2 (see test document and screenshot of test document). That might be because the style was removed when you reopened the dialog.

> If you can clarify I can try to bibisect. Also a test document might help. Thanks

I attached a test document which has reproduction steps 1 to 8 done.
Comment 11 Rastus Vernon 2016-08-06 18:31:12 UTC
Update: this is still an issue on LibreOffice 5.2.0.
Comment 12 Philipp Kewisch [:Fallen] 2016-10-28 11:10:10 UTC
This (and bug 77919) could use some attention. I didn't have this 3 years ago with OpenOffice, I was able to apply text styles there. I wanted to switch back to OOo for the Bibliography, but for some reason opening my document now crashes OOo so I can't even work around.

I think this deserves higher importance, because the bibliography table is often the last thing people do when writing papers. If that is just a few days before due date, it is hard to find time to search for alternatives or fixes.

Is there a workaround editing the xml files? All I need is that exporting to PDF does the right thing. Where in the xml files do I need to look?
Comment 13 Rastus Vernon 2016-11-21 05:55:20 UTC
(In reply to Philipp Kewisch [:Fallen] from comment #12)
> This (and bug 77919) could use some attention. I didn't have this 3 years
> ago with OpenOffice, I was able to apply text styles there. I wanted to
> switch back to OOo for the Bibliography, but for some reason opening my
> document now crashes OOo so I can't even work around.
> 
> I think this deserves higher importance, because the bibliography table is
> often the last thing people do when writing papers. If that is just a few
> days before due date, it is hard to find time to search for alternatives or
> fixes.
> 
> Is there a workaround editing the xml files? All I need is that exporting to
> PDF does the right thing. Where in the xml files do I need to look?

From what I have seen, the XML files are fine, but the character styles are not rendered in bibliographies. One "solution" is to do formatting manually, at the end, though this is tedious.

You can also use the Zotero extension, which can generate bibliographies and is generally more powerful than LibreOffice's integrated support for bibliographies. It doesn't use character styles, though.
Comment 14 QA Administrators 2017-11-22 15:41:09 UTC Comment hidden (obsolete)
Comment 15 Rastus Vernon 2017-11-26 04:19:53 UTC
Update: I was able to reproduce the bug on LibreOffice 5.4.3.2 using the test document and reproduction steps 9 to 11.
Comment 16 Buovjaga 2018-07-08 19:33:46 UTC
I tried bibisecting this with 42max on Ubuntu 14.04, but unfortunately there are crashes with launching and creating a new style. These prevent getting any meaningful result.

Continuing with git bisect skip would have been insanity. I walked in the commits, backwards from the first known bad commit with "git reset --hard HEAD~100" (various values used) and then bouncing back and forth (git checkout back to the crashing one) when I ran into good territory. The border is just good<->crash.

Anyway ,the earliest bad commit in the repo is d4e1a1073fc3d8d51aae700fb004a1adeb7dba2c
Comment 17 QA Administrators 2019-07-09 02:44:20 UTC
Dear Rastus Vernon,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug