電子書 XML TEI 標記

出自DILA Wiki

Global Attributes

xml:lang

採用二碼編碼, 參考:ISO 639

  • zh 中文
  • en 英文
  • sa 梵文
  • pi 巴利文
  • bo 藏文


author

兩個作者

ex: 4-12.xml《無名問無明—聖嚴法師與李連杰的對話》

<titleStmt>
  <title>無名問無明—聖嚴法師與李連杰的對話</title>
  <author>聖嚴法師</author>
  <author>李連杰</author>
</titleStmt>

role 屬性

<titleStmt>
  <title>今生與師父有約(一)</title>
  <author role="講者">果元法師</author>
  <author role="講者">果廣法師</author>
  <author role="講者">果舫法師</author>
  <author role="講者">常寬法師</author>
  <author role="講者">常願法師</author>
  <respStmt><resp>文字整理:</resp><persName>胡麗桂</persName></respStmt>
  <respStmt><resp>封面繪圖:</resp><persName>繼程法師</persName></respStmt>
</titleStmt>

cell

垂直置中

<cell rend="vertical-align:middle">

不折行

<cell rend="white-space:nowrap">

cit

從其他文件中引用的內容,並包含引用來源的書目參照資料。

例: 《佛陀的勇士們》

<cit rend="display:block">
  <quote>
    <lg xml:lang="pi">
      <l>Yathā agāraṃ suchannaṃ</l>
      <l>vuṭṭhi samativijjhati,</l>
      <l>evaṃ subhāvitaṃ cittaṃ</l>
      <l>rāgo na samativijjhati.</l>
    </lg>
    <lg>
      <l>猶如雨水無法穿透屋蓋不密的房子,</l>
      <l>同樣地貪愛也無法進入已善修止觀的心。</l>
    </lg>
  </quote>
  <bibl rend="display:block;text-align:right">∼《法句經》.第14偈。[35]</bibl>
</cit>

因為引文可能出現在行中,也可能自成段落,所以用 display:block 來表示自成段落的引文。bibl 的情況也是一樣。

div

版權頁

<div type="copyright">...</div>

EPUB div 前換頁

  <div style="page-break-before:always>....</div>

edition

版本。例 《今生與師父有約(六)》7-6.xml

<edition n="1">初版一刷:<date when-iso="2014-06">2014年6月</date></edition>

editor

譯者。例 9-20.xml:

<titleStmt>
  ...
  <editor role="translator">Wee Keat Ng</editor>
  <editor role="translator">Yee Liam Loh</editor>
  <respStmt><resp>Proofreader</resp><persName>I Jung Fang</persName></respStmt>
</titleStmt>

figure

圖表前換頁

<figure rend="page-break-before:always;">
  <graphic url="52.png"></graphic>
  <p>Calligraphy: A kindred old soul</p>
</figure>

文繞圖:使用 overflow:hidden 控制 figure 之後的文字不再做文繞圖. 例 9-14 《Master Sheng Yen》

<figure rend="page-break-before:always;overflow:hidden">
  <graphic url="38.png" rend="float:left;margin-right:2px"></graphic>
  <p>Calligraphy: <quote>“Without encountering things, it knows; its knowing is inherently subtle. Not opposing conditions, it illumines; its luminosity is naturally wondrous.”</quote></p>
  <p>Often quoted by Master Sheng Yen, these lines describe the essence of Silent Illumination practice. (From Chan Master Hongzhi Zhengjue’s Advice on Sitting Meditation.)
</p>
</figure>

front

例 溫宗堃老師譯著《毗婆舍那講記:含〈法的醫療〉》, 在正文開始前的一些照片:

<front>
  <figure><graphic url="a1-1.jpg"/><head>馬哈希尊者 (1979)</head></figure>
  <figure><graphic url="a2-1.jpg"/><head>馬哈希尊者(1949)</head></figure>
  <figure><graphic url="a3-1.jpg"/><head>馬哈希尊者 (1904-1982)</head></figure>
  <figure><graphic url="a3-2.jpg"/><head>馬哈甘達勇尊者(左)    馬哈希尊者(右)</head></figure>
  <figure><graphic url="a4-1.jpg"/><head>根本傑打汪明坤尊者<lb/>(馬哈希尊者的禪修老師)</head></figure>      
</front>

include

一本書可以分為多個 XML 檔,include 在一個主檔裡。例如 5-06.xml 《坐禪的功能 (增訂版)》

<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<teiHeader>...</teiHeader>
<text>
<body>
<div>
  <head>一、禪的入門方法</head>
  <xi:include href="part-5-01.xml"/>
</div>
<div>
  <head>二、坐禪的功能</head>
  <xi:include href="part-5-02.xml"/>
</div>
<div>
  <head>三、禪修與信仰</head>
  <xi:include href="part-5-03.xml"/>
</div>
<div>
  <head>四、禪學與正信的佛教</head>
  <xi:include href="part-5-04.xml"/>
</div>
<div>
  <head>五、法喜與禪悅</head>
  <xi:include href="part-5-05.xml"/>
</div>
</body></text></TEI>

head

標題中間強迫換行

ex: 10-4.xml

<head>四安:提昇人品的主張<lb/>─安心、安身、安家、安業</head>

一個 div 下兩個 head

ex: 9-13.xml

<div>
  <head rend="font-style:italic">About the Author:</head>
  <head rend="text-align:center">Master Sheng Yen</head>
  ...
</div>

table 的 head

ex: 法鼓山智慧隨身書 2-1-5.xml

<table rend="border: thin solid black;width:6em">
  <head>(兩門車)<lb/>吉普車</head>
  <row>
    <cell rend="border-width:0;width:2em;text-align:center"></cell>
    <cell rend="border-width:0;width:2em;text-align:center">1</cell>
  </row>
  <row>
    <cell rend="border-width:0;width:2em;text-align:center">3</cell>
    <cell rend="border-width:0;width:2em;text-align:center">2</cell>
  </row>
</table>

lb

x2epub.py 預設會將 lb 轉為 br, 如果希望 lb 不要轉為 br, 可以設 config['convert_lb_to_br'] = False.

這時, 如果有某些特別的地方要強迫換行, 可以標:

<lb type="always-newline"/>

lg

偈頌

賢度法師《華嚴經十地品淺釋(上冊)》p. 332 偈頌前有「經云:」

經云:菩薩聞此勝地行,於法解悟心歡喜,
   空中雨華讚歎言:善哉大士金剛藏!
   ....
   是時大士解脫月,復請無畏金剛藏:
   第五地中諸行相,唯願佛子為宣說!

XML 以 display:inline-block 讓兩個 block 並排:

<p>
  <label rend="display:inline-block;vertical-align:top">經云:</label>
  <quote rend="display:inline-block;margin:0">
    <lg rend="margin:0">
      <l>菩薩聞此勝地行,於法解悟心歡喜,</l>
      <l>空中雨華讚歎言:善哉大士金剛藏!</l>
      ....
      <l>是時大士解脫月,復請無畏金剛藏:</l>
      <l>第五地中諸行相,唯願佛子為宣說!</l>
    </lg>
  </quote>
</p>

list

type="bulleted"

例《轉法輪經講記》

<list type="bulleted">
  <item>極端的道路是錯誤的,應避免。</item>
  <item>中道才是正道。</item>
</list>

type="ordered"

例 溫宗堃老師譯著《正念禪修方法》

<list type="ordered">
  <item>如何讓心準確地直接落在禪修所緣上。</item>
  <item>如何訓練我們的心,不讓它遊移到外在的所緣。</item>
  <item>如何以恰當的觀照與標記,訓練我們的心,使它能長時間保持不散亂的狀態。</item>
</list>

list-style-type

例《轉法輪經講記》

<list type="ordered" rend="list-style-type:lower-alpha">
  <item>「違犯不善」(vitakkama-akusala),是顯現於身、口的殺生、偷盜、妄語等的身、語惡行。</item>
  <item>「纏縛不善」(pariyuṭṭhāna-akusala),即欲、貪等現起的不善心念。</item>
  <item>「隨眠不善」(anusaya-akusala),蟄伏著的不善法,它尚未現前,但機會到來時便會生起。</item>
</list>

轉為 HTML:

  1. 「違犯不善」(vitakkama-akusala),是顯現於身、口的殺生、偷盜、妄語等的身、語惡行。
  2. 「纏縛不善」(pariyuṭṭhāna-akusala),即欲、貪等現起的不善心念。
  3. 「隨眠不善」(anusaya-akusala),蟄伏著的不善法,它尚未現前,但機會到來時便會生起。

note

行中夾註

ex:

我自己晚上不用藥石<note place="inline">(編按:晚餐)</note>

EPUB 轉為

我自己晚上不用藥石<span class="inline_note">(編按:晚餐)</span>

頁尾註 place="bottom"

例《轉法輪經講記》

<p>後來阿難向世尊報告這件事,世尊說:「阿難!確實如此,如果比丘或比丘尼持續修習四念處,可以肯定的是,他們會比過去更加了解四聖諦。」<note place="bottom">S V 155-6: Evametaṃ, Ānanda, evametaṃ, Ānanda! Yo hi koci, ānanda, bhikkhu vā bhikkhunī vā catūsu satipaṭṭhānesu suppatiṭṭhitacitto viharati, tassetaṃ pāṭikaṅkhaṃ- ‘uḷāraṃ pubbenāparaṃ visesaṃ sañjānissati”.</note></p>

resp="eng"

中譯本保留英譯本的註解, 例《佛陀的勇士們》

<note place="bottom" resp="eng" n="*1" xml:id="n1-star1">Sāsana常中譯作「教」或「教法」,巴利文buddhasāsana,即指佛陀的教法。</note>

或者以頁碼做為 ID 的一部份:

<p>腰果樹在結果實之前,種子會先發芽。在佛陀的教法
<note place="bottom" resp="eng" n="*1" xml:id="eng-note-414.1">Buddha sāsana。</note>中,
這種腰果樹般的行為,絲毫不值得學習。
<note place="bottom" resp="eng" n="*2" xml:id="eng-note-414.2">
大師藉由這個譬喻,暗示在從事佛法活動時的傲慢態度。人應該隱藏自己的戒行、特質與能力等的優點,如同大多數水果的種子那樣〔隱而不顯〕,避免自我標榜。</note></p>

章節末註解

例 9-13 《The Dharma Drum Lineage of Chan Buddhism》

在內文註標的地方這麼標:

....Hīnayāna Buddhism<ref type="noteAnchor" target="#n2.1">1</ref> and Mahāyāna schools....

在章節末放註解的地方這麼標:

<p rendition="#note"><note xml:id="n2.1" n="1">....</note></p>

opener

用來包 div 開始之後, head 之前的東西.

例如「智諭法師著作集專案」, SL03n0005.xml, p. 19

<div>
  <opener>
    <title>​修大方廣佛華嚴法界觀門直解</title>
    <byline>​唐終南山釋法順述​</byline>
    <byline>釋智諭 解</byline>
  </opener>
  <head>​緒言</head>
  ...
</div>

註:智諭專案決定不採用 opener, 但其他專案仍可參考採用。

pb

中譯本標示原文本的頁碼, 例《轉法輪經講記》

<p>放棄沉溺於感官快樂以及嚴苛的苦行這兩種極端之後,世尊藉由中道的實踐而證得佛果。<pb ed="en" n="57"/></p>

quote

display:block

例如 WZK/02.xml 《毗婆舍那講記:含〈法的醫療〉》

<quote rend="display:block">sattiyā viya omaṭṭho, ḍayhamānova matthake. kāmarāgappahānāya, sato bhikkhu paribbaje.</quote>

quote 包 p

獨立一個段落的引文, 例《轉法輪經講記》

<quote>
  <p xml:lang="pi">Ete Kho, Bhikkhave, ubho ante anupagamma majjhima paṭipadā Tathāgatena abhisambuddhā──akhukaraṇi, ñāṇakaraṇi, upasamāya, abhiññāya, sambodhāya, nibbānāya saṃvattati.</p>
  <p>諸比丘!如來避免這兩個極端後,已得中道智慧──它能作眼、作智,導向寂靜、通智、等覺和涅槃。</p>
</quote>

quote 包 lg

《轉法輪經講記》

<quote>
<lg xml:lang="pi">
  <l>Ahañhi arahā loke,</l>
  <l>ahaṃ satthā anuttaro,</l>
  <l>ekomhi sammāsambuddho;</l>
  <l>sītibhūtosmi nibbuto.</l>
</lg>
<lg>
  <l>我確實是世上的阿羅漢,</l>
  <l>我是無上的大師,</l>
  <l>是唯一的正等覺者。</l>
  <l>寂滅一切貪愛,我證得涅槃。</l>
</lg>
</quote>

ref

參照 Internet 網址

例 9-13 《The Dharma Drum Lineage of Chan Buddhism》

There are various sociological and statistical data. One can be found online here: 
<ref target="http://www.adherents.com/Religions_By_Adherents.html">
http://www.adherents.com/Religions_By_Adherents.html
</ref>, accessed on October 2009.

章節末註解

例 9-13 《The Dharma Drum Lineage of Chan Buddhism》

....Hīnayāna Buddhism<ref type="noteAnchor" target="#n2.1">1</ref> and Mahāyāna schools....
<p rendition="note"><note xml:id="n2.1" n="1">....</note></p>

refsDecl

例 溫宗堃老師譯著《毗婆舍那講記:含〈法的醫療〉》, 說明對應到各個英譯本頁碼的標記:

<encodingDesc>
  <refsDecl>
    <p>pb 的 ed 屬性值 en 表示《毗婆舍那講記》英譯本。</p>
    <p>pb 的 ed 屬性值 en2 表示〈法的醫療〉英譯本。</p>
    <p>pb 的 ed 屬性值 en3 表示〈馬哈希思想的寶石〉英譯本。</p>
    <p>pb 的 ed 屬性值 en4 表示〈第二十六屆年度大會前夕‧馬哈希尊者為緬甸各分道場的弟子們所做的開示〉英譯本。</p>
    <p>note 的 resp 屬性值 eng 表示英譯本原書注腳</p>
  </refsDecl>
</encodingDesc>

respStmt

例如 聖嚴師父結緣書 6-2 《大智慧過生活》繪圖:朱德庸

<titleStmt>
  <title>大智慧過生活</title>
  <author>聖嚴法師</author>
  <respStmt><resp>繪圖:</resp><persName>朱德庸</persName></respStmt>
</titleStmt>

seg

上標

On May 1<seg rend="vertical-align:super;">st</seg>

table

完全無格線的表格, 例: 9-14 《Master Sheng Yen》

<table rendition="noborder">...</table>

text

英文書

<text xml:lang="en">....</text>

title

英文或巴利文的 title, 預設以斜體顯示, 例如《佛陀的勇士們》

<p>現在,我要解說《增支部.第五集》的《敵經》(<title xml:lang="pi">Verasutta</title>)。</p>