View Full Version : citations in epub spec?


romnempire
06-10-2010, 05:00 PM
suppose you're writing a book and want make in-text citations, using a format similar to the numbered superscripts in many written books.
how do you go about citing materials in epub?

charleski
06-10-2010, 06:35 PM
This is the same thing as footnotes.

At present, the best way of doing this is with bi-directional links.

As an example:
Main text:

<p>‘No, I won’t cast a stone,’<sup><a id="part01ch22ren33"/><a href="notes.html#part01ch22en33">33</a></sup> she replied to something, [...]</p>

Notes.html:

<p class="noindent"><a id="part01ch22en33"/><strong><a href="part01chapter22.html#part01ch22ren33">33</a> cast a stone:</strong> ‘He that is without sin among you, let him first cast a stone at her’ (John 8:7).</p>


If your citations are set as footnotes in a Word doc, then Atlantis will automatically encode the necessary links when it makes the conversion to epub, one of the reasons I recommend it for those who don't want to sit up to 3am hand-coding epubs.

frabjous
06-10-2010, 08:35 PM
Seems a bit overly complicated. Why not just use just one tag?

part01chapter22.html:

<p>‘No, I won’t cast a stone,’<a href="notes.html#part01ch22en33" id="part01ch22ren33" style="vertical-align: super;">33</a> she replied to something, [...]</p>

Notes.html:

<p class="noindent"><a href="part01chapter22.html#part01ch22ren33" id="part01ch22en33" style="font-weight: bold;"/>33</a> cast a stone: ‘He that is without sin among you, let him first cast a stone at her’ (John 8:7).</p>


(Or better, define a CSS class rather than using an in-line style element...)

charleski
06-10-2010, 08:59 PM
Seems a bit overly complicated. Why not just use just one tag?

part01chapter22.html:

<p>‘No, I won’t cast a stone,’<a href="notes.html#part01ch22en33" id="part01ch22ren33" style="vertical-align: super;">33</a> she replied to something, [...]</p>

Notes.html:

<p class="noindent"><a href="part01chapter22.html#part01ch22ren33" id="part01ch22en33" style="font-weight: bold;"/>33</a> cast a stone: ‘He that is without sin among you, let him first cast a stone at her’ (John 8:7).</p>


(Or better, define a CSS class rather than using an in-line style element...)
Well, yes that's more economical (though vertical-align:super fails for superscripts, as I discussed in another thread). But this is one area where I'm happy for automatic converters to introduce a bit more code than needed.

frabjous
06-10-2010, 09:26 PM
vertical-align:super fails for superscripts, as I discussed in another thread

Which thread was that? I've had problems with vertical-align: super with Internet Explorer (--what does work with IE? anything?--) but I wouldn't think that would be a big issue for ePubs.

Jellby
06-11-2010, 04:29 AM
You may want to add "font-size: 60%;" (or similar) to the style.

charleski
06-11-2010, 04:35 AM
Which thread was that? I've had problems with vertical-align: super with Internet Explorer (--what does work with IE? anything?--) but I wouldn't think that would be a big issue for ePubs.

Here (http://www.mobileread.com/forums/showpost.php?p=814110&postcount=70) it is. 'super' causes irregular line-heights, though this can be masked by making the line-height very small. This is true in both ADE and calibre's reader, but not in FBReader, which enforces its own line-height value and doesn't allow changes in the css.

Freeshadow
06-12-2010, 07:14 PM
this is why I like fonts having real super and subs inside... (among other typographic goodies)

weatherwax
06-13-2010, 04:43 AM
You may want to try: vertical-align: text-top