Hi there,
A while back I had an isuue with incorrect image numbers that I had created myself by duplicating image IDs. Today I had a similar issue but this time the image numbers themselves were all fine, but the references (using hmfigcounter) in PDF output were not. When i try to reference to the next image from anywhere in my manual, in the export PDF the link will show up as "Figure38" (there are 37 images in the table of figures). When i reference to a previous image, the reference counts back from 38.
I remembered that old issue so I checked for duplicate IDs, actually found two pairs and repaired them both. (deleted all four images and re-inserted them from scratch, creating new IDs.
But: That did not work. References still jump to 38. Any way to fix that? I double-checked: there is no other duplicate in the project.
Figure reference error in PDF output
Moderators: Alexander Halser, Tim Green
- Tim Green
- Site Admin
- Posts: 7818
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Figure reference error in PDF output
Each occurrence of an image increments the counter, including the first one. Try explicitly setting the first image to 0, which will then display as 1 because of the incrementation, and it will then continue counting from there.
It's also possible that you have an orphaned reference somewhere in your XML that is actually increasing the numbers somewhere along the line. If the count is getting wrong at some specific point, the orphaned reference would be between the point at which the error doesn't occur and the point at which it does.
It's also possible that you have an orphaned reference somewhere in your XML that is actually increasing the numbers somewhere along the line. If the count is getting wrong at some specific point, the orphaned reference would be between the point at which the error doesn't occur and the point at which it does.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
Bjoern Thiele
- Posts: 23
- Joined: Tue Nov 07, 2023 4:12 pm
Re: Figure reference error in PDF output
Hi Tim,
thanks for the quick response? How exactly do i set the first image to 0? I tried changing the image ID manually but that did not do the trick.
Also the issue appears anywhere in the project including right at the beginning. There is no orphaned reference before that.
I tried something else:
I set up a new project from scratch and as soon as i import properties (Variables, paths etc.) from the old one, the issue appears in the new project, even though both projects do not share a single topic file yet. As long as i do not copy properties, the issue does not show in a new project.
thanks for the quick response? How exactly do i set the first image to 0? I tried changing the image ID manually but that did not do the trick.
Also the issue appears anywhere in the project including right at the beginning. There is no orphaned reference before that.
I tried something else:
I set up a new project from scratch and as soon as i import properties (Variables, paths etc.) from the old one, the issue appears in the new project, even though both projects do not share a single topic file yet. As long as i do not copy properties, the issue does not show in a new project.
-
Bjoern Thiele
- Posts: 23
- Joined: Tue Nov 07, 2023 4:12 pm
Re: Figure reference error in PDF output
*The question mark in the first line is a typo, not an attempt to be sarcastic
- Tim Green
- Site Admin
- Posts: 7818
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Figure reference error in PDF output
Hmm, perhaps something is off in the project settings. But before that, try resetting the counter in the first occurrence of the variable anyway. You do it like this:
<%HMFIGCOUNTER=12%> (resets the figure counter to 12)
<%HMFIGCOUNTER=0%> (resets the figure counter to 0)
If that doesn't work, please send a small demo project in single-file HMXZ format to support AT ec-software.com (replace the AT with @) and we'll have a look at it.
<%HMFIGCOUNTER=12%> (resets the figure counter to 12)
<%HMFIGCOUNTER=0%> (resets the figure counter to 0)
If that doesn't work, please send a small demo project in single-file HMXZ format to support AT ec-software.com (replace the AT with @) and we'll have a look at it.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.