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

Make manual volume breaking work properly #33

Closed
bertfrees opened this issue Jul 22, 2016 · 14 comments
Closed

Make manual volume breaking work properly #33

bertfrees opened this issue Jul 22, 2016 · 14 comments

Comments

@bertfrees
Copy link
Contributor

bertfrees commented Jul 22, 2016

Manual volume breaking is a feature that Joel has implemented right before he left on vacation and there hasn't been time to debug it properly.

E.g. it currently doesn't work in combination with table of contents: brailleapps/dotify#212. Also, Joel has mentioned the current implementation might not work when there are a lot of manual break points. I think Mischa even had problems with just a couple of break points.

I can have a look at this myself but should ideally discuss this with Joel. We can already start with creating some unit tests.

+1 from:

@egli
Copy link
Member

egli commented Sep 19, 2016

Apparently Joel is going to work on this

@joeha480
Copy link

I have implemented this, and it is staged right now. dotify.formatter.impl:2.7.0

@bertfrees
Copy link
Contributor Author

Thanks @joeha480! Looks good so far.

I checked that the TOC issue is fixed. I also tested with more than one manual break point, and also with a combination of manual and automatic volume breaking (break-before="volume" + sheets-in-volume-max +volume-keep-priority).

Mischa will do some further testing now.

@mixa72
Copy link

mixa72 commented Nov 1, 2016

With my test, manual volume breaking only works without TOC. In combination with TOC the transformation fails.

@bertfrees
Copy link
Contributor Author

Hi Mischa, Christian needs to deploy this first. Sorry for the confusion!

@mixa72
Copy link

mixa72 commented Nov 1, 2016

Never mind.

@bertfrees
Copy link
Contributor Author

@mixa72 We're wondering which behavior you would prefer. I'll explain with an example. Let's say there are 120 sheets, and the maximum number of sheets per volume is set to 50. Normally (if there are no other constraints) the system would split the book into 3 volumes of 40 sheets (40, 40, 40). Now if you insert a manual break point at sheet 90:

  • would you like the system to adjust the other breaks so that the overall layout is optimized again taking into account the new constraint (this would result in 45, 45, 30)
  • or would you like the other breaks to remain untouched? (this would result in 40, 40, 10, 30)

@mixa72
Copy link

mixa72 commented Nov 2, 2016

Very good question. I think both ways of volume splitting are completely plausible and legitimate, but I'd prefer 45, 45, 30. (In my opinion the "full" division into volumes on the basis of 40 sheets per volume should no longer be relevant once you've inserted a manual break point).
Anyway, I'll avoid combining manual and automatic volume breaking since I'm not very strong at maths.

@bertfrees
Copy link
Contributor Author

OK. 45, 45, 30 is what the current implementation will do, actually.

@mixa72
Copy link

mixa72 commented Nov 2, 2016

Touché! Great.

@bertfrees
Copy link
Contributor Author

bertfrees commented Dec 13, 2016

Moved upstream: daisy/pipeline-mod-braille@05a27df...9aaa1b0

@mixa72
Copy link

mixa72 commented Jan 30, 2017

See example, line 701:
The first chapter after the volume breaking (#B ELEUSIUS F@HRT LIFT) should start on a recto (odd braille page number), but it appears on a verso (even braille page number). The recto is empty instead.
I tried to force a page break in the CSS with page-break-after: always:

brl|volume[brl|grade='#{$contraction-grade}'] {
   display:block;
   volume-break-before:always;
   page-break-after: always;
}

It appears to have no effect though.
en_ex.zip

@bertfrees
Copy link
Contributor Author

bertfrees commented Mar 30, 2017

Blank pages fixed in sbsdev/pipeline@85e10c4

@mixa72 mixa72 closed this as completed Apr 4, 2017
@bertfrees bertfrees removed the 4 - Done label Apr 4, 2017
@bertfrees
Copy link
Contributor Author

Mischa reported another bug with blank pages. See the private email with the DNA.xml test book. I have fixed it in sbsdev/pipeline@5e56065.

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

No branches or pull requests

4 participants