wf49670 / ppgen

Post-processing generator for DP
6 stars 4 forks source link

Issue with the .bn command #99

Open okrick opened 1 month ago

okrick commented 1 month ago

When the .bn command is used within a .nr block, an unwanted newline character is often inserted into the resulting text file. This can disrupt the formatting of text, especially in cases like poems where the line breaks are crucial.

For example, the following code snippet:

.nf b
This is a poem
.bn 1.png
This is the next line of the poem.
.nf-

might produce the following output:

This is a poem

This is the next line of the poem.

This issue doesn't consistently arise in all poems with page breaks, but it's a recurring problem that can be addressed using the .sr command: .sr tB ~\.bn \d+\.png~~. However, a more ideal solution would be to prevent this issue from occurring in the first place.

PS: I recall seeing this with tables in previous projects.