/** * Braille style sheet for United States and Canada (BANA) * * For more information see https://daisy.github.io/braille-stylesheets/bana */ $allow-text-overflow-trimming: true; @namespace epub url(http://www.idpf.org/2007/ops); @-daisy-text-transform { system: ueb; } @page { size: 40 25; margin-bottom: 0; @top-center { content: string(running-header); // the running-header text must be set by the custom style sheet } @top-right { content: "   " string(print-page); } @bottom-right { content: "   " counter(page); } } @page transcriber-generated { counter-increment: transcriber-generated-page; @top-center { content: none; } @top-right { content: none; } @bottom-right { content: "   t" counter(transcriber-generated-page); } } @page toc { // do not allow TOC entries on same line as page number (footer) margin-bottom: 1; // the rest is the same as transcriber-generated counter-increment: transcriber-generated-page; @top-center { content: none; } @top-right { content: none; } @bottom-right { content: "   t" counter(transcriber-generated-page); } } @page preliminary { counter-increment: preliminary-page; @top-center { content: none; } @top-right { content: none; } @bottom-right { content: "   p" counter(preliminary-page); } } @-daisy-volume { @begin { content: -daisy-flow(transcriber-generated, document) -daisy-flow(volume-toc, document); counter-set: transcriber-generated-page 1 preliminary-page 1; } } @-daisy-volume:first { @begin { content: -daisy-flow(transcriber-generated, document) // the transcriber generated and other preliminary -daisy-flow(document-toc, document) // content must be set by the custom style sheet, -daisy-flow(preliminary, document); // and must be given the corresponding page style } } %h1 { page-break-before: always; text-align: center; margin-left: 3; margin-right: 3; margin-bottom: 1; } %h2 { margin-left: 4; } %h3 { margin-left: 6; } %h1, %h2, %h3 { margin-top: 1; page-break-after: avoid; } $h-mapping: ( h1: h1, h2: h2, h3: [h3, h4, h5, h6] ) !default; @for $rank from 1 through 3 { @if map-kas-key($h-mapping, h#{$rank}) { $selector: map-get($h-mapping, h#{$rank}); #{$selector} { @extend %h#{$rank}; } } } p { text-indent: 2; } li { text-indent: -2; margin-left: 2; } ul, ol, list { margin-top: 1; margin-bottom: 1; orphans: 2; %h1 + &, %h2 + &, %h3 + & { margin-top: 0; > li:first-child { page-break-inside: avoid; } } } .page-front, .page-normal, .page-special, [epub|type='pagebreak'], pagenum { display: block; &:-daisy-top-of-page { display: none; } &::before { content: leader("⠤"); // FIXME: remove space before number } margin-left: -40; // this is to make sure the line always starts all the way on the left string-set: print-page content(); &[title] { string-set: print-page attr(title); } &[aria-label] { &:empty::before { content: leader("⠤") attr(aria-label); } string-set: print-page attr(aria-label); } } $toc-depth: 2 !default; @import "http://www.daisy.org/pipeline/modules/braille/html-to-pef/_generate-toc.scss"; #generated-document-toc, #generated-volume-toc { page: toc; &::-obfl-on-toc-start { content: "Contents"; display: block; text-align: center; margin: 0 3 1 3; } &::-obfl-on-volume-start { content: "Volume " counter(-obfl-started-volume-number); display: block; text-align: center; margin: 1 3; } li { -obfl-right-text-indent: 6; a[href]::after { content: " " leader("⠐") " " target-counter(attr(href), page); } br::before { content: " " } } ul, ol, list { margin: 0; } }