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

New page for Chapter #1002

Open
mnjames opened this issue Nov 13, 2024 · 3 comments
Open

New page for Chapter #1002

mnjames opened this issue Nov 13, 2024 · 3 comments
Assignees
Labels
Python This issue needs work on the Python code, no XeTeX involved.

Comments

@mnjames
Copy link

mnjames commented Nov 13, 2024

When I choose this sequence
Image
somehow... magically... a new page shows up before chapter 1. I say magically because the temporary .SFM file which is produced doesn't include \pb anywhere.

When I choose this sequence, I get \pb's where expected and everything works.
Image

But, since this sequence leads to the 2nd tick box being grayed out, I assumed it was equivalent to the first sequence.
Image
In reality it's not, it's equivalent to the 2nd sequence.

Personally, I'd like the two buttons to be completely independent. One which says Start 1st Chapter on a New Page and which adds \pb in the .SFM file before \c 1, and a 2nd button which says Start All Other Chapters on a New Page and which adds \pb only before \c 2 and later.

If I'm printing a book without intros but with book titles, I'd like to be able to add chapter breaks only for chapters 2 and later.

@markpenny markpenny added the Python This issue needs work on the Python code, no XeTeX involved. label Nov 15, 2024
@markpenny markpenny self-assigned this Nov 15, 2024
@markpenny
Copy link
Collaborator

Understood. We'll get to it soon.

@mnjames
Copy link
Author

mnjames commented Nov 15, 2024

One side note:
I can use changes.txt to add the page breaks myself, but only by using \pagebreak. Any regex involving \pb doesn't work. Is there a reason for that?
'\\c ' > '\\pagebreak\\c ' works
'\\c ' > '\\pb\\c ' doesn't

@markpenny
Copy link
Collaborator

That last comment seems strange to me. I have tested these and they behave identically on my system. (So I wonder what else might be different in your USFM, or are there other rules doing something strange?)

"\\c " > "\\pb\\c "
"\\c " > "\\pagebreak\\c "

Although, for neatness, I prefer:
"\\c " > "\\pb\n\\c "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python This issue needs work on the Python code, no XeTeX involved.
Projects
None yet
Development

No branches or pull requests

2 participants