0 votes
63 views

error I'm getting:

JAS 3:1-2 Attrib marker 'va' found after 'p' but may only follow 'v' at line 135, char 29

...

These errors were triggered while internally parsing the USFM

Text in question:

+-----------------------

\p \v 1-2 <!--a5f14dd1-082f-4046-8166-3adf7e93b315-->Brothers and sisters, \va 2a\va* we all make many mistakes, \va 1\va* that God will judge one day. But look, you know that God will be even more severe in judging the mistakes of those who teach in the church ⌊because they are spiritual leaders⌋. Therefore, think deeply before you decide to become a teacher in the Church.

\s The Tongue: The Source Of Evil

\p \va 2b\va* When we control our tongues, then we can become mature in our faith and be in full control of ourselves.

+-----------------------

I have a rule in changes.txt that converts these to '\vp .*? \vp*' and that worked in earlier versions of PtxPrint. But with 3.0.1, it throws up this error parsing the USFM, which is happening apparently before it get to the changes.txt process to clean it up.

Is there another solution besides putting the \vp's in Paratext?

PTXprint by (105 points) | 63 views

1 Answer

0 votes

It seems to me that the USFM standard for how va is used has changed. In 3.0  it seems that \va could go anywhere.

In  USFM 3.1, \vp is for specifying the printed form of a verse number, and \va  is an alternative (printed) form.  It looks like now BOTH  should follow immediately after the verse number. When used like that, they certainly have a precise meaning for how the XeTeX code should process things going forwards. (\va gets added, in brackets - or other marks - after the printed verse number, \vp sets how the verse number gets represented in headers, as well as the text, etc). Both get moved into margins or whatever if marginal verse numbers are selected, and so on. As they are anchored to the verse number, you can't put them into the middle of the text.

The XeTeX code itself will treat a mid-text \va like in USFM3.0, (i.e. just another character style), although a quick test shows it won't get the brackets (a bug that can be solved fairly easily with start and end hooks), so I guess that the message you're getting is from the parser that the user-interface is using. Perhaps Martin can comment on that...

To avoid that issue, you could define your own style (e.g. \zva, copied from \va), and make your changes file swap "\\va"  >  "\\zva" 

by (1.1k points)

> that can be solved fairly easily with start and end hooks

I do have that, but...

> you could define your own style (e.g. \zva, copied from \va), and make your changes file swap "\\va"  >  "\\zva" 

The problem is that the parser you mentioned happens before changes.txt, so short of putting ‘\\zva’ in my text, I can’t seem to get past the parser to allow changes to make a change.

Is there anything that runs before the parser?

The other weird thing about it is that the parser doesn’t seem to be refreshing from the text. As an experiment, I actually changed the \va’s in the text to \vp’s to see if they would work and it’s still giving me the same error!?

while the text has \vp rather than \va

Is there anything that runs before the parser?

I wonder if adding appropriate sections to your changes.txt file would solve the problem:

This tells it to apply the changes in line 7-18 BEFORE it even gets to the parser. And anything after that happens later in the process.

When you hover over the options shown on the right Code Snippet buttons, a tooltip will tell you more about when the changes in each section are processed. (This little-known functionality has been around for a while, but only recently exposed via the buttons on the right).

Mark P, i see sample output in your image, but I don't see any changes code or any Code Snippet button.
Steve - there's an issue with images on this site... I have reported it, but nothing has been fixed yet. Notice that a new image pasted into a response "clobbers" images in earlier messages! :-(

Related questions

0 votes
1 answer 193 views
I keep running into the following error message which is preventing me from exporting to pdf: Marker cannot occur here: \p ... , but no success. Does anyone know how to fix this?
anon233143 252 asked Jun 25, 2021
0 votes
1 answer 187 views
Is there any way to search for markers that Paratext has deemed invalid (that is, they are red)? In one project I have over a ... markers than ending ones (i.e., \it \it*). Thx.
anon645281 153 asked Apr 4, 2019
+1 vote
0 answers 31 views
When citing chapters and verses, use only a comma (,) to separate the chapter number from the verse number on header of the page. Example: Mc 1,39 (Mark chapter 1 verse 39)
Petrus Khoa 103 asked Jul 26, 2025
0 votes
1 answer 34 views
There are numerous places where we have used \+nd Here\+nd* in cross reference keywords/quotes or in footnote ... correct way to style these in cross-references and footnotes?
gregbac 141 asked Jan 19
0 votes
1 answer 178 views
I am not seeing clear instruction on USFM documentation on how to handle \xq and \xta, etc. within \xdc. Our ... translator be using nested formatting tag instead e.g. \+it?
gregbac 141 asked Feb 1, 2024
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
But if we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus, his Son, purifies us from all sin.
1 John 1:7
3,049 questions
6,007 answers
5,672 comments
2,029 users