This repository has been archived by the owner on Jun 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
06.05 HTML template for SC texts
sujato edited this page Nov 11, 2014
·
8 revisions
<!doctype html>
<html>
<head>
<title></title>
<meta charset="utf8>
<meta author="Name of Translator">
</head>
/*For SC, a very simple <head> is fine.
Just include this at the beginning of every file.
The "author" metadata is optional, but include it if you can.
<title> can be left blank; this and other metadata
will be filled in automatically by our system. */
<body>
<main id="text" lang="pi">
/*Note that the language here must give the two-letter
ISO code for the relevant language in translation. Main is a new HTML5 tag.*/
<section class="sutta" id="an3.2">
/* The ID is crucial, and must give the correct form of
the ID for this text as used on SuttaCentral.
In some cases this will need to be changed from the source.
The ID of the text will be the same as the file name.*/
<article>
<div class="hgroup">
<p class="division">Name of Nikaya, etc.</p> /*optional*/
<p class="subdivision">Name of Samyutta, etc.</p> /*optional*/
<h1>Title of Sutta</h1>
</div>
/*Collects the main sutta title information. This can be somewhat freely
structured, this is an example. Each source text will organize this somewhat
differently, so we need to be a bit flexible here. But the main thing is that
the main title goes in a <h1>, and other details are <p> above that.
Where possible, use <p class="division"> to mark the main division for
that text.*/
<p class="namo">Homage to the Buddha!</p>
/*optional. Sometimes Buddhist texts begin with a traditional phrase of
homage to the Buddha. If so, mark it up as here.*/
<p><a class="mw" id="mw1"></a><span class="evam">Thus have I heard.</span>
The Buddha was staying at Sāvatthī...</p>
/*Traditionally all Buddhist texts start with the phrase "Thus have I heard"
(evaṃ me sutaṃ) or similar. In practice, this is often omitted for the sake of
brevity. If it is included, mark it up as shown. Note also here the use of
paragraph numbering. This will vary from text to text. Usually in the source
documents these numbers will be in plain text, and they need to be redone
as <a> tags for SuttaCentral. The form that I use here is the preferred
form for SuttaCentral texts. They are given a class and ID, and these are
the same, with the number added to the ID. Our system will recognize this
form and do what needs to be done to them. Your job is to get them from
plain text into this form. The actual abbreviation used, in this case "mw",
marks the text that this translation is derived from. We keep a list of these
separately. When it is loaded on our site, we will add details about this
edition. So when you start the job you need to know what abbrevation is
used for this set of texts. */
<p><a class="mw" id="mw2"></a>He spoke some words in <i>Pali</i>, then he
<em>emphasized</em> some words.</p>
/*Note: Use <i> tags for Pali/Sanskrit words, <em> for emphasis.*/
<h2>Subheading</h2>
<blockquote class="gatha">
<p><a class="mw" id="mw3"></a>Here is a verse<br>
It is a little terse<br>
But it could be worse<br>
If it were averse.
</p>
<p><a class="mw" id="mw3"></a>But I think its fine<br>
Just 'cos its mine<br>
I take such a shine<br>
Now get in line!
</p>
</blockquote>
/*Verse. In Buddhist texts we frequently find verses, either as complete
works of poetry or mixed up with prose texts. These are called gatha in
Pali or Sanskrit. These should be marked up appropriately whenever
possible. Hopefully there is some way of determining what is verse
from the original markup, but this will vary from case to case. In some
cases, translators have chosen to render verse as prose, in which case
no special markup is needed. However we prefer to markup the verse
as verse. Typically verses consist of four lines, although this can vary.
Each verse is marked up as one paragraph, with line endings marked
by <br>. Note that this is the only legitimate use of <br> tags on
SuttaCentral! A set of verses is then wrapped in <blockquote class="gatha">*/
<h2>Another subheading</h2>
<h3>And a subsubheading</h3>
<p><a class="mw" id="mw4"></a>And the headings go on to <h4>: that
should be enough!</p>
/*It is crucial to ensure that the headings are properly nested. Hopefully
this will be clear in the source files, but it is not always the case. The
majority of texts are fairly short and do not use subheadings, but in the
case of long texts this needs to be carefully checked.*/
<h2>Lists</h2>
<p><a class="mw" id="mw5"></a>There are, monks, four advantages in
using semantic markup. What four?</p>
<ol>
<li>It is simple to write;</li>
<li>It is clear to read;</li>
<li>It is easy to adapt to different presentation contexts;</li>
<li>It is just the right thing to do.</li>
</ol>
<p>These, monks, are the four advantages to semantic markup.</p>
/*In some cases, texts will be marked up as lists, in which case we can
use ordinary HTML lists for them.*/
<p class="end">Here ends the section on SuttaCentral’s HTML style.</p>
/*In ancient manuscripts, the texts give their titles at the end, not the
beginning. These are sometimes preserved in translations. If so, they
are given appropriate classes, to distinguish them from the main text.
<p class="uddana">
Headings, homage, paragraphs<br>
Subheadings, verses,<br>
And a list praising semantics.<br>
Finally there is the finish.<br>
This much is included in the description of markup.</p>
/*The "uddana" or colophon is a special section sometimes found in
Buddhist texts. It performs the same role as a Table of Contents in
modern texts. Usually the uddana appears at the end of a section,
and consists of a verse or verses that give keywords for the preceeding
set of texts. If uddanas are present, they need to be identified as such
and distinguished from plain prose and from verses.*/
</article>
<aside id="metaarea">
<p>Here is the metadata for the text. It contains such things as the
previous publisher, <cite class="book">Title of Book</cite>, or
<cite class="essay">Title of Article</cite>, <span class="author">
Name of author or translator</span>, date of publication,
and so on. Note how the tags are used here.</p>
<p>It must also include the relevant licence for the translation,
usually including a link to the licence statement.</p>
<p>It should also give some information about the current text,
such as who worked on preparing for SuttaCentral, any changes
made, and so on.</p>
<p>Place the matadata in its
special <aside> at the end of the sutta, after </article>.
Aside is a new HTML5 tag.</p>
</p>
</aside>
</section>
</main></body></html>