Skip to content

Instantly share code, notes, and snippets.

@rdeltour
Created March 4, 2013 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdeltour/5081421 to your computer and use it in GitHub Desktop.
Save rdeltour/5081421 to your computer and use it in GitHub Desktop.
EPUB 3 Index Sample
/* EPUB 3 Index Sample */
/* Typography */
body {
font-family: times, serif;
}
h2 {
font-weight: bold;
font-size: 1em;
}
h3 {
font-size: 1em;
font-weight: bold;
}
ul>li {
font-family: times, serif;
font-size: 11pt;
}
/* Layout and Punctuation */
section[epub\:type~='index:group'] ul>li {
list-style: none;
}
a[epub\:type~='table']:after {
content:'t';
font-style: italic;
}
a[epub\:type~='figure']:after {
content:'f';
font-style: italic;
}
a[epub\:type~='index:locator']:before, [epub\:type~='index:locator-list'] a:before {
content: ',';
margin-right: 0.4em;
display: inline-block;
color: black;
}
[epub\:type~='index:editor-note']+a:before {
content:''
}
[epub\:type~='index:editor-note']:before {
content: '. Ed. Note: ';
}
[epub\:type~='index:editor-note']:after {
content: '.';
}
[epub\:type~='index:xref-related']:before {
content: '. See also ';
font-style: italic;
}
[epub\:type~='index:xref-preferred']:before { content: '. See ';
font-style: italic;
}
[epub\:type~='index:xref-related']:after {
content: '.';
}
[epub\:type~='index:xref-related']>a[epub\:type~='index:term'] {
/*display: inline-block;*/
}
[epub\:type~='index:xref-related']>a[epub\:type~='index:term']:not(:last-child):after {
content: ';';
margin-right: 0.4em;
display:inline-block;
color: black;
}
<section epub:type="index:head">
<section epub:type="index:head">
<h1>Sample index</h1>
<p>This index is provided as a sample to accompany the EPUB Indexes 1.0 (draft). It includes examples of entries, subentries, cross-references,
term categories, and other relevant index components.</p>
<aside epub:type="index:legend">
<h3>Legend</h3>
<dl>
<dt>See</dt><dd>indicates preferred term or term category cross-reference</dd>
<dt>See also</dt><dd>indicates related term or term category cross-reference</dd>
<dt><i>f</i></dt><dd>following a locator, indicates a figure</dd>
<dt><i>t</i></dt><dd>following a locator, indicates a table</dd>
</dl>
</aside>
</section>
<hr/>
<section epub:type="index:body">
<section epub:type="index:group">
<h2>A</h2>
<!-- epub:type index:entry-list is implied on this and all descendant ul's due to parent/ancestor with epub:type index:group -->
<ul>
<!-- epub:type index:entry is implied on this li, and all sibling and descendant li's, due to parent with (implied) epub:type index:entry-list -->
<!-- main entry with subentries (child entries) -->
<li><span epub:type="index:term">abbreviations</span>
<ul>
<li><span epub:type="index:term">acceptable list</span><a epub:type="index:locator table" href="...">52</a></li>
<li><span epub:type="index:term">in subheadings</span><a epub:type="index:locator" href="...">18-19</a><a epub:type="index:locator" href="...">45</a></li>
</ul>
</li>
<!-- main entry with single locator -->
<li><span epub:type="index:term">accents</span><a epub:type="index:locator" href="...">20</a></li>
<!-- main entry with subentries and related term xref -->
<li id="adve"><span epub:type="index:term">advertising</span><span epub:type="index:xref-related"><a epub:type="index:term" href="#mark">marketing</a></span>
<ul>
<li><span epub:type="index:term">Adwords</span><a epub:type="index:locator" href="...">91</a></li>
<li><span epub:type="index:term">ASI Indexer Locator</span><a epub:type="index:locator" href="...">ix</a><a epub:type="index:locator" href="...">32</a><a epub:type="index:locator" href="...">58</a><a epub:type="index:locator" href="...">73-77</a><a epub:type="index:locator" href="...">84</a></li>
<li><span epub:type="index:term">branding</span><a epub:type="index:locator" href="...">12</a><a epub:type="index:locator" href="...">86</a></li>
<li><span epub:type="index:term">classified ads</span><a epub:type="index:locator figure" href="...">59</a></li>
<li><span epub:type="index:term">effectiveness of</span><a epub:type="index:locator" href="...">36</a></li>
<li><span epub:type="index:term">website as</span><a epub:type="index:locator" href="...">56</a></li>
</ul>
</li>
<!-- main entry with multiple locators -->
<li id="asi">
<span epub:type="index:term">American Society for Indexing (ASI)</span>
<span epub:type="index:locator-list">
<!-- epub:type index:locator implied on a's due to parent with epub:type locator-list -->
<a href="...">vi</a><a href="...">4</a><a href="...">10</a>
<!-- range tagged with single <a>, pointing to start of range, using ID -->
<a href="chap1.xhtml#p69">69-71</a>
</span>
</li>
<!-- main entry with preferred term xref -->
<li>
<span epub:type="index:term">ANZSI</span>
<span epub:type="index:xref-preferred"><a epub:type="index:term" href="#anzsi">Australian and New Zealand Society of Indexers (ANZSI)</a></span>
</li>
<!-- main entry with preferred term xref -->
<li>
<span epub:type="index:term">ASI</span>
<span epub:type="index:xref-preferred"><a epub:type="index:term" href="#asi">American Society for Indexing (ASI)</a></span>
</li>
<!-- main entry with multiple locators -->
<li id="anzsi">
<span epub:type="index:term">Australian and New Zealand Society of Indexers (ANZSI)</span>
<span epub:type="index:locator-list">
<!-- epub:type index:locator implied on a's due to parent with epub:type locator-list -->
<a href="...">94</a>
<a href="...">98-99</a>
</span>
</li>
</ul>
</section>
<section epub:type="index:group">
<h2>B</h2>
<!-- epub:type index:entry-list is implied on this and all descendant ul's due to parent/ancestor with epub:type index:group -->
<ul>
<!-- epub:type index:entry is implied on this li, and all sibling and descendant li's, due to parent with (implied) epub:type index:entry-list -->
<li><span epub:type="index:term">Barbeyrac, Jean</span><a epub:type="index:locator" href="...">25</a></li>
<!-- range tagged with two separate <a>s, one pointing to start of range and one to end of range, using locator-range -->
<li id="blog">
<span epub:type="index:term">blogs</span>
<span epub:type="index:locator-range">
<!-- epub:type locator implied on a's due to parent locator-range -->
<a href="chap02#p92">92</a>-<a href="chap02#p98">98</a>
</span>
</li>
</ul>
</section>
<section epub:type="index:group">
<h2>C</h2>
<!-- epub:type index:entry-list is implied on this and all descendant ul's due to parent/ancestor with epub:type index:group -->
<ul>
<!-- epub:type index:entry is implied on this li, and all sibling and descendant li's, due to parent with (implied) epub:type index:entry-list -->
<li>
<span epub:type="index:term">cold calling</span>
<span epub:type="index:xref-related"><a epub:type="index:term" href="#adve">advertising</a><a epub:type="index:term" href="#mark">marketing</a></span>
<ul>
<li><span epub:type="index:term">drawbacks of</span><a epub:type="index:locator" href="...">55-56</a></li>
<li><span epub:type="index:term">negative perception of</span><a epub:type="index:locator" href="...">76</a><a epub:type="index:locator" href="...">88</a></li>
<li><span epub:type="index:term">strategies for</span><a epub:type="index:locator" href="...">68</a></li>
</ul>
</li>
</ul>
</section>
<section epub:type="index:group">
<h2>D</h2>
<!-- epub:type index:entry-list is implied on this and all descendant ul's due to parent/ancestor with epub:type index:group -->
<ul>
<!-- epub:type index:entry is implied on this li, and all sibling and descendant li's, due to parent with (implied) epub:type index:entry-list -->
<li id="digg"><span epub:type="index:term">Digg</span><a epub:type="index:locator" href="...">143</a></li>
</ul>
</section>
<section epub:type="index:group">
<h2>F</h2>
<!-- epub:type index:entry-list is implied on this and all descendant ul's due to parent/ancestor with epub:type index:group -->
<ul>
<!-- epub:type index:entry is implied on this li, and all sibling and descendant li's, due to parent with (implied) epub:type index:entry-list -->
<li id="face"><span epub:type="index:term">Facebook</span><a epub:type="index:locator" href="...">viii</a><a epub:type="index:locator" href="...">92-93</a><a epub:type="index:locator" href="...">95</a><a epub:type="index:locator" href="...">96</a><a epub:type="index:locator" href="...">97</a><a epub:type="index:locator" href="...">99-100</a></li>
<li id="foot"><span epub:type="index:term">footnotes</span><a epub:type="index:locator table" href="...">39</a><a epub:type="index:locator" href="...">58-59</a></li>
<!-- range tagged with single <a>, using CFI to indicate the range -->
<li id="four"><span epub:type="index:term">FourSquare</span><a epub:type="index:locator" href="epubcfi(/6/8[chap05ref]!/4[body01], /156[p142]/1:0, /157[p143]/1:0)">142-143</a><a epub:type="index:locator" href="...">150</a></li>
</ul>
</section>
<section epub:type="index:group">
<h2>I</h2>
<!-- epub:type index:entry-list is implied on this and all descendant ul's due to parent/ancestor with epub:type index:group -->
<ul>
<!-- epub:type index:entry is implied on this li, and all sibling and descendant li's, due to parent with (implied) epub:type index:entry-list -->
<li id="isc"><span epub:type="index:term">Indexing Society of Canada (ISC)</span><a epub:type="index:locator" href="...">102-105</a></li>
<li><span epub:type="index:term">inversion</span><a epub:type="index:locator" href="...">53</a><a epub:type="index:locator" href="...">89-92</a></li>
</ul>
</section>
<section epub:type="index:group">
<h2>L</h2>
<!-- epub:type index:entry-list is implied on this and all descendant ul's due to parent/ancestor with epub:type index:group -->
<ul>
<!-- epub:type index:entry is implied on this li, and all sibling and descendant li's, due to parent with (implied) epub:type index:entry-list -->
<!-- main entry with editor's note -->
<li><span epub:type="index:term">letters</span>
<span epub:type="index:editor-note">This refers to the typographic term, not the form of correspondence</span>
<a epub:type="index:locator" href="...">10-11</a><a epub:type="index:locator" href="...">18</a><a epub:type="index:locator" href="...">33</a><a epub:type="index:locator" href="...">50-52</a>
</li>
<li id="live"><span epub:type="index:term">Livejournal</span><a epub:type="index:locator" href="...">51-52</a><a epub:type="index:locator" href="...">87</a></li>
</ul>
</section>
<section epub:type="index:group">
<h2>M</h2>
<!-- epub:type index:entry-list is implied on this and all descendant ul's due to parent/ancestor with epub:type index:group -->
<ul>
<!-- epub:type index:entry is implied on this li, and all sibling and descendant li's, due to parent with (implied) epub:type index:entry-list -->
<li id="mark"><span epub:type="index:term">marketing</span>
<!-- multiple related term xrefs -->
<span epub:type="index:xref-related"><a epub:type="index:term" href="#adve">advertising</a><a epub:type="index:term" href="#cold">cold calling</a></span>
<ul>
<li><span epub:type="index:term">checklist for</span><a epub:type="index:locator table" href="...">33</a></li>
<li><span epub:type="index:term">to clients</span><a epub:type="index:locator" href="...">45-54</a></li>
<li><span epub:type="index:term">definition of</span><a epub:type="index:locator" href="...">21</a></li>
<li><span epub:type="index:term">as beginner</span><a epub:type="index:locator" href="...">20-22</a></li>
</ul>
</li>
<li id="mysp"><span epub:type="index:term">MySpace</span><a epub:type="index:locator" href="...">114</a></li>
</ul>
</section>
<section epub:type="index:group">
<h2>O</h2>
<!-- epub:type index:entry-list is implied on this and all descendant ul's due to parent/ancestor with epub:type index:group -->
<!-- main entry with subentries and related term category xref -->
<ul>
<!-- epub:type index:entry is implied on this li, and all sibling and descendant li's, due to parent with (implied) epub:type index:entry-list -->
<li>
<span epub:type="index:term">organizations, professional</span>
<span epub:type="index:xref-related"><a epub:type="index:term-category" href="nav.xhtml#orgs">names of specific organizations</a></span>
<ul>
<li><span epub:type="index:term">benefits of joining</span><a epub:type="index:locator" href="...">55-56</a></li>
<li><span epub:type="index:term">conferences</span><a epub:type="index:locator" href="...">76</a><a epub:type="index:locator" href="...">88</a></li>
<li><span epub:type="index:term">tax deduction of fees</span><a epub:type="index:locator" href="...">68</a></li>
</ul>
</li>
</ul>
</section>
<section epub:type="index:group">
<h2>S</h2>
<!-- epub:type index:entry-list is implied on this and all descendant ul's due to parent/ancestor with epub:type index:group -->
<ul>
<!-- epub:type index:entry is implied on this li, and all sibling and descendant li's, due to parent with (implied) epub:type index:entry-list -->
<li><span epub:type="index:term">social networking</span><span epub:type="index:xref-preferred"><a epub:type="index:term-category" href="nav.xhtml#socnet">names of specific social networks</a></span></li>
<li id="sci"><span epub:type="index:term">Société canadienne d'indexation (SCI)</span><a epub:type="index:locator" href="...">102-105</a></li>
<li id="stc"><span epub:type="index:term">Society for Technical Communication (STC)</span><a epub:type="index:locator" href="...">12</a><a epub:type="index:locator" href="...">16</a><a epub:type="index:locator" href="...">29</a><a epub:type="index:locator" href="...">52-53</a></li>
<li id="uksi"><span epub:type="index:term">Society of Indexers (SI)</span><a epub:type="index:locator" href="...">32</a><a epub:type="index:locator" href="...">33</a></li>
<!-- main entry with subentries and sub-subentries -->
<li><span epub:type="index:term">sorting</span>
<ul>
<li><span epub:type="index:term">alphabetical</span>
<ul>
<li><span epub:type="index:term">in biographies</span><a epub:type="index:locator" href="...">44-46</a></li>
<li><span epub:type="index:term">in encyclopedias</span><a epub:type="index:locator" href="...">51</a><a epub:type="index:locator" href="...">58-59</a></li>
<li><span epub:type="index:term">numbers and</span><a epub:type="index:locator" href="...">61-62</a><a epub:type="index:locator figure" href="...">79</a></li>
<li><span epub:type="index:term">symbols and</span><a epub:type="index:locator" href="...">113</a></li>
</ul>
</li>
<li><span epub:type="index:term">chronological</span><a epub:type="index:locator" href="...">23-24</a><a epub:type="index:locator" href="...">46</a><a epub:type="index:locator" href="...">62</a></li>
<li><span epub:type="index:term">forced</span><a epub:type="index:locator" href="...">44</a><a epub:type="index:locator" href="...">62</a></li>
<li><span epub:type="index:term">page order</span><a epub:type="index:locator" href="...">23</a><a epub:type="index:locator" href="...">62</a></li>
</ul>
</li>
</ul>
</section>
<section epub:type="index:group">
<h2>T</h2>
<!-- epub:type index:entry-list is implied on this and all descendant ul's due to parent/ancestor with epub:type index:group -->
<ul>
<!-- epub:type index:entry is implied on this li, and all sibling and descendant li's, due to parent with (implied) epub:type index:entry-list -->
<li id="twit"><span epub:type="index:term">Twitter</span><a epub:type="index:locator" href="...">37-42</a></li>
</ul>
</section>
</section>
</section>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment