ref with multiple id's

11 views
Skip to first unread message

Valerio De Angelis

unread,
Aug 20, 2023, 4:45:50 PM8/20/23
to PreTeXt support
I have four examples, numbered 1,2,3,4, with xml:id="exi" for i=1,2,3,4. In an exercise, I would like to say "prove the statements made in Examples 1-4". But if I use   
"prove the statements made in <xref ref="ex1,ex2,ex3,ex4"/>" the output is
"prove the statements made in Example 1, Example 2, Example 3, Example 4."
I tried renaming "example" to an empty name, so that I could do 
"prove the statements made in Examples <xref ref="ex1,ex2,ex3,ex4"/>"
but then the output will be [example] 1, [example] 2, [example] 3, [example] 4.
Is there a way to do this?
 

Rob Beezer

unread,
Aug 20, 2023, 5:15:59 PM8/20/23
to pretext...@googlegroups.com
Second bullet in the subsection of "4.5 Cross-References and Citations"

Subsection 4.5.3: Variations
https://pretextbook.org/doc/guide/html/topic-cross-referencing.html#subsection-27

Study comments following.

Your guesses are what is explained in the third bullet.

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/ca2b6980-bef0-46ef-81b9-2f1931c86d4cn%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/ca2b6980-bef0-46ef-81b9-2f1931c86d4cn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Valerio De Angelis

unread,
Aug 20, 2023, 7:54:04 PM8/20/23
to PreTeXt support
Thank you! that is exactly what I needed. And I thought I had searched the guide, but obviously I need to get better at that.

Rob Beezer

unread,
Aug 20, 2023, 9:46:26 PM8/20/23
to pretext...@googlegroups.com
Good! And the Guide needs to get better, too. ;-)

On 8/20/23 16:54, Valerio De Angelis wrote:
> Thank you! that is exactly what I needed. And I thought I had searched the
> guide, but obviously I need to get better at that.
>
> On Sunday, August 20, 2023 at 4:15:59 PM UTC-5 Rob Beezer wrote:
>
> Second bullet in the subsection of "4.5 Cross-References and Citations"
>
> Subsection 4.5.3: Variations
> https://pretextbook.org/doc/guide/html/topic-cross-referencing.html#subsection-27 <https://pretextbook.org/doc/guide/html/topic-cross-referencing.html#subsection-27>
>
> Study comments following.
>
> Your guesses are what is explained in the third bullet.
>
> Rob
>
> On 8/20/23 13:45, Valerio De Angelis wrote:
> > I have four examples, numbered 1,2,3,4, with xml:id="exi" for i=1,2,3,4.
> In an
> > exercise, I would like to say "prove the statements made in Examples
> 1-4". But
> > if I use
> > "prove the statements made in <xref ref="ex1,ex2,ex3,ex4"/>" the output is
> > "prove the statements made in Example 1, Example 2, Example 3, Example 4."
> > I tried renaming "example" to an empty name, so that I could do
> > "prove the statements made in Examples <xref ref="ex1,ex2,ex3,ex4"/>"
> > but then the output will be [example] 1, [example] 2, [example] 3,
> [example] 4.
> > Is there a way to do this?
> >
> > --
> > 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/ca2b6980-bef0-46ef-81b9-2f1931c86d4cn%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/ca2b6980-bef0-46ef-81b9-2f1931c86d4cn%40googlegroups.com> <https://groups.google.com/d/msgid/pretext-support/ca2b6980-bef0-46ef-81b9-2f1931c86d4cn%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pretext-support/ca2b6980-bef0-46ef-81b9-2f1931c86d4cn%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-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/152ce5d9-b2c9-44ae-b4de-b229507d2d9en%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/152ce5d9-b2c9-44ae-b4de-b229507d2d9en%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages