braillespecs / braille-css

Braille CSS specification
http://braillespecs.github.io/braille-css
2 stars 1 forks source link

Endnotes #5

Open bertfrees opened 9 years ago

bertfrees commented 9 years ago

Add a section describing how notes can be positioned at the end of volumes or the end of the document.

Depends on: https://github.com/snaekobbi/braille-css-spec/issues/8

bertfrees commented 9 years ago

Volume notes would work very similar to footnotes (https://github.com/snaekobbi/braille-css-spec/issues/3):

note {
  flow: normal volume-note;
  counter-increment: volume-note;
  display: inline;
  content: counter(volume-note);
}
note:flow(volume-note) {
  display: list-item;
  content: content();
}
note:flow(volume-note)::marker {
  content: counter(volume-note);
}
@volume {
  counter-reset: volume-note;
  @end {
    content: flow(volume-note);
  }
}

If an endnote section (at the end of the book) is already present at the right place in the XML:

noteref {
  display: inline;
  content: target-counter(endnote, attr(idref url));
}
note {
  display: list-item;
  counter-increment: endnote;
}
note::marker {
  content: counter(endnote);
}

Otherwise:

note {
  flow: normal endnote;
  counter-increment: endnote;
  display: inline;
  content: counter(endnote);
}
note:flow(endnote) {
  display: list-item;
  content: content();
}
note:flow(endnote)::marker {
  content: counter(endnote);
}
@volume:last {
  @end {
    content: flow(endnote);
  }
}