Bug 119738 - Image caption, inconsistency: caption for images is now "figure" and no longer "illustration"
Summary: Image caption, inconsistency: caption for images is now "figure" and no longe...
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.1 rc
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0
Keywords: needsDevEval
Depends on:
Blocks: Writer-Images Caption
  Show dependency treegraph
 
Reported: 2018-09-06 20:12 UTC by Gerhard Weydt
Modified: 2023-02-07 13:27 UTC (History)
14 users (show)

See Also:
Crash report or crash signature:


Attachments
demo_image_illustration (91.08 KB, application/vnd.oasis.opendocument.text)
2018-09-07 08:43 UTC, Oliver Brinzing
Details
New example for the reopening, see comments 25 & 26 ff. (1.29 MB, application/vnd.oasis.opendocument.text)
2021-02-26 21:50 UTC, Gerhard Weydt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerhard Weydt 2018-09-06 20:12:13 UTC
It seems that a new category "figure" was introduced in 6.1 for captions (see also bug 58407, where this was proposed, and, looking at the comments, obviously was realised in some way).
But now there is the problem that documents created in an older version still use "illustration", so if you add new images, they get a different category, and the numbering starts again with 1.

Steps to reproduce:
create a Writer document in 6.0 or earlier
insert an image and add a caption to it; the caption will be of category "illustration", the number will be 1.
save the document and close it.
now open it in 6.1 or 6.2, insert another image and add a caption: the category will be "figure", the number will be 1 again.

I have tested that with several versions of 6.1 and with 6.2.0.0alpha.

If I look at the menu item Insert -> Field -> More Fields... -> Number Range I see both figure and illustration; the intent of bug 58407, as I understand, was to *change* the name, not to add another category.

This will certainly cause many troubles when people start using 6.1 to a major extent, including LibreOffice's own documentation.
Comment 1 BogdanB 2018-09-07 04:04:39 UTC
Confirm it with LO in romanian
- LO 6.0 ”1. Ilustratie” , meaning Illustration
- LO 6.2 ”1. Figure”

So, I have 2 pictures, but twice the number 1.
Comment 2 Oliver Brinzing 2018-09-07 08:43:43 UTC
Created attachment 144732 [details]
demo_image_illustration

confirming, see attachment for details
Comment 3 Xisco Faulí 2018-09-10 13:50:48 UTC
Yep, I agree it might cause many problem if old versions are open in LibreOffice 6.1 or higher...
Another inconsistency I've found is that autocaption still uses 'Illustration' while inserted pictures are called 'Figure'

Adding UX Team and CC people from bug 58407 to the loop
Comment 4 Heiko Tietze 2018-09-10 16:08:09 UTC
Don't see this as a big problem. You can always enter your own caption, we just switch the default.
Comment 5 BogdanB 2018-09-11 00:57:52 UTC
(In reply to Heiko Tietze from comment #4)
> Don't see this as a big problem. You can always enter your own caption, we
> just switch the default.

It's just a problem of numbering. You have Figure 1, than Ilustration 1, than Figure 2, than Ilustration 2, depending what version of LO we use for inserting Figure or Ilustration.

If we have a big document the Navigator menu will show for Image a repeatable numbering. 

Instead of:
Figure 1.
Figure 2.
Figure 3.
Figure 4.

Will be:
Figure 1.
Ilustration 1.
Figure 2.
Ilustration 2.

It's a bit confusing for people using the Navigator menu and big documents.
Comment 6 Heiko Tietze 2018-09-11 06:06:37 UTC
(In reply to BogdanB from comment #5)
> It's just a problem of numbering. You have Figure 1, than Ilustration 1,
> than Figure 2, than Ilustration 2, depending what version of LO we use for
> inserting Figure or Ilustration.

Sure, but what options do we have? I'm strongly against reverting as Figure is the standard term used in scientific publications. Adding some code to check what caption has been used in the current document? Difficult since you intentionally can have both Illustration and Figure. So I vote for the third door with the zonk. Meaning you have to be careful and change the caption in non-standard documents. 

Besides I wonder why you accepted Illustration as caption. Wouldn't it make more sense to switch those labels to Figure?
Comment 7 Gerhard Weydt 2018-09-11 12:06:57 UTC
For other languages this is an even more complicated problem. In German, for example, figure and illustration are translated with the same expression "Abbildung". The result is that an image caption inserted with version 6.1 gets no number at all. The same happens in Dutch with "Aafbeeldingen". You have to dig deep to understand what is going wrong.
French and Italian have two different translations, so they have "only" the same problem as english texts.
Now, in contrast to Heiko's statement in comment #4, it is a problem to know which of the two styles is the correct one, as they have the same name. And for both of them no number is provided (tested in German only)!
If you have an old document with many illustrations - as in my case the LibO handbook "First Steps" I'm working on - you have to change all captions to the new default, and I couldn't find another way to do that than deleting the caption and settin a new. Keeping the old style would be dangerous, because the next person working with the document wil have the same problem.
I fear that these problems will happen to a good many people, and many will not even know what is wrong because they will not be able to find out the reason. This is a desastrous effect for LibreOffice!
I think that on opening a document with captions in the old style there should be a warning message with the choice to convert to the new style.
Comment 8 Heiko Tietze 2018-09-11 13:54:53 UTC
(In reply to Gerhard Weydt from comment #7)
> For other languages this is an even more complicated problem. 

Sophie, this affects l10n. I think the two terms need different translation as long numbering is based on the literal string.
Comment 9 Gerhard Weydt 2018-09-11 21:57:08 UTC
Maybe it is easier to partially revert the changes caused by bug 58407 and described there, by not introducing a new "style" (it must be something more than that) and whatever else is comprised, but only renaming the caption text (old "illustration", new "figure") and hopefully also renaming the style. This is only a suggestion for a possible way of solving the dilemma, as I am not able to judge the source code, notwithstanding that I don't know how to find it.
Comment 10 Cor Nouws 2018-09-12 13:04:07 UTC
this definitely is a nightmare for people working on reports, started in a version < 6.1, and then continue in >=6.1
High and Major are definitely right.

(In reply to Heiko Tietze from comment #8)
> Sophie, this affects l10n. I think the two terms need different translation
> as long numbering is based on the literal string.

It deserves a better solution then seeing localization forced to choose unnatural /strange wordings ;)
Comment 11 sophie 2018-09-12 13:37:05 UTC
(In reply to Cor Nouws from comment #10)
> this definitely is a nightmare for people working on reports, started in a
> version < 6.1, and then continue in >=6.1
> High and Major are definitely right.
> 
> (In reply to Heiko Tietze from comment #8)
> > Sophie, this affects l10n. I think the two terms need different translation
> > as long numbering is based on the literal string.
> 
> It deserves a better solution then seeing localization forced to choose
> unnatural /strange wordings ;)

Yes, and it's not a l10n issue here, changes should ensure retro compatibility with legacy documents which is the purpose of this bug. If the patch broke the feature then it needs to be reverted until a better solution is found. Sophie
Comment 12 Heiko Tietze 2018-09-13 06:25:39 UTC
Reverting is not an option. We can keep the last used caption enabled over sessions. Or store it with the template. And having no caption in the template like it is the fact for legacy documents we could go with Illustration.
Comment 13 Xisco Faulí 2018-09-13 09:09:43 UTC
Just for the record, same happens if we insert figures, tables, etc... with a language UI and then more figures, tables, etc... are inserted with a different language UI, They will be added to different categories as the naming is different.
So as I understand it, LibreOffice creates the categories depending on the name and not on the element.
The language problem is reported in bug 44451. I believe if bug 44451 got fixed, this one would get fixed as well...
Comment 14 Cor Nouws 2018-09-13 13:48:27 UTC
(In reply to Xisco Faulí from comment #13)

> The language problem is reported in bug 44451. I believe if bug 44451 got
> fixed, this one would get fixed as well...

Good chance.
And that makes putting energy in a intermediate solution (retain caption used by getting it from the document) less likely?
Comment 15 Gerhard Weydt 2018-09-16 19:25:27 UTC
I think that setting the default - at least temporarily, until a complete solution is found - will help us to get rid of most of the problems:
Legacy documents can then be edited without problems. I think that nearly everyone simply calls the dialog, adds the caption and then presses Enter, without looking at the listbox for the category, as the proposed choice was always correct in the past.
On the other hand, I think there will be very few new documents already created in 6.1 or 6.2, in relation to the many legacy documents, so there will be only a small number of people who will have a problem.
In addition, this would solve the problem for languages like German and Dutch, where there is the problem of the same translation for the two categories.
We also should not forget that the introduction of the new category is not a functional enhancement but only an - in my eyes ill-conceived - attempt to remedy a bad choice for an expression in the english version.

By the way, I said in comment 7 that you would have to delete the caption and set a new one. That was badly expressed: you have to copy the image, set the caption and delete the old frame, which will also delete image and caption.
Comment 16 Cor Nouws 2018-10-07 19:30:29 UTC
(In reply to Heiko Tietze from comment #12)
> Reverting is not an option. We can keep the last used caption enabled over
> ..

Ehh, why not, since it's not about reverting, but:

(In reply to sophie from comment #11)
> .. If the
> patch broke the feature then it needs to be reverted until a better solution
> is found. Sophie

.. temporary putting aside, until there is a solution in place that saves the users head ache?!
Comment 17 Cor Nouws 2018-10-07 19:58:39 UTC
(In reply to Gerhard Weydt from comment #15)
> I think that setting the default - at least temporarily, until a complete
> solution is found - will help us to get rid of most of the problems:

I tried to look at this for Dutch.
- Created a file in 6.0.x with a caption "Afbeeldingen "
- Add an image in 6.1.x and start adding a caption;
  - there are two choices "Afbeeldingen"
  - but the use of both, results in a caption without number
  - I'm even unable to get a numbered caption added
  > so there seems to be no difference, for the handling by LibreOffice anyway, in the two instances of 'Afbeelding' that are offered in the list in 6.1.x

But apart from that: can you explain how to set the default? I think I missed that. Thanks,
Comment 18 Gerhard Weydt 2018-10-07 21:11:10 UTC
(In reply to Cor Nouws from comment #17)
> (In reply to Gerhard Weydt from comment #15)
...
> But apart from that: can you explain how to set the default? I think I
> missed that. Thanks,

Cor, you didn't miss anything. The default ist set by LibreOffice, and my suggestion was that this should be changed, at least as long as there is is no proper solution for the problem.
If we could change the default ourselves, things would be easier.
Comment 19 Cor Nouws 2018-10-27 06:26:33 UTC
Problem still exists.
I suggest to revert the path that caused this. We lived ages with the wrong wording. Improving that in a way that cause users who have no clue a PITA, is not the way to go, I suggest. 
keyword says needsDevEval. Will be on ESC agenda if we want?
Comment 20 Heiko Tietze 2018-10-27 09:11:54 UTC
First patch is here https://gerrit.libreoffice.org/#/c/60787/ having some issues. We need an experienced developer to mentor Nickson.
Comment 21 Cor Nouws 2018-10-27 21:46:11 UTC
(In reply to Heiko Tietze from comment #20)
> First patch is here https://gerrit.libreoffice.org/#/c/60787/ having some
> issues. We need an experienced developer to mentor Nickson.

ah good news - thanks!
Comment 22 Heiko Tietze 2018-11-08 09:29:42 UTC
Documents containing Illustration will keep this caption as user setting, newly created documents get Figure.
Comment 23 Commit Notification 2018-11-08 09:29:52 UTC
Nickson committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/c399d0715f6d3fe16896af8d1f85e66855e17402%5E%21

tdf#119738 - Set default image caption to illustration if already being used

It will be available in 6.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 24 Gerhard Weydt 2019-06-10 00:30:50 UTC
Seems to work
Comment 25 Luc 2020-12-22 12:04:15 UTC
I maintain a Log-book since 2003, now hit this bug (version Dutch, 7.0.4.x). I followed the advice in this thread, however both options below are no solution.

1. I add new caption, chose Category: "Afbeelding" => number is blanc
2. I add new caption, chose Category: "Illustratie" => number starts at 1


How can I fix my document?   (which contains over 360 pages and 150+ pictures)
Comment 26 Gerhard Weydt 2021-02-26 21:49:37 UTC
(In reply to Luc from comment #25)
> I maintain a Log-book since 2003, now hit this bug (version Dutch, 7.0.4.x).
> I followed the advice in this thread, however both options below are no
> solution.
> 
> 1. I add new caption, chose Category: "Afbeelding" => number is blanc
> 2. I add new caption, chose Category: "Illustratie" => number starts at 1
> 
> 
> How can I fix my document?   (which contains over 360 pages and 150+
> pictures)

Hi Luc,

I tried to reproduce your problem (language was set to Dutch):
1. created a Writer doc in 5.4.7.2, added one image, set caption (only relevant choice was "afbeelding"); saved it
2. opened in 7.0.4.2, added a second image, set caption with choice "afbeelding" (I think this was proposed, but I am not sure now); saved the file
. added a third image,set caption with choice "illustratie".

My results:
1. "1. Afbeelding: ..."
2. "Afbeelding 1: ..."
3. "Illustratie 2: ..."

You can see the results in the file Example Dutch.odt" I will add after I have sent this reply.

Now my result is not the same as you describe, but it also doesn't seem to be correct: The numbering that was started with afbeelding is continued when using illustratie, but not for afbeelding.

I did the first two steps with language "German" as well, there I got a different result: The numbering was continued when using Abbildung. The fact that it was "1. Abbildung" created by 5.4.7.2 and "Abbildung 2" created by 7.0.4.2, which first irritated me, doesn't seem to matter.

I can offer a hypothesis for the behaviour in my test: the problem arose when the second category for images was introduced, which roused the difficulty for two translations, which got intermingled in German, when I reported the bug. I think the behaviour in the dutch test can be explained thus: the old category "illustration" was translated to dutch "afbeelding" (as it was to "Abbildung" in German) in 5.4.7.2. In 7.0.4.2 "illustration" is translated by "illustratie" and the other category, "figure", is translated by "afbeelding".
This, quite naturally, must be checked by one who knows where to find the translations.

As regards your report: Please check again, if the behaviour is really different in your case. If so, I fear I can offer no further advice, but it might be useful to supply your file here as an attachment, if that is possible, because, as you have seen, we cannot (or don't know how) create a test case with the same behaviour. If the content of your file is private, the you might perhaps send a copy directly to a developper, if asked for.
Comment 27 Gerhard Weydt 2021-02-26 21:50:56 UTC
Created attachment 170095 [details]
New example for the reopening, see comments 25 & 26 ff.
Comment 28 Gerhard Weydt 2021-02-26 21:59:26 UTC
(In reply to Luc from comment #25)
> I maintain a Log-book since 2003, now hit this bug (version Dutch, 7.0.4.x).
> I followed the advice in this thread, however both options below are no
> solution.
> 
> 1. I add new caption, chose Category: "Afbeelding" => number is blanc
> 2. I add new caption, chose Category: "Illustratie" => number starts at 1
> 
> 
> How can I fix my document?   (which contains over 360 pages and 150+
> pictures)

I forgot to say: the text "afbeelding" can be changed by you; once it is clear what the reason is and how the future behaviour will be, you can change these texts to fit the name the newly inserted images will be given. Using "Find and replace", best with single steps to avoid changing possible other occurences of the same word, should only take some minutes.