+1 vote

I was asked if there was a way to export/convert an older cross-reference file into a format that can be used by Paratext 8-9. Here is the format of the original file:

\id Cross References Canonical Sequence
\rem B.C, S.C
\rem Updated 24.4 2003; 14.7 2003 S.C
\rem Added OT, USFM compliant, updated 24.9.07; 16.5.08 I.R.

\ref GEN 1:3
\x - \xo 1:3 \xt 2CO 4:6\x*
\ref GEN 1:6
\x - \xo 1:6-8 \xt 2PE 3:5\x*
\ref GEN 1:26
\x - \xo 1:26 \xt 1CO 11:7\x*
\ref GEN 1:27
\x - \xo 1:27 \xt MAT 19:4; MRK 10:6\x*
\ref GEN 1:27
\x - \xo 1:27-28 \xt GEN 5:1-2\x*
\ref GEN 2:2
\x - \xo 2:2 \xt HEB 4:4, 10\x*
\ref GEN 2:2
\x - \xo 2:2-3 \xt EXO 20:11\x*

I extracted cross-references from a project in Paratext 9 and figured out this format:

GEN.1:3 {2CO.4:6}
GEN.1:6 {2PE.3:5}
GEN.1:26 {1CO.11:7}
GEN.1:27 {MAT.19:4 MRK.10:6}
GEN.1:27 {GEN.5:1-2}
GEN.2:2 {HEB.4:4,10}

My I still have questions about the “intro” lines:

Model=BootCmpB
Versification=English
VerseSegmentCount=1

Is “Model” necessary?
How does VerseSegmentCount work?

Also, is it possible to convert this (with a verse range) into PT8-9 format?

\ref GEN 2:2
\x - \xo 2:2-3 \xt EXO 20:11\x*

Thanks!

james_post

Paratext by [Moderator]
(2.1k points)

reshown

2 Answers

0 votes
Best answer

Use Regex to

  • Delete \ref
  • Change \s*\\x - \\xo\s\S+\s*\\xt\s=> {
  • Replace the spaces after book names with a .: \b(\w{3})\s(?=\d+:)=>\1.
  • Change \\x*=>}
  • Delete semicolons ;

I am not sure if Model= is required, but I do not think it is critical what it is set to.

You will probably have VerseSegmentCount = 1. A VerseSegmentCount > 1 applies to cross references designed to be added to two or more verse segments in the text. A verse segment count of 2 looks like this: MAT.17:5 {MAT.3:17 2PE.1:17} {ACT.3:22,23}. The VerseSegmentCount number is the maximum number of verse segments in the cross reference data.

I believe GEN.2:2-3 {EXO.20:11} is legal as is.

by (1.8k points)
reshown

Thank you!

Is there a way to do multi-chapter cross-references (for the actual \xo reference, not the \xt)

Like this: EZR.4:24–EZR.5:1 {HAG.1:1 ZEC.1:1}

I cannot seem to get this to work.

I am afraid that you cannot have multi-chapter references on the left hand side. My hack is to add % to references that need additional processing after import.
EZR.4:24% {HAG.1:1 ZEC.1:1}
EZR.5:1% {HAG.1:1 ZEC.1:1}
Before adding the cross-references you need to add % to the project’s Extra Material field in Scripture reference settings. The % will be imported and then you can use a search to find them and create the proper references.
Other things to look out for:

  • If you have alternate syntax in your Scripture reference settings like ,| and , then you need to temporarily remove the alternate syntax before importing or you will import the entire alternate syntax string.
  • References to single chapter books need to include chapter 1:
    PSA.73:8 {PSA.1:1 PSA.17:10 JUD.1:16}
    After import you can do a search on single chapter books in references and remove the 1.
  • A reference to a multi-chapter reference will include the book name on the second chapter reference:
    MAT.11:21-22 {ISA.23:1-8 EZK.26:1--EZK.28:26% JOL.3:4-8 AMO.1:9-10
    I mark these with a % so I can go back an delete the book name from the second reference.
  • You cannot make a reference to just a chapter. You must include a verse range:
    LUK.18:31 {PSA.22:1-31%}
    I mark these with a % so I can go back an delete the verse range after import…

I encountered another issue. Here’s the original reference:

\ref PSA 34:1
\x - \xo 34:0 \xt 1SA 21:13-15\x*

I tried importing this to PSA 34:0, but it failed. It didn’t actually give me an error, it just didn’t put the cross-reference in.

Do references like these just need to go to PSA 34:1?

Thank you,

james_post

Thank you for this.

Is there somewhere “official” this info is posted?

Is there a way to comment in the XRF file?

Thank you @CrazyRocky for these specific examples. I appreciate them.

I have some questions. I also have some good news to share that seems to indicate some of these issues don’t actually require hacking with % or going back and changing things!

Is there a way to add comments to the .xrf file?

Adding % hack for a \xo reference: I tried adding a % to the reference and to the Extra Material field, and it is not being imported. Paratext imports the reference as a normal reference, without the %. I’m not sure what to do about that, but share a hack to the hack below.

For example: EZR.4:24% {HAG.1:1 ZEC.1:1}
is being imported as \x \xo 4:24 \xt Hag 1:1; Sek 1:1\x*

I can add something to the \xt verse reference, to flag it for later, but not to the \xo reference. So for now, I’m going to add # to set it apart from %.

For example: EZR.4:24 {HAG.1:1# ZEC.1:1}

References to multi-chapter references : Paratext automatically removes extraneous booknames, so no % is needed.

For example: MAT.11:23-24 {EZK.26:1--EZK.28:26}
is imported as: \x - \xo 11:23 \xt Ese 26:1—28:26\x*

And: 2CH.1:4 {2SA.6:1-17 1CH.13:5-14 1CH.15:25--1CH.16:1}
is imported as: \x - \xo 1:4 \xt 2 Sml 6:1-17; 1 Sto 13:5-14; 15:25—16:1\x*

Whole chapter references are allowed: Paratext imports :0 as a whole chapter, whether in a range or an individual chapter, so no % is needed if you indeed want the whole chapter (with no verse range) referenced:

Example: 1SA.21:12 {PSA.56:0}
Is imported as: \x \xo 21:12 \xt Sng 56\x*

And: MAT.11:21-22 {EZK.26:0--EZK.28:0}
is imported as \x - \xo 11:21 \xt Ese 26—28\x*

No, sorry. The file format is not designed to be hand-edited/created so there is no mechanism for comments.

0 votes

You can add general comments in the copyright statement at the beginning of the file. For example:

Copyright=This file contains references taken from The Life Application Study Bible © 1988 by Tyndale 
House Publishers, Inc. The symbols † and % have been included in this file to allow further -import 
processing. They must be added to the project’s Scripture Reference Settings as Extra Material following 
a reference. A † indicates a reference with particular Christological significance. In the LASB this symbol 
precedes these special references. Due to technical limitations this symbol is placed at the end of 
references. It can be moved after import if desired. A % marks references that have a more compact form 
in the LASB but technical limitations do not allow the reference to be imported exactly as the appear. 
After import refer to a printed LASB to see how these should be modified. It is also acceptable to simply 
remove the % on these references.
Model=NLT
Versification=English-NLT
VerseSegmentCount=1
GEN.1:1 {PSA.89:11 PSA.102:25 JHN.1:1-2}
by (1.8k points)
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Accept the one whose faith is weak, without quarreling over disputable matters.
Romans 14:1
2,374 questions
5,050 answers
4,758 comments
1,142 users