Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USFM Figure configurations should produce consistent results #36

Open
davidmoore1 opened this issue Jan 3, 2024 · 0 comments
Open

USFM Figure configurations should produce consistent results #36

davidmoore1 opened this issue Jan 3, 2024 · 0 comments
Labels
bug Something isn't working USFM Parser Issue

Comments

@davidmoore1
Copy link

davidmoore1 commented Jan 3, 2024

Enhancement request:

\fig format is configured differently for USFM 1.0 and USFM 2.0. The fields are the same, but in 1.0, the fields are defined as | separated with a specific order assigned to the fields whereas in 2.0, the fields are specified by the name of the field and =.
Screenshot 2024-01-03 at 10 10 36 AM

In this example, the 2.0 version of the figure is \fig Jesus Birth|src="JesusBirth.jpg" size="span"\fig* and the 1.0 format of the same figure with a different caption is \fig Mary Joseph and Jesus|JesusBirth.jpg|span|||||\fig*

Parsing these using json tools gives different results for the wrapper atts properties. Console log was used to dump the wrapper element that was created processing these two features

Screenshot 2024-01-03 at 10 07 40 AM

The one on the top was generated from the 2.0 version and the bottom from the 1.0 version. Currently, to display both, my code has to check and see if there is an src element and if not is there a unknownDefault_fig element and process the fields that way. It would seem to be preferable for the proskomma tools to detect the 1.0 version and create a result that would look like the 2.0 version so that users don't have to worry about the internal usfm formatting.

@mvahowe mvahowe added USFM Parser Issue bug Something isn't working labels Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working USFM Parser Issue
Projects
None yet
Development

No branches or pull requests

2 participants