-
Notifications
You must be signed in to change notification settings - Fork 5
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
List of formatting requirements #65
Comments
@bertfrees Wanted to ask in the meeting but wasn't sure: are the blank table cells on the CSS side, like on "indentation of right-aligned text segment", places where css can't account for that example or is it blank for another reason? |
Those cells are blank because I didn't immediately have a possible solution in mind for the requirement. These need more attention. The list is really still a work in progress. I didn't want it to take too long before I could share it. By the way, you probably guessed, but the requirements that are covered by standard CSS start with a checkbox (Unicode U+2611) character. |
Is unbreakable space possible to solve with some tag? We should include for sure a possibility of such an space within the documment - something like tag " ". |
@skntkacm What do you mean with tag? |
Well tag... I am sorry if not being precise technically. I just ment we should include it, that this possibility is for sure included in the code of e-braille. In BRF, if I am not mistaken, this unbreakable space is not possible. I though noticed an issue #51 which addresses it. |
I believe no tag is needed for this: the no break space is a character and so we should allow the HTML character entity name |
The affect of no-break spaces on line breaking is covered by the item "line breaking of text should take into account line breaking properties of Unicode characters" under "4. Text". I'll add another item about processing (notably collapsing) of white space. |
I have added the following item to the table:
|
Wouldn't |
Thanks for pointing that out. I don't know why I said that that |
This is a list of possible formatting requirements for the e-braille file format. It includes formatting that should be controllable by the author (with CSS), formatting that should be controllable by the reading system (RS), and formatting that should be controllable by the end user (with CSS or some other way). These categories may overlap of course. The list may also include some things that will be out of scope in the end. The purpose of the list is to provide a good representation of the kind of formatting that exists in various braille standards around the world.
In addition the list gives an overview of what can currently be achieved with standard CSS and what could possibly be done with extensions. CSS might not be a good fit for all the formatting requirements. For such cases the reading system will still be able to apply the correct formatting, provided the content is marked up correctly and the reading system knows the braille rules that apply for the locale in question.
Note that this is a work in progress! I will be updating the list along the way based on your comments.
1. Media
apply style conditionally based on the target medium
☑ CSS media queries
2. Units
express length in terms of rows/columns
Because of the fixed-grid layout that is typical for braille, the most obvious length unit is the dimension of one "cell": cell height for vertical measuring, cell width for horizontal measuring.
☑
em
,rem
andch
are units that are relative to the font size. They are the perfect fit for measuring heights (`em` and `rem`) and widths (`ch`) in our use case, as long as there can only be one font and font size for the whole document, the font is monospaced, andline-height: 1em; letter-spacing: 0
yields the expected spacing between dots.Braille CSS uses unitless length values.
optionally also support other units
in
,px
, ...3. Box model
blank lines above/below a block of text
Also includes suppression of blank lines by end user.
margin-top
,margin-bottom
,padding-top
,padding-bottom
"collapsing" of margins
Adjoining margins are combined into a single margin.
margin-top
,margin-bottom
left/right margins
margin-left
,margin-right
,padding-left
,padding-right
vertical alignment of block of text at/around a vertical position on the page
Common thing to do on a title page for instance.
positioning of marker (bullet/number) relative to list item
list-style-position
spatial layout of blocks of text
Similar to spatial layout of a table (see below), but more flexible and without the semantics of a table.
column layout
3.1 Borders
borders
border
underlining of headings
border-bottom
) and a width that is automatically adapted to the contents (width: fit-content
).specify style of border as braille character
The
border-style
orborder
property could be extended to support a braille pattern as value, like is done in braille CSS.☑ An alternative approach is to use a specific
border-image
to control the border patterns exactly, as illustrated here. A tool could be provided to generate the images, e.g.border-image-source: url('https://daisy.github.io/ebraille/border-image?pattern=⢐⠐⢐⢐⢐⠐⠐⠐&width=240&height=480')
.top/bottom box lines in UK
These appear to have a special pattern. (See @jrbowden's example.)
3.2. Tables
spatial layout of table
display: table
layout a table as a list
abbreviate table headings
4. Text
text indentation (of first line vs. next lines)
text-indent
hanging text indentation
text-indent
(combined with amargin-left
orpadding-left
that is at least this value, or with the 'hanging
' of thetext-indent
property.specify line height
E.g. double line spaced braille.
line-height
specify inter-word spacing
word-spacing
specify letter spacing
letter-spacing
alignment of a block of text
alignment of a text segment at/around a horizontal position
This is useful for tabulation. The segment could e.g. be a page number in a table of contents. The space could optionally be filled by leader dots. The leader may start on one line and continue on the next if the alignment requires it.
leader()
function for this purpose.indentation of right-aligned text segment
In the case a block of text ends with a right aligned segment, e.g. a page number in a table of contents, it may be a requirement that the last line with the segment extends further to the right than the other lines.
it should be possible to collapse insignifcant white space characters and preserve significant white space characters
line breaking of text should take into account line breaking properties of unicode characters
specify hyphen character
hyphenate-character
preformatted text
white-space
control over formatting indicators
5. Automatic numbering
choose the bullet character for a list
list-style-type
numbered lists
counter-increment
,counter-reset
,counter-set
,counter()
,@counter-style
,::marker
,list-style-type
braille page numbering
counter-increment
) within a@page
rule. See page-based counters.prefix to indicate continuation of print page
In BANA, the continuation of print page "1" is marked "a1", then "b1", etc.
Should be accomplishable with
counter-increment
,counter-set
,@page
and@counter-style
andcounter()
, complemented with the non-standardstring-set
andstring()
:6. Page box model, page layout
placement of content in specific parts of page margin
content
property andcounter()
andstring()
functions.placement of footnotes in the lower area of the page
float: footnote
,::footnote-call
,::footnote-marker
,@footnote
differentiate between left and right hand pages
@page:left
,@page:right
differentiate between left and right hand pages to create interlining
Interlining means making lines of braille on front and back not overlap.
margin-top
property of@page
rule).ability to change the page layout within the document
page
property can be used to specify a particular type of page on which an element must be displayed. The page can be styled by using a@page
selector.7. Page breaking
force page breaks
page-break-before
,page-break-after
avoid page break within and element
page-break-inside
avoid orphan/widow lines
orphans
,widows
8. Indication of original pagination
print page number within text
Possibly the number may be preceded by leader dots to form a page break indicator line.
Possibly the number should be skipped when it would occur at the top of the page (e.g. because it would also appear in the top page margin, resulting in unneeded repetition)
:top-of-page
pseudo-class.print page at the beginning of current braille page rendered in top/bottom page margin
string-set
,string()
(both non-standard), and page margin boxesrange of print pages within current braille page or spread rendered in top/bottom page margin
string()
function could be extended to support addition keywords to control which value of the named string should be used. This is how braille CSS approaches this requirement.print page break marker within left page margin
Common in Norway.
Absolute positioning could be used, but might be too primitive.
The text was updated successfully, but these errors were encountered: