Skip to content

Commit 06512d0

Browse files
authored
Merge pull request #530 from ndw/iss-522
Support all(?) of the landscape and portrait combinations
2 parents 6a1a343 + 8d55d74 commit 06512d0

24 files changed

+11532
-206
lines changed

buildSrc/src/main/groovy/org/docbook/xsltng/gradle/TestCase.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class TestCase {
174174
'profile-outputformat': 'print',
175175
'resource-base-uri': '',
176176
'dynamic-profiles': 'true']
177-
if (name.startsWith("book.")) {
177+
if (name.startsWith("book.") || name.startsWith("orient-pb") || name.startsWith("orient-lb")) {
178178
printParams['page-style'] = 'book'
179179
}
180180

src/main/scss/docbook-paged.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use 'fonts-print';
22
@use 'media-all';
33
@use 'page-setup';
4+
@use 'orientation';
45
@use 'media-paged';

src/main/scss/media-paged.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
hyphens: auto;
44
}
55

6+
/* This comes after the orientation configuration. It establishes
7+
a "title flow" for books before the first component. */
8+
@each $pagesize in [A4, A5, Letter] {
9+
html.book-style.#{$pagesize} body {
10+
page: #{$pagesize}-book-title-flow;
11+
}
12+
html.book-style.#{$pagesize} body.landscape {
13+
page: #{$pagesize}-book-title-flow-landscape;
14+
}
15+
html.book-style.#{$pagesize} body.draft {
16+
page: #{$pagesize}-book-title-flow-portrait-draft;
17+
}
18+
html.book-style.#{$pagesize} body.draft.landscape {
19+
page: #{$pagesize}-book-title-flow-landscape-draft;
20+
}
21+
}
22+
623
body {
724
margin-left: 0;
825
margin-right: 0;

src/main/scss/orientation.scss

Lines changed: 4618 additions & 0 deletions
Large diffs are not rendered by default.

src/main/scss/page-setup.scss

Lines changed: 1 addition & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -331,80 +331,13 @@ html.book-style.Letter {
331331
}
332332
}
333333

334-
/* ============================================================ */
335-
/* Pick the correct page style to start */
336-
337334
@each $pagesize in [A4, A5, Letter] {
338335
html.article-style.#{$pagesize} body {
339-
string-set: DocumentTitle "";
340-
page: #{$pagesize}-article-flow-portrait;
341-
}
342-
343-
html.article-style.#{$pagesize} body .db-bfs.portrait,
344-
html.article-style.#{$pagesize} body .division.portrait,
345-
html.article-style.#{$pagesize} body .component.portrait,
346-
html.article-style.#{$pagesize} body .section.portrait,
347-
html.article-style.#{$pagesize} body .formalobject.portrait,
348-
html.article-style.#{$pagesize} body .informalobject.portrait,
349-
html.article-style.#{$pagesize} body .list-of-titles.portrait {
350-
page: #{$pagesize}-article-flow-portrait;
351-
}
352-
353-
html.article-style.#{$pagesize} body.landscape {
354-
string-set: DocumentTitle "";
355-
page: #{$pagesize}-article-flow-landscape;
356-
}
357-
html.article-style.#{$pagesize} body .db-bfs.landscape,
358-
html.article-style.#{$pagesize} body .division.landscape,
359-
html.article-style.#{$pagesize} body .component.landscape,
360-
html.article-style.#{$pagesize} body .section.landscape,
361-
html.article-style.#{$pagesize} body .formalobject.landscape,
362-
html.article-style.#{$pagesize} body .informalobject.landscape,
363-
html.article-style.#{$pagesize} body .list-of-titles.landscape {
364-
page: #{$pagesize}-article-flow-landscape;
365-
}
366-
367-
html.article-style.#{$pagesize} body.draft.portrait {
368-
string-set: DocumentTitle "";
369-
page: #{$pagesize}-article-flow-portrait-draft;
370336
}
371-
html.article-style.#{$pagesize} body.draft.portrait,
372-
html.article-style.#{$pagesize} body.draft.portrait .db-bfs,
373-
html.article-style.#{$pagesize} body.draft.portrait .division,
374-
html.article-style.#{$pagesize} body.draft.portrait .component,
375-
html.article-style.#{$pagesize} body.draft.portrait .section,
376-
html.article-style.#{$pagesize} body.draft.portrait .formalobject,
377-
html.article-style.#{$pagesize} body.draft.portrait .informalobject,
378-
html.article-style.#{$pagesize} body.draft.portrait .list-of-titles,
379-
html.article-style.#{$pagesize} body .db-bfs.draft.portrait,
380-
html.article-style.#{$pagesize} body .division.draft.portrait,
381-
html.article-style.#{$pagesize} body .component.draft.portrait,
382-
html.article-style.#{$pagesize} body .section.draft.portrait,
383-
html.article-style.#{$pagesize} body .formalobject.draft.portrait,
384-
html.article-style.#{$pagesize} body .informalobject.draft.portrait,
385-
html.article-style.#{$pagesize} body .list-of-titles.draft.portrait {
386-
page: #{$pagesize}-article-flow-portrait-draft;
387-
}
388-
389-
html.article-style.#{$pagesize} body.draft.landscape {
390-
string-set: DocumentTitle "";
391-
page: #{$pagesize}-article-flow-landscape-draft;
392-
}
393-
html.article-style.#{$pagesize} body .db-bfs.draft.landscape,
394-
html.article-style.#{$pagesize} body .division.draft.landscape,
395-
html.article-style.#{$pagesize} body .component.draft.landscape,
396-
html.article-style.#{$pagesize} body .section.draft.landscape,
397-
html.article-style.#{$pagesize} body .formalobject.draft.landscape,
398-
html.article-style.#{$pagesize} body .informalobject.draft.landscape,
399-
html.article-style.#{$pagesize} body .list-of-titles.draft.landscape {
400-
page: #{$pagesize}-article-flow-landscape-draft;
401-
}
402-
}
403337

404-
@each $pagesize in [A4, A5, Letter] {
405338
html.book-style.#{$pagesize} body {
406-
page: #{$pagesize}-book-title-flow-portrait;
407339
}
340+
408341
html.book-style.#{$pagesize} body .list-of-titles {
409342
counter-reset: page;
410343
}
@@ -413,72 +346,6 @@ html.book-style.Letter {
413346
html.book-style.#{$pagesize} body .component,
414347
html.book-style.#{$pagesize} body .list-of-titles {
415348
break-before: right;
416-
page: #{$pagesize}-book-flow-portrait;
417-
}
418-
419-
html.book-style.#{$pagesize} body .division.portrait,
420-
html.book-style.#{$pagesize} body .component.portrait,
421-
html.book-style.#{$pagesize} body .list-of-titles.portrait {
422-
break-before: right;
423-
page: #{$pagesize}-book-flow-portrait;
424-
}
425-
426-
html.book-style.#{$pagesize} body .section.portrait,
427-
html.book-style.#{$pagesize} body .formalobject.portrait,
428-
html.book-style.#{$pagesize} body .informalobject.portrait {
429-
page: #{$pagesize}-book-flow-portrait;
430-
}
431-
432-
html.book-style.#{$pagesize} body.landscape {
433-
page: #{$pagesize}-book-title-flow-landscape;
434-
}
435-
html.book-style.#{$pagesize} body .division.landscape,
436-
html.book-style.#{$pagesize} body .component.landscape,
437-
html.book-style.#{$pagesize} body .list-of-titles.landscape {
438-
break-before: right;
439-
page: #{$pagesize}-book-flow-landscape;
440-
}
441-
html.book-style.#{$pagesize} body .section.landscape,
442-
html.book-style.#{$pagesize} body .formalobject.landscape,
443-
html.book-style.#{$pagesize} body .informalobject.landscape {
444-
page: #{$pagesize}-book-flow-landscape;
445-
}
446-
447-
html.book-style.#{$pagesize} body.draft.portrait {
448-
page: #{$pagesize}-book-title-flow-portrait-draft;
449-
}
450-
html.book-style.#{$pagesize} body.draft,
451-
html.book-style.#{$pagesize} body.draft.portrait,
452-
html.book-style.#{$pagesize} body.draft.portrait .division,
453-
html.book-style.#{$pagesize} body.draft.portrait .component,
454-
html.book-style.#{$pagesize} body.draft.portrait .list-of-titles,
455-
html.book-style.#{$pagesize} body.portrait .division.draft,
456-
html.book-style.#{$pagesize} body.portrait .component.draft,
457-
html.book-style.#{$pagesize} body.portrait .list-of-titles.draft,
458-
html.book-style.#{$pagesize} body .division.draft.portrait,
459-
html.book-style.#{$pagesize} body .component.draft.portrait,
460-
html.book-style.#{$pagesize} body .list-of-titles.draft.portrait {
461-
break-before: right;
462-
page: #{$pagesize}-book-flow-portrait-draft;
463-
}
464-
html.book-style.#{$pagesize} body .section.draft.portrait,
465-
html.book-style.#{$pagesize} body .formalobject.draft.portrait,
466-
html.book-style.#{$pagesize} body .informalobject.draft.portrait {
467-
page: #{$pagesize}-book-flow-portrait-draft;
468-
}
469-
html.book-style.#{$pagesize} body.draft.landscape {
470-
page: #{$pagesize}-book-title-landscape-draft;
471-
}
472-
html.book-style.#{$pagesize} body .division.draft.landscape,
473-
html.book-style.#{$pagesize} body .component.draft.landscape,
474-
html.book-style.#{$pagesize} body .list-of-titles.draft.landscape {
475-
break-before: right;
476-
page: #{$pagesize}-book-landscape-draft;
477-
}
478-
html.book-style.#{$pagesize} body .section.draft.landscape,
479-
html.book-style.#{$pagesize} body .formalobject.draft.landscape,
480-
html.book-style.#{$pagesize} body .informalobject.draft.landscape {
481-
page: #{$pagesize}-book-landscape-draft;
482349
}
483350
}
484351

0 commit comments

Comments
 (0)