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

Scope of \rem #130

Open
mhosken opened this issue Oct 25, 2021 · 5 comments
Open

Scope of \rem #130

mhosken opened this issue Oct 25, 2021 · 5 comments

Comments

@mhosken
Copy link

mhosken commented Oct 25, 2021

The specification document gives no indication of the range of coverage of a \rem. The stylesheet specifies it as being a paragraph marker. But my impression is that \rem covers everything up to the next newline.

If the specification is that it is a pargraph marker, then it is impossible to put \rem around any paragraph marker and the content must be a well formed paragraph (with appropriate closing markers where necessary). If the specification is everything up to the next newline, then any marker etc. can be remarked away including paragraph markers and the like. My impression is that this is how most people of think of it.

PTXprint currently treats it as a paragraph marker with no consideration of the impact of a newline.

All clarification welcomed.

If we say that the \rem marker scope is a single line, then that raises the question of whether there are other markers that are similarly scoped (\toc#, \h). But that is a wider debate with each one being taken case by case.

@cmahte
Copy link

cmahte commented Oct 25, 2021 via email

@klassenjm
Copy link
Contributor

A bit of additional input:

As noted, \rem is a paragraph type marker. As with other paragraph markers, the scope would continue until the next paragraph type marker, or the end of the file.

An attempt has been made to describe whitespace in USFM. In a well-formed USFM document all paragraph markers should be preceded by a newline -- but a newline does not indicate the end of the current paragraph or the start of a new paragraph. The whitespace notes indicate that USFM considers space (U+0020), tab (U+0009), and newline characters to be whitespace, and that multiple whitespace within the body text of a paragraph are not significant and should be normalized when trying to produce a 'well-formed' document (vs just valid USFM).

@davidg-sil
Copy link

So... to summarise:

\rem Someone needs to write this section
\rem \is1 Sometime I'll write the heading
\rem \ip We need an introduction too!

(a) Is badly formed USFM,
(b) Should produce output.
(c) Therefore PTXprint's current code (requested by people who think \rem kills everything until the new line) is an error.
(d) If it were written out as properly formed USFM (with new line before \is1, etc) then, PTXprint's current interpretation would not give an error.

@mnjames
Copy link

mnjames commented Aug 23, 2023

My own 2 cents is that PTXprint's interpretation (that \rem kills everything until the new line) should be considered the correct one, and that the USFM documentation should be updated to clarify that.

If that's the case, then either \rem becomes a new, unique kind of marker, or it's a paragraph marker but with some significant caveats (like the fact that other paragraph markers can occur on the same line and don't have to start a new line in that case).

If the above is not true, then the result is that there is no way within USFM to have a comment in the text which has a meta-reference to a paragraph marker. E.g.:
\rem The following \p marker was changed to \m because...

I find these sorts of comments particularly helpful when creating Bible Modules.

@cmahte
Copy link

cmahte commented Aug 23, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants