Bug 84339 - Category missing when inserting cross reference as "Category and number"
Summary: Category missing when inserting cross reference as "Category and number"
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.2.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fields-Cross-Reference
  Show dependency treegraph
 
Reported: 2014-09-25 22:12 UTC by Peng Wang
Modified: 2017-05-17 20:33 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Caption, Number Range, and Cross-reference Behaviour (18.86 KB, application/vnd.oasis.opendocument.text)
2015-05-26 11:15 UTC, Gordo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peng Wang 2014-09-25 22:12:14 UTC
Steps to reproduce:

1. Insert number range to the a caption.

2. Insert cross references somewhere else, choose "category and number". In the text only number is shown, category is missing.
Comment 1 Robinson Tryon (qubit) 2014-09-25 22:36:42 UTC
(In reply to comment #0)
> Steps to reproduce:
> 
> 1. Insert number range to the a caption.
> 
> 2. Insert cross references somewhere else, choose "category and number". In
> the text only number is shown, category is missing.

Hi Peng,
I'm not sure how to reproduce your bug. I know how to Insert -> Image -> From File, and then Insert -> Caption for that image, but I'm not sure how to Insert a number range.

Once you've provided clear steps for reproducing this bug, please change the Status back to 'UNCONFIRMED'.

Thanks!
Comment 2 Peng Wang 2014-09-26 02:29:48 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > Steps to reproduce:
> > 
> > 1. Insert number range to the a caption.
> > 
> > 2. Insert cross references somewhere else, choose "category and number". In
> > the text only number is shown, category is missing.
> 
> Hi Peng,
> I'm not sure how to reproduce your bug. I know how to Insert -> Image ->
> From File, and then Insert -> Caption for that image, but I'm not sure how
> to Insert a number range.
> 
> Once you've provided clear steps for reproducing this bug, please change the
> Status back to 'UNCONFIRMED'.
> 
> Thanks!

Hi sorry for the confusion. I didn't use the insert caption capability. Just anywhere in the text I can choose  insert->field->other... then I select variable and choose number range, then select a category and press the insert button. A number will appear in the text. I think in a previous version the word before that number will qualify as category. When you next time insert cross reference to it the category name is supposed to be included if you choose "category and number". 

Since you mentioned I tried the insert caption function, which also includes category and number. This time it actually works. The category and number are all shown when I insert cross reference to it.
Comment 3 Robinson Tryon (qubit) 2014-09-26 03:18:10 UTC
(In reply to comment #2)
> Hi sorry for the confusion. I didn't use the insert caption capability. Just
> anywhere in the text I can choose  insert->field->other... then I select
> variable and choose number range, then select a category and press the
> insert button.

There are 3 columns in the 'Variables' tab of the 'Fields' dialog:
- Type
- Select
- Format

I chose
Type: Number range
Select: Illustration
Format: Arabic (1 2 3)

I then clicked "Insert".

> A number will appear in the text. I think in a previous
> version the word before that number will qualify as category.

Ok. Perhaps that's documented somewhere?


> When you next
> time insert cross reference to it[,] 
> ...if you choose "category and number"...

- Insert -> Cross-reference
- Type: Illustration
- Insert reference to: Category and Number
- Selection: (The only one available... the one I just created)

Click "Insert".

> ...the category name is supposed to be
> included 

RESULT: only the number appeared.

Peng: Did you expect the field display something like "Illustration: 1" for the link?

In which older version of LibreOffice did this work?
Comment 4 Peng Wang 2014-09-30 18:59:51 UTC
All right, with some more test I discovered that the category name does appear in the cross-reference under some conditions, i.e. the text before the varible contains the category name.
Comment 5 Buovjaga 2014-11-27 10:02:12 UTC
(In reply to Peng Wang from comment #4)
> All right, with some more test I discovered that the category name does
> appear in the cross-reference under some conditions, i.e. the text before
> the varible contains the category name.

Please change back to UNCONFIRMED, if you are of the opinion that there is a problem.
Change to RESOLVED INVALID, if you feel that there is no problem.
Comment 6 Gordo 2015-05-26 11:15:59 UTC
Created attachment 116045 [details]
Caption, Number Range, and Cross-reference Behaviour

The help states that for Category and Number:
Inserts the category (caption type) and the number of the reference target. This option is only available when the reference target is an object with a caption.

Having said that, the attachment shows how cross-references use the text before the number and not the category name.

Windows Vista 64
Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Comment 7 tommy27 2017-04-02 09:37:55 UTC
LibO 5.2.6 and 5.3.1 are out.
is this old bug report still reproducible?
please give feedback
Comment 8 Dieter 2017-05-17 20:33:35 UTC
(In reply to Gordo from comment #6)
> Created attachment 116045 [details]
> Caption, Number Range, and Cross-reference Behaviour
> 
> The help states that for Category and Number:
> Inserts the category (caption type) and the number of the reference target.
> This option is only available when the reference target is an object with a
> caption.
> 
> Having said that, the attachment shows how cross-references use the text
> before the number and not the category name.
> 
> Windows Vista 64
> Version: 4.4.3.2
> Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16

In my view Gordo has given an excellent summary how to insert "category and number". I can confirm it with LO 5.3.3 => set to WORKSFORME