Figure numbers off in LaTeX output

17 views
Skip to first unread message

Michael Shulman

unread,
Apr 5, 2023, 4:26:38 PM4/5/23
to PreTeXt support
Hi,

I don't know anything about how PreTeXt works, but I was pointed to this group from an issue that I noticed with the Active Calculus workbooks.  The workbook is a project target that includes only the "activities" and not any of the main text or exercises, which in particular entails omitting some of the figures.  The issue is that the resulting LaTeX code appears to number the figures that do appear sequentially, but the figure numbers used in references are those from the original document where the omitted figures also increment the numbers.  The active calculus issue is https://github.com/active-calculus/active-calculus-single-mbx/issues/285.  Is this something that can be fixed at the PreTeXt level?

Thanks!
Mike

Chrissy Safranski

unread,
Apr 5, 2023, 10:32:43 PM4/5/23
to PreTeXt support
I don't know how to fix it, but I have noticed it too.  I have workbook pdfs whose date says 2019 where the numbering was right on Activity 1.2.4 and throughout the workbook, but in a workbook pdf compiled more recently which includes the new alternate chapter 8, the numbering is off on images and their references in the activities, and this happens before we even get to Chapter 8a.  

Some activities include and refer to two different graphs, so I think including the exact reference is helpful.  

Chrissy

Sean Fitzpatrick

unread,
Apr 5, 2023, 10:49:14 PM4/5/23
to pretext...@googlegroups.com
Are there figures that are unique to the workbooks, or are the figures that do appear reproductions of figures from the main text?

I know how to fix this in a LaTeX project, and I think with time I could do it in PreTeXt. But someone who is not busy with end of term and better at xsl (hi Rob) might be able to fix it first.

If I had a book written in LaTeX, and an accompanying workbook, also written in LaTeX, I would use the xr package to point all references in the workbook back to the main book.
There's no built in support for the xr package in PreTeXt (or any mechanism for external references that I'm aware of).


For LaTeX only I think it could work but it would be very hacky and you'd get lots of broken reference errors during conversion, and you'd need the LaTeX auxiliary file from the latex build for the main book while building the workbook (that is, the PDF from LaTeX part of the build).

For other formats I think it would require a lot of work because you would need something distinct from the usual xref. (E.g. in HTML you'd be linking to another document.)

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/e451b520-06bc-41fa-9d2c-edc3b641f135n%40googlegroups.com.

Rob Beezer

unread,
Apr 5, 2023, 11:27:05 PM4/5/23
to pretext...@googlegroups.com
Thanks, Mike, for alerting me to the issue on the Active Calculus repository,
which I would not have seen.

I've added a comment there. Short version: this should start as an Active
Calculus issue before we decide that there is a general problem with PreTeXt.
If it proves to be the latter, we can come back here.

Thanks,
Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/34b97b39-7d1d-45cc-8b27-7c1540775895n%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/34b97b39-7d1d-45cc-8b27-7c1540775895n%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages