Cross reference between collections

I am going to build an app, in which I am trying to give cross reference between different book collections instead of different books in single collection. E.g. I have two collection with the collection lebel as:
C01 (Collection 1 / Book of John with translation in language 1)
C02 (Collection 2/ Book of John with translation in language 2)
I want to show the translation of book of collection 2 with the cross reference in the book of collection 1, as both have translation in different languages, both are local languages and spoken in our area.
How it can be implemented?

Waiting…

1 Like

Cross references are limited to the one collection. \xt MAT 4:16\xt*
You can hyperlink across collections with Markdown markup [Collection 2 Mat 4:16](C02.MAT.4.16)

You could put that into a footnote or \x ..\x* reference. No time to test just now.

1 Like

I’ll let you know after testing it.

Thanks for quick response.

Sorry @mcquayi

I have just tried but couldn’t be successful.
If you have some time, please test it and guide.

Thanks in anticipation

I also am having problems with linking across collections. Is the syntax above ‘C02.MAT.4.16’ correct?

Thanks

The Markdown used to work with this syntax: [Collection 2 Mat 4:16](/C02/MAT.4.16), but somehow recently stopped working.

Should/can we use deep linking for that? It looks a bit of an over-kill.

@mcquayi could you have a look into this? Your support is much appreciated.

Hi,
Is there any possibilities to use cross reference between collections now?
As @Ngawang_Trinley saying that it was working sometime.

[Collection 2 Mat 4:16](C02.MAT.4.16)
This formatting works (book collection code, dot, book abbreviation, dot, chapter, dot verse). Verses can have dashes to show ranges.

[Collection 2 Mat 4:16](/C02/MAT.4.16)
This formatting does not work.

Thanks for response.

Despite trying as instructed, it was unsuccessful. The reference is displayed from that collection only, not from any other collections. It still shows references from the same collection even after I changed the collection ID to one from another.

Are you using the Markdown style links? The ones with [the text here](the reference here)?

If you’re using \xt style cross references, then I’m not sure what the proper formatting would be.


I’ve had lots of problems with SAB not being able to deal with \xt links, so I’ve actually used a Change to convert them.
I find this:
\\xt (.*?)\|(\w{3}) (\d+)\u200f*\:(\d+)\u200f*(-+\d+)*\\xt\*
and I replace it with this:
[\1](C01\.\2\.\3\.\4\5)

You’d want to change the replacement to have your book collection id in the C01 location. Note that this find only finds fairly simple cross references and can’t handle as much syntax as Paratext can.

Yes I am using \xt style as described above and it isn’t working.
I am unable to get your replacing idea. Can you simplify/explain it a bit, please.

I guess I forgot to mention that we’re using the new features of USFM3, where you can divide up the \xt ... \xt* marker into two parts, one which has what will be written and the other with a standard (English) shortcut for the reference. For example:
\xt Матей, гл 5, срещу 8|MAT 5:8\xt*
The reason we’ve resorted to writing the reference in English shortcut syntax is because, while Paratext is fairly good at parsing what “Матей, гл 5, срещу 8”, SAB is extremely bad at it.

If your references are in a vernacular language and if you’re not using that sort of \xt marker, it requires editing all of them by hand in Paratext. (I used some tricks to use global changes to speed up the process, but it was still a lot of manual work). We determined that getting our cross refs working in SAB was worth all the manual trouble, but you may decide differently.


Inside of SAB I then convert
\xt Матей, гл 5, срещу 8|MAT 5:8\xt*
to this format:
[Матей, гл 5, срещу 8](MAT.5.8)
(that’s what the regex changes rules do). This change has the benefit that it works when you can call a different book collection, like C01.MAT.5.8. It looks like that C01 reference doesn’t work in the normal \xt setting (though it would require a developer to confirm that).

One caveat: my regex change assumes that references won’t be more complicated than MAT 5:8-10. In particular it won’t handle MAT 5:8,10 (though this might be possible) and it won’t handle MAT 5:8; 6:11 or MAT 5:8; MRK 4:3. For those cases I set them up as separate \xt markers in PT even though PT can handle the complex references.