LaTeX: "destination with same identifier..."

400 views
Skip to first unread message

Eric W. Hansen

unread,
Sep 12, 2019, 3:36:07 PM9/12/19
to pretext...@googlegroups.com

I am processing LaTeX output with pdflatex in TeXShop 4.27.  The following warning is thrown in various places:

pdfTeX warning (ext4): destination with the same identifier (name{tcb@cnt@block

.1}) has been already used, duplicate ignored

<to be read again> 

                   \relax 

l.754 ... a table.}{g:figure:idp140244814359880}{}                                               

 

The LaTeX source is:

\begin{figureptx}{Representing the comparison operation \(x \lt 2\) with a table.}{g:figure:idp140244814359880}{}%

\centering

\begin{sidebyside}{1}{0}{0}{0}%

\begin{sbspanel}{1}%

{\centering%

\begin{tabular}{cccc}

...

\end{tabular}

\par}

\end{sbspanel}%

\end{sidebyside}%

\tcblower

\end{figureptx}%

 

And the PreTeXt source is:

<figure>

         <caption>Representing the comparison operation <m>x \lt 2</m> with a table.</caption>

         <sidebyside>

         <tabular halign="center">

            ...

        </tabular></sidebyside>

</figure>

 

What should I do differently?

 

Thanks,

Eric

Rob Beezer

unread,
Sep 12, 2019, 5:25:27 PM9/12/19
to pretext...@googlegroups.com
Do you see any harm in the PDF output? I've seen this, and there is

https://github.com/rbeezer/mathbook/issues/1043

The suggestion in the issue has not resolved the problem, just shifted it.

I'd love to go through the LaTeX log and chase down all of these things, but if
they don't yet create a problem a reader sees, then they are not a real priority.

I'll look at sidebyside/tabular more carefully a bit later.

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/018CB4D8-4F47-4488-A308-E01D63D2459B%40dartmouth.edu
> <https://groups.google.com/d/msgid/pretext-support/018CB4D8-4F47-4488-A308-E01D63D2459B%40dartmouth.edu?utm_medium=email&utm_source=footer>.

Eric W. Hansen

unread,
Sep 12, 2019, 6:11:02 PM9/12/19
to pretext...@googlegroups.com
The PDF looks fine, but in TeXShop the processing halts at each warning / error and I have to manually make it continue with a carriage return. The same is true for the other issue I posted. Processing halts, and I hit CR to make it resume. That's a lot of key-tapping for a long document.

I don't know if TeXShop has a "full speed ahead" mode that ignores the warnings.

Eric



On 9/12/19, 5:25 PM, "pretext...@googlegroups.com on behalf of Rob Beezer" <pretext...@googlegroups.com on behalf of bee...@ups.edu> wrote:

Do you see any harm in the PDF output? I've seen this, and there is

https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frbeezer%2Fmathbook%2Fissues%2F1043&amp;data=02%7C01%7Ceric.w.hansen%40dartmouth.edu%7Cfb4909065e7e41ae6dad08d737c7bbb8%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637039203305755786&amp;sdata=7mFgCG8vyE6R2x9gwsFuYbKKRmiGFkzcctWkGkEbT%2BM%3D&amp;reserved=0
> https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpretext-support%2F018CB4D8-4F47-4488-A308-E01D63D2459B%2540dartmouth.edu&amp;data=02%7C01%7Ceric.w.hansen%40dartmouth.edu%7Cfb4909065e7e41ae6dad08d737c7bbb8%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637039203305755786&amp;sdata=59E%2FoiTdRzxVp9WQScYbjEyhZNQqEvr%2FEKqGdV%2FaC8A%3D&amp;reserved=0
> <https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpretext-support%2F018CB4D8-4F47-4488-A308-E01D63D2459B%2540dartmouth.edu%3Futm_medium%3Demail%26utm_source%3Dfooter&amp;data=02%7C01%7Ceric.w.hansen%40dartmouth.edu%7Cfb4909065e7e41ae6dad08d737c7bbb8%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637039203305755786&amp;sdata=EJWQQlXJ8oM5nICSoXs98TRIXqEf2PK%2FU6L3p6nW0LE%3D&amp;reserved=0>.

--
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://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpretext-support%2F82a68b7a-d41a-7082-de6c-0efbfe9b4153%2540ups.edu&amp;data=02%7C01%7Ceric.w.hansen%40dartmouth.edu%7Cfb4909065e7e41ae6dad08d737c7bbb8%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637039203305755786&amp;sdata=Ni%2F3RrzXBmBSiyJKnGlCK2AZp%2BPzjKinXjwZg758%2B4c%3D&amp;reserved=0.


David Farmer

unread,
Sep 12, 2019, 6:29:16 PM9/12/19
to pretext...@googlegroups.com

Can't you just hit "q" to "quietly continue" ?
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/BF812659-DDFC-484D-84AE-6E4932D9D6C1%40dartmouth.edu.
>

Eric W. Hansen

unread,
Sep 12, 2019, 9:23:06 PM9/12/19
to pretext...@googlegroups.com
It turned out to be "s" for me, but yes, that produced the desired effect. Haven't used TeXShop in a while, forgot that one. Thanks!

Eric



On 9/12/19, 6:29 PM, "pretext...@googlegroups.com on behalf of David Farmer" <pretext...@googlegroups.com on behalf of far...@aimath.org> wrote:


Can't you just hit "q" to "quietly continue" ?


On Thu, 12 Sep 2019, Eric W. Hansen wrote:

> The PDF looks fine, but in TeXShop the processing halts at each warning / error and I have to manually make it continue with a carriage return. The same is true for the other issue I posted. Processing halts, and I hit CR to make it resume. That's a lot of key-tapping for a long document.
>
> I don't know if TeXShop has a "full speed ahead" mode that ignores the warnings.
>
> Eric
>
>
>
> On 9/12/19, 5:25 PM, "pretext...@googlegroups.com on behalf of Rob Beezer" <pretext...@googlegroups.com on behalf of bee...@ups.edu> wrote:
>
> Do you see any harm in the PDF output? I've seen this, and there is
>
> https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frbeezer%2Fmathbook%2Fissues%2F1043&amp;data=02%7C01%7Ceric.w.hansen%40dartmouth.edu%7C2acd11e452464cc8a44608d737d0a633%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637039241602432300&amp;sdata=J7twPJhCX2QpxLR2eXNC73dBCeT26DLi6RmgpdSJ8e4%3D&amp;reserved=0
> > https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpretext-support%2F018CB4D8-4F47-4488-A308-E01D63D2459B%2540dartmouth.edu&amp;data=02%7C01%7Ceric.w.hansen%40dartmouth.edu%7C2acd11e452464cc8a44608d737d0a633%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637039241602432300&amp;sdata=r28pEGJsvMGqn8pbmt86GTDsvhGrIXQLzK0Sm6E%2FAYE%3D&amp;reserved=0
> > <https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpretext-support%2F018CB4D8-4F47-4488-A308-E01D63D2459B%2540dartmouth.edu%3Futm_medium%3Demail%26utm_source%3Dfooter&amp;data=02%7C01%7Ceric.w.hansen%40dartmouth.edu%7C2acd11e452464cc8a44608d737d0a633%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637039241602432300&amp;sdata=swqklJ2OihY9JBiuCVcfuJ%2Bp5g0Zns2myHNSwHsWDkU%3D&amp;reserved=0>.
>
> --
> 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://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpretext-support%2F82a68b7a-d41a-7082-de6c-0efbfe9b4153%2540ups.edu&amp;data=02%7C01%7Ceric.w.hansen%40dartmouth.edu%7C2acd11e452464cc8a44608d737d0a633%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637039241602432300&amp;sdata=LZ%2BPc6T9akwPdvvPllL79L3pS4xUJdRvBWRvs6Zyv1Y%3D&amp;reserved=0.
>
>
> --
> 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://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpretext-support%2FBF812659-DDFC-484D-84AE-6E4932D9D6C1%2540dartmouth.edu&amp;data=02%7C01%7Ceric.w.hansen%40dartmouth.edu%7C2acd11e452464cc8a44608d737d0a633%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637039241602432300&amp;sdata=IQWQwxa1WCDoxcHzrs0LpK2miEqa3EorLfZZ15BTrgE%3D&amp;reserved=0.
>

--
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://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpretext-support%2Falpine.LRH.2.21.1909121828480.19301%2540li375-150.members.linode.com&amp;data=02%7C01%7Ceric.w.hansen%40dartmouth.edu%7C2acd11e452464cc8a44608d737d0a633%7C995b093648d640e5a31ebf689ec9446f%7C0%7C0%7C637039241602432300&amp;sdata=k7GVNMskLxCUUYZFfP7WQ9o49nxOOmSlHbFSiCrgA58%3D&amp;reserved=0.


Rob Beezer

unread,
Sep 12, 2019, 10:01:02 PM9/12/19
to pretext...@googlegroups.com
On 9/12/19 3:11 PM, Eric W. Hansen wrote:
> That's a lot of key-tapping for a long document.

Yes, long-running annoyances for authors increases the priority. Even pressing
"s" once each time might get old. My command-line LaTeX does not halt on these
warnings.

Rob

Dirk Basson

unread,
Feb 25, 2021, 5:43:02 AM2/25/21
to PreTeXt support
Hi all,

Sorry to revive this old topic! I have been playing around trying to figure out a way to fix these (destination with the same identifier) warnings. They aren't bothering me, but I am worried that they may be obscuring legitimate warnings. As far as I can tell it happens due to the tcb@cnt@block counter resetting in each new section. So if your first block element in your second section will have the same identifier as your first block element in your first section. References use the xml:id, so I am not sure how the identifier gets used nor where it is assigned, but it doesn't seem to be causing issues in the pdf output.

But I just learned (from https://tex.stackexchange.com/a/25052/115640) that there is a package you can use to silence all warnings of a specific type. This should ease the "author's annoyance".

Dirk

Rob Beezer

unread,
Feb 25, 2021, 11:04:58 PM2/25/21
to pretext...@googlegroups.com
Dear Dirk,

> Sorry to revive this old topic!

Not at all! Things like this should be fixed!

Thanks for the sleuthing. The "silence" package looks interesting, and worth
knowing about. But as a last resort - I'd like to understand what is going
wrong, ideally.

I believe tcb@cnt@block is only being used explicitly for a LaTeX
tcolorbox/environment I call "subdisplay". It is what allows a side-by-side to
have panels labeled 27.5(a), 27.5(b), 27.5(c), etc. It produces the (a), (b),
(c), etc. Does your document do this? Is the warning only when you have such a
construction, or is it ubiquitous?

Maybe the resetting you mention is on each occurence of a "sidebyside"? With or
without "subnumbering".

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/544e784d-4d0d-4b81-83a9-769a55cbf7f4n%40googlegroups.com
> <https://groups.google.com/d/msgid/pretext-support/544e784d-4d0d-4b81-83a9-769a55cbf7f4n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Dirk Basson

unread,
Feb 26, 2021, 5:31:42 AM2/26/21
to pretext...@googlegroups.com
I tried to come up with a minimal example where this happens and ended up with something like this:

ptxchapter
    ptxsection (1)
        Convention (gets number 1.1.1)
    end ptxsection
    ptxsection (2)
        Example (gets number 1.2.1)
    end ptxsection
end ptxchapter

There are no sidebyside's so not sure if that's it. The warning disappears if I do any of the following:
* move the Example into section 1
* delete the Convention
* put the Convention and Example in subsections instead of sections (i.e. 1.1.1.2 & 1.1.2.1 - actually I think it is then numbered 1.1.2.2)

The warning is still there if Example goes into a subsection that's inside a new section (different from the one that contains the Convention).

I would post the minimal example I ended up with, but I couldn't get the preamble down to less than 400 lines (including comments).

Dirk

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/6ddd8b44-1db5-aff1-a937-bd2006915657%40ups.edu.

Rob Beezer

unread,
Feb 27, 2021, 6:06:26 PM2/27/21
to pretext...@googlegroups.com
Dear Dirk,

Thanks for the reduction to some minimal situation. That was very helpful.

Several (enjoyable?) hours down several LaTeX rat holes.

1. Tried to build a minimal example, with your guidance, from the ground up
(cutting down the preamble is hard, I know from experience). Even now, I'm
uncertain why that didn't exhibit the problem.

2. Does not happen with the xelatex engine (at least there is not a warning in
the log).

3. The warning is a consequence of using the hyperref package, and seems to
usually bite people when messing with page numbering. Fortunately we don't seem
to have that problem. Searching the log for "page." only brings up the PNG of
Jimmy Page. ;-)

http://www.texfaq.org/FAQ-hyperdupdest

4. Finally, seaching on

tcolorbox "number within" hyperref

produced

https://tex.stackexchange.com/questions/485251/tcolorbox-potential-bug-with-duplicate-label-for-hyperref-link

which I think identifies the solution, a "\theH..." counter for hyperref to use
internally. Brutal hack/guess directly into the sample article LaTeX removed
many of the warnings (exposing a few others in odd places, like cross-references
to/from exercises to backmatter solutions).


So more to do, and I'm going to let it percolate a bit (besides not having
anymore time right now).

If you want to experiment and provide more guidance, build the sample article
LaTeX, and put it someplace where you won't accidentally rebuild it and
overwrite your experiment (the voice of experience!).

Add (within \makeatletter, \makeatother) lines such as:

\providecommand{\theHtcb@cnt@block}{\thesection.\arabic{tcb@cnt@block}}

The forward/backward exercise/backmatter links may be a bigger problem. And,
oh, I didn't even test the PDF to see what effect this had. ;-)

Rob
> <mailto:pretext-support%2Bunsu...@googlegroups.com>
> > <mailto:pretext-suppo...@googlegroups.com
> <mailto:pretext-support%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/pretext-support/544e784d-4d0d-4b81-83a9-769a55cbf7f4n%40googlegroups.com
>
> >
> <https://groups.google.com/d/msgid/pretext-support/544e784d-4d0d-4b81-83a9-769a55cbf7f4n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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-support%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/6ddd8b44-1db5-aff1-a937-bd2006915657%40ups.edu.
>
> --
> 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/CAE_t0o%3DK3cPi%3Dmfn52P3gW5s_mgvVknZQBWyOYQSUoFTQdaLsA%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-support/CAE_t0o%3DK3cPi%3Dmfn52P3gW5s_mgvVknZQBWyOYQSUoFTQdaLsA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
Feb 27, 2021, 11:07:02 PM2/27/21
to pretext...@googlegroups.com
> 1. Tried to build a minimal example, with your guidance... Even now, I'm
uncertain why that didn't exhibit the problem.

Ten minutes laying on the couch made me realize I'd not included the hyperref
package. :-( But still no luck.

So, with maybe a better familiarity with the preamble, I built something like
your example, and progressively and brutally cut down the preamble.

Appended should raise the warning. And if you move the "usepackage" for
hyperref *before* the tcolorbox are defined, then the error goes away.

So maybe it is a matter of defining all the tcolorbox environments *after*
loading hyperref (which is not the usual advice!).

I've not yet experimented with a rearrangement with a full example.

Rob


\documentclass{book}
\usepackage{tcolorbox}

\newtcolorbox[auto counter, number within=section]{block}{}
\newtcolorbox[use counter
from=block]{remark}[2]{title={{Remark~\thetcbcounter\space#1}}, phantomlabel={#2}, }
\newtcolorbox[use counter
from=block]{example}[2]{title={{Example~\thetcbcounter\space#1}},
phantomlabel={#2}, }

\usepackage{hyperref}

\begin{document}

\chapter{Chapter One}
\section{Section One}
\begin{example}{Title One}{Label1}
Foo.
\end{example}
\section{Section Two}
\begin{remark}{Title Two}{Label2}
Bar.
\end{remark}
\end{document}

Rob Beezer

unread,
Feb 28, 2021, 3:53:24 PM2/28/21
to pretext...@googlegroups.com
I've switched up the order, and that seems to have stopped these spurious
warnings. I tested the actual links with my minimal esample and they seem to
work even when there are warnings, which is why nobody has had bad output from this.

And if you've seen the "dropped characters" warning, I took care of that too.
So the log is looking much cleaner.

Thanks, Dirk, for your help on this one.


https://github.com/rbeezer/mathbook/issues/1043

https://github.com/rbeezer/mathbook/issues/1452

Rob Beezer

unread,
Feb 28, 2021, 4:04:27 PM2/28/21
to pretext...@googlegroups.com
And for the highly curious, a report upstream:

https://github.com/T-F-S/tcolorbox/issues/135
Reply all
Reply to author
Forward
0 new messages