「《賢度法師著作集》數位化專案標記手冊」:修訂間差異

出自DILA Wiki
imported>Sinyue
imported>Tsairung lin
 
(未顯示由 3 位使用者於中間所作的 41 次修訂)
行 17: 行 17:
*檔案:Y:\Projects\2013《賢度法師著作》數位化專案\05Work\images
*檔案:Y:\Projects\2013《賢度法師著作》數位化專案\05Work\images
*命名:
*命名:
**如:01.010.png、02.011.png …… (01為冊數,010為頁碼)
**如:01.010.png、02.011.png... (01為冊數,010為頁碼)
**圖檔若是於兩頁之間,則命名為:01.頁碼a.png。<br>
**圖檔若是於兩頁之間,則命名為:01.頁碼a.png。<br>
   例如:《華嚴學講義》「賢首五教斷證之圖」於p272、p273之間,命名為01.272a.png
   例如:《華嚴學講義》「賢首五教斷證之圖」於p272、p273之間,命名為01.272a.png
*梵文圖檔命名:依天城體字母設定。
**如:dev-kha.png、dev-ka.png...(dev為DEVANAGARI簡寫,kha為字母)
*圖檔路徑
**網路介面:P槽/2013賢度法師著作數位化專案/05Work/images/01
**電子書:P槽/2013賢度法師著作數位化專案/05Work/images-for-epub/01


=字元處理=
=字元處理=
行 35: 行 41:
==破折號==
==破折號==
*文字破折號:—(U+2014)
*文字破折號:—(U+2014)
==缺字處理==
TeiHeader 標記:
<syntaxhighlight lang="XML">
<encodingDesc>
  <charDecl>
   <char xml:id="Z1305">
   <mapping type="組字式">[口*捺]</mapping>
   </char>
  </charDecl>
</encodingDesc>
</syntaxhighlight>
文內標記, 例:《佛教制度與儀軌》,p92
<syntaxhighlight lang="XML">
<p rend="text-indent:0">唵。薩㗚末。怛達遏怛遏怛。巴<g ref="#Z1305"/>末<g ref="#Z1305"/>。難葛浪彌</p>
</syntaxhighlight>


=Namespaces=
=Namespaces=
行 80: 行 69:
       <title level="s">華嚴學海系列</title><biblScope>二</biblScope>
       <title level="s">華嚴學海系列</title><biblScope>二</biblScope>
       <title level="m">華嚴學講義</title>
       <title level="m">華嚴學講義</title>
       <publisher>台北市華嚴蓮社</publisher>
       <publisher> 財團法人 台北市華嚴蓮社</publisher>
       <date when="2012-09-10">中華民國一〇一年九月十日</date><edition>八版三刷</edition>
      <pubPlace>台北市,台灣</pubPlace>
       <date when="2012-09-10">中華民國一〇一年九月十日</date><edition n="8">八版三刷</edition>
      </bibl>
      </bibl>
     </sourceDesc>
     </sourceDesc>
行 164: 行 154:
<syntaxhighlight lang="XML">
<syntaxhighlight lang="XML">
<p>佛有三身:身即聚集之義。</p>
<p>佛有三身:身即聚集之義。</p>
</syntaxhighlight>
===type="head"===
標題(不在web目次出現的標題)
例如:《Development of the Hua-yen School During The Tang Dynasty(641A.D.TO 845 A.D.)》,p72
<syntaxhighlight lang="XML">
<p type="head" rend="margin-left:3em;text-indent:-1em;">Illustration of the Dharma through simile (譬辨):</p>
</syntaxhighlight>
</syntaxhighlight>


行 365: 行 363:
===儲存格欄寬===
===儲存格欄寬===
*若欄寬為1字元,標記為:<cell rend="width:1em>
*若欄寬為1字元,標記為:<cell rend="width:1em>
===框線大小與樣式設定===
*例:<cell rend="border-top:2em solid;border-bottom:1em solid">
===表格與圖片皆呈現===
表格之圖片若也於介面呈現,加入圖片屬性。
例:《華嚴學講義》,p63
<syntaxhighlight lang="XML">
<table facs="01.063.png">
  <head>攝大經七處九會三十九品為四分五周因果</head>
  ......
</table>
</syntaxhighlight>
此處的 EPUB 則以圖片呈現。
==table 包 p==
《華嚴學講義》,p61
<syntaxhighlight lang="XML">
<table>
...
<row>
  <cell rend="padding-left:1.5em;text-indent:-1em">3.託法進修成行分:託離世間二千行法,表示<lb n="61.14"/>等覺行者不會再沾染世間一切染污惡行。</cell>
  <cell>
   <p rend="text-indent:0em">4.成行因果周:</p>
   <p rend="margin-left:3em;text-indent:-2em">因—五位之行。</p><lb rend="display:none"
   n="61.14"/><p rend="margin-left:3em;text-indent:-2em">果—八相成道之果德。</p>
  </cell>
</row>
...
</table>
</syntaxhighlight>
==table 包 table==
《佛教制度與儀軌》,p221
<syntaxhighlight lang="XML">
<table rendition="no_border"><lb n="221.02"/>
<row>
  <cell rend="vertical-align:middle">▲</cell>
  <cell rend="vertical-align:middle">
  <table rend="display:inline-block;font-size:small;vertical-align:middle;line-height:16px;margin:0" rendition="no_border">
   <row><cell rend="font-size:small">佛子</cell></row>
   <row><cell rend="font-size:small">有情</cell></row>
   <row><cell rend="font-size:small">孤魂</cell></row>
  </table>
  <table rend="display:inline-block;vertical-align:middle;margin:0" rendition="no_border">
    <row><cell rend="vertical-align:center">所造諸惡業</cell></row>
  </table>
...
</row>
...
</table>
</syntaxhighlight>


==seg==
==seg==
行 408: 行 458:
<quote rend="display:inline-block;margin:0;text-indent:0"><lg rend="margin:0">
<quote rend="display:inline-block;margin:0;text-indent:0"><lg rend="margin:0">
<l>菩薩聞此勝地行,於法解悟心歡喜,</l>...
<l>菩薩聞此勝地行,於法解悟心歡喜,</l>...
</syntaxhighlight>
==ruby==
此為旁註標記,<rb> 是 ruby base,也就是本文;<rtc> 是 ruby text,旁註的文字。於全集多用於板眼。
例如:《佛教制度與儀軌》P.29
<syntaxhighlight lang="XML">
<p rend="text-indent:0">普為四恩三<h:ruby><h:rb>有</h:rb><h:rtc rend="font-size:small">平</h:rtc></h:ruby>。
及法界眾<h:ruby><h:rb>生</h:rb><h:rtc rend="font-size:small">平</h:rtc></h:ruby>。
悉願<h:ruby><h:rb>斷</h:rb><h:rtc rend="font-size:small">高</h:rtc>
</h:ruby>除諸障歸命<h:ruby><h:rb>懺</h:rb><h:rtc rend="font-size:small">高</h:rtc></h:ruby>悔</p>
</syntaxhighlight>
*上面:<rtc>為<h:rtc place="over">,為預設值。
*最上面:<h:rtc place="top">
*下面:<h:rtc place="under">
*最下面:<h:rtc place="bottom">
例如:《佛教制度與儀軌》P.230
<syntaxhighlight lang="XML">
<p rend="text-indent:0">南無普賢菩薩
<h:ruby><h:rb>南</h:rb><h:rtc place="under">○</h:rtc></h:ruby>
<h:ruby><h:rb>無</h:rb><h:rtc place="under">─</h:rtc></h:ruby>
<h:ruby><h:rb> </h:rb><h:rtc place="under">─</h:rtc></h:ruby>
<h:ruby><h:rb>華</h:rb><h:rtc place="under">○</h:rtc></h:ruby>
<h:ruby><h:rb>嚴</h:rb><h:rtc place="under">─</h:rtc></h:ruby>
<h:ruby><h:rb> </h:rb><h:rtc place="under">─</h:rtc></h:ruby>
<h:ruby><h:rb>海</h:rb><h:rtc place="under">○</h:rtc></h:ruby>
<h:ruby><h:rb>會</h:rb><h:rtc place="under">─</h:rtc></h:ruby>
<h:ruby><h:rb> </h:rb><h:rtc place="under">─</h:rtc></h:ruby>
<h:ruby><h:rb>佛</h:rb><h:rtc place="under">○</h:rtc></h:ruby>
<h:ruby><h:rb> </h:rb><h:rtc place="under">─</h:rtc><h:rtc place="bottom"><graphic url="banyan-7.png"/></h:rtc></h:ruby>
<h:ruby><h:rb>菩</h:rb><h:rtc place="under">○</h:rtc></h:ruby>
<h:ruby><h:rb> </h:rb><h:rtc place="under">─</h:rtc></h:ruby>
<h:ruby><h:rb>薩</h:rb><h:rtc place="under">○</h:rtc></h:ruby>
<h:ruby><h:rb> </h:rb><h:rtc place="bottom"><graphic url="banyan-7.png"/></h:rtc></h:ruby><seg rend="font-size:smaller">歸位 止佛聲 長跪</seg></p>
</syntaxhighlight>
===type="group"===
若旁註為一語詞,可用此標記。
例如:《佛教制度與儀軌》P.234
<syntaxhighlight lang="XML">
<p>懺悔發願<h:ruby><h:rb>已</h:rb><h:rtc><graphic url="banyan-7.png"/></h:rtc></h:ruby>
<h:ruby type="group"><h:rb>歸命</h:rb><h:rtc>(起身)</h:rtc></h:ruby>禮</p>
</syntaxhighlight>
</syntaxhighlight>


行 414: 行 506:
*quote:標楷體,整段內縮兩格;EPUB預設為綠色字體。
*quote:標楷體,整段內縮兩格;EPUB預設為綠色字體。
*lg、list:整段內縮兩格。
*lg、list:整段內縮兩格。
*figure 與 table 下的<head> 不於目錄裡呈現。
*figure 與 table 下的 head 不於目錄裡呈現。
*label 預設為標楷體;EPUB預設為綠色字體。
*label 預設為標楷體;EPUB預設為綠色字體。
*p type="head" 預設為粗體。
*《轉法輪集》一、二之附錄(散於不同章節之圖表,table、figure 下的 head 標題標記)依程式設定於目錄裡。


=某本書範圍中某一類元素的共同樣式=
=某本書範圍中某一類元素的共同樣式=
行 439: 行 533:
</syntaxhighlight>
</syntaxhighlight>


=css=
= 缺字處理=
介面的缺字圖片來源依據難檢字庫之ID,EPUB電子書所使用的圖片為放於以下路徑之圖片:Y:\Projects\2013《賢度法師著作》數位化專案\02MasterData\glyphs <br>
TeiHeader 標記需紀錄如下:
<syntaxhighlight lang="XML">
<encodingDesc>
  <char xml:id="Z1305">/*難檢字庫ID,介面缺字圖片來源*/
   <mapping type="組字式">[口*捺]</mapping>
   <graphic url="Z1305.svg"/>/*電子書缺字圖片來源*/
  </char>
</encodingDesc>
</syntaxhighlight>
 
文內標記, 例:《佛教制度與儀軌》,p92
<syntaxhighlight lang="XML">
<p rend="text-indent:0">唵。薩㗚末。怛達遏怛遏怛。巴<g ref="#Z1305"/>末<g ref="#Z1305"/>。難葛浪彌</p>
</syntaxhighlight>
 
=CSS=
==邊界==
==邊界==
===margin===
===margin===
行 511: 行 622:
<lg rend="font-family:inherit;color:inherit"><l>菩薩在家,當願眾生,知家性空,免其逼迫。</l>
<lg rend="font-family:inherit;color:inherit"><l>菩薩在家,當願眾生,知家性空,免其逼迫。</l>
<l>孝事父母,當願眾生,善事於佛,護養一切。</l>....</lg>
<l>孝事父母,當願眾生,善事於佛,護養一切。</l>....</lg>
</syntaxhighlight>
= 發行 =
== 網站 ==
== EPUB ==
cd 到這個資料夾:P:/2013賢度法師著作數位化專案/02MasterData/bin
例如在 mac 下要將 01.xml 轉為 EPUB 就執行:
<syntaxhighlight lang="XML">
python3 ebook.py 01
</syntaxhighlight>
</syntaxhighlight>

於 2017年4月10日 (一) 10:30 的最新修訂

工作準備

Word轉XML步驟

1、開 DOC
2、全選→字型設為新細明體
3、列印→Adobe PDF→存成PDF,放到Y:\Projects\2013《賢度法師著作》數位化專案\05Work\step1-pdf
4、將 PDF 內的文字複製出來存成 TXT(編碼用 UTF-8 有 BOM),放到Y:\Projects\2013《賢度法師著作》數位化專案\05Work\step2-txt,內含頁碼, 保持原書斷行。
5、編輯 TXT,去掉頁首、頁尾的書名、章節名。
6、使用 python 程式 bin/t2x.py 將 TXT 轉為 XML,放在Y:\Projects\2013《賢度法師著作》數位化專案\05Work\step3-xml
 (1)自動加上頁碼、行號
 (2)直式標點轉橫式標點

圖檔掃描

  • 掃描圖檔:
    • 彩色圖:TIFF,全彩,300DPI
    • 黑白圖:PNG,黑白,300DPI
  • 網頁:採用72DPI
  • 檔案:Y:\Projects\2013《賢度法師著作》數位化專案\05Work\images
  • 命名:
    • 如:01.010.png、02.011.png...(01為冊數,010為頁碼)
    • 圖檔若是於兩頁之間,則命名為:01.頁碼a.png。
 例如:《華嚴學講義》「賢首五教斷證之圖」於p272、p273之間,命名為01.272a.png
  • 梵文圖檔命名:依天城體字母設定。
    • 如:dev-kha.png、dev-ka.png...(dev為DEVANAGARI簡寫,kha為字母)
  • 圖檔路徑
    • 網路介面:P槽/2013賢度法師著作數位化專案/05Work/images/01
    • 電子書:P槽/2013賢度法師著作數位化專案/05Work/images-for-epub/01

字元處理

空格

  • 若兩個語詞之間有空格,皆改用全形空格,而非半形空格,例如:「第一章 華嚴經探源」改為「第一章 華嚴經探源」
  • 一個語詞內若有無意義的空格,例如:「經 名」,皆將空格取消,採用「經名」。
  • 梵文字型前後加上半形空格。

表意數字零

若是國字(中日韓表意文字)的數字零採用〇(Unicode U+3007),如: 一二三四五六七八九「〇」、一九八「〇」

  • 「一二三四...九」在 Unicode 定義是 CJK Ideograph(中日韓表意文字)
  • 「〇(U+3007)」的 Unicode 定義是 Ideographic Number Zero(表意數字零)

破折號

  • 文字破折號:—(U+2014)

Namespaces

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="../schema/hsiendu.rnc" type="application/relax-ng-compact-syntax"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:h="http://www.w3.org/1999/xhtml">

TeiHeader

<teiHeader>
    <fileDesc>
      <titleStmt>
        <title>華嚴學講義</title>
        <author>賢度法師</author>
        <funder>台北市華嚴蓮社</funder>
        <principal>賢度法師</principal>
      </titleStmt>
      <editionStmt>
        <edition>Version 1.0, TEI P5 <date when="2013"/></edition>
      </editionStmt>
      <publicationStmt>
        <p>本電子檔智慧財產權屬於台北市華嚴蓮社,不得散佈發行。</p>
      </publicationStmt>
      <sourceDesc>
        <bibl>
          <title level="s">華嚴學海系列</title><biblScope></biblScope>
          <title level="m">華嚴學講義</title>
          <publisher>財團法人台北市華嚴蓮社</publisher>
          <pubPlace>台北市,台灣</pubPlace>
          <date when="2012-09-10">中華民國一〇一年九月十日</date><edition n="8">八版三刷</edition>
        </bibl>
      </sourceDesc>
    </fileDesc>
    <revisionDesc>
       <change when="2013-10"><name>周邦信</name> MS Word 轉為 TEI P5 標記</change>
    </revisionDesc>
</teiHeader>

XML Elements

front

  • TEI 定義:<front> (正文前資訊) 包含位於文件最前端、正文之前的項目 (標頭、題名頁、前言、獻詞等) 。

例如:《華嚴經十地品淺釋》(上冊) p.a1

<front>
<div><table facs="05.a001.png">
<head>攝大經七處九會三十九品為四分五周因果</head>
...
</front>
<body>
<div><opener>華嚴經十地品淺釋</opener><lb
...
</body>

div

章節皆以 div 元素標示。

head

TEI 定義:(標題)包含任何種類的標題,如章節、列表、詞彙表、寫本描述等的標題。

<div><head></head></div>

圖檔標題

不出現於目錄的圖檔標題,例:《華嚴學講義》p. 133

<figure>
<head>賢首時儀教觀圖:</head>
<graphic url="01.133.png"/>
</figure>

表格標題

不出現於目錄的表格標題,例:《華嚴學講義》p. 64

<table>
<head>六十華嚴經七處八會略表</head>
<lb n="64.02"/>
<row>
<cell>品數</cell><cell>會次會場</cell><cell>說法別舉</cell><cell>分次周次</cell>
</row>
...
</table>

自訂標題

  • 篇章缺乏標題而自訂標題,標記格式:<head><supplied resp="標記者">自訂標題</supplied></head>
  • 自加的標題會出現在網頁左欄的樹狀目錄結構,並且程式會自動加上括弧,以與文本上實有的標題區分。

例如:《華嚴經十地品淺釋》(下冊),p.01

<head><supplied resp="周怡曄">七、說分</supplied></head>

type

例如《華嚴淨土思想與念佛法門》p.03:「一、念佛法門於《華嚴經》中的地位」為主標題,「《華嚴經》之念佛法門」為副標題。

<div><head type="main">一、念佛法門於《華嚴經》中的地位</head>
<head type="sub" rend="text-indent:2em">《華嚴經》之念佛法門</head>
...</div>

opener

TEI 定義:<opener> 匯集日期地點、署名、稱呼語及其他在區段開端出現的類似措辭,尤指信件開頭。
著作全集中,章節標題前出現的書名,以 opener 元素標記。
例如:《華嚴經十地品淺釋》下冊,p1

<pb n="1"/><lb 
n="1.01"/><div><opener>華嚴經十地品淺釋</opener><lb 
n="1.02"/><head>前言</head><lb

p

標記散文的段落。 例:《華嚴學講義》p. 9

<p>佛有三身:身即聚集之義。</p>

type="head"

標題(不在web目次出現的標題)

例如:《Development of the Hua-yen School During The Tang Dynasty(641A.D.TO 845 A.D.)》,p72

<p type="head" rend="margin-left:3em;text-indent:-1em;">Illustration of the Dharma through simile (譬辨):</p>

quote

  • <quote> (引文) 包含敘述者或作者引用自文本以外來源的字 (句) 詞或段落。

例如:《華嚴經十地品淺釋》p. 321

經云:<quote>菩薩住此地,多作須夜摩天王,以善方便,能除眾生身見等
惑,令住正見。布施、愛語、利行、同事,如是一切諸所作業,皆
不離念佛,不離念法,不離念僧,乃至不離念具足一切種、一切智
智。復作是念:「我當於一切眾生中為首、為勝、為殊勝、為妙、
為微妙、為上、為無上,乃至為一切智智依止者。」是菩薩若發勤
精進,於一念頃,得入億數三昧,得見億數佛,得知億數佛神力,
能動億數世界,乃至能示現億數身,一一身,億數菩薩以為眷屬。</quote>

quote 包 p

獨立一個段落的引文,例如:《華嚴學講義》p. 329

<quote><p>若欲成就此功德門,應修十種廣大行願。何種為十?一者禮敬諸
佛,二者稱讚如來,三者廣修供養,四者懺悔業障,五者隨喜功德
,六者請轉法輪,七者請佛住世,八者常隨佛學,九者恆順眾生,
十者普皆迴向。</p></quote>

quote 包 lg

獨立一個段落的偈頌,例如:《華嚴經十地品淺釋》(上冊)p. 93

<quote rend="margin-left:3em"><lg><l>善哉佛子願演說,趣入菩提諸地行!</l>
<l>十方一切自在尊,莫不護念智根本。</l> 
<l>此安住智亦究竟,一切佛法所從生,</l>
<l>譬如書數字母攝,如是佛法依於地。</l></lg></quote>

q

  • TEI 的 q 元素定義:(引用的言詞、思想、或文字) 包含標記為 (看似) 引用自他處的內容;在敘述文中,此元素用來標記直接或間接敘述;在字典中,用來標記實例或編者設計的範例;在寫本描述或其他上層資訊中,用來標記由來源文本中所摘錄的引文。
  • 內文裡非獨立段落的引文,並且前後有非引文文字,皆採用不同字型以突顯時使用此標記,例如:《華嚴經十地品淺釋》(上冊)p. 93
一、與不著辯,<q>經云:與無礙樂說辯。</q>才說法不斷無滯礙。

list

  • list:(list) 包含以列表方式呈現的任何連續項目。
  • item:包含列表中的一個項目。

例:《華嚴學講義》p.248

<list>
<lb n="248.04"/><item>一、約證,於十地中,斷一切障惑。</item>
<lb n="248.05"/><item>二、約位,於十住上,已去斷一切惑障。</item>
<lb n="248.06"/><item>三、約行,於十信終心,斷一切障惑。</item>
<lb n="248.07"/><item>四、約實,一切惑障,本來清淨,故無可斷。</item>
</list>
  • 若有換行與換頁,皆須標示出頁碼與行號

例:《華嚴學專題研究》p.261

<list>
<lb n="261.11"/><item rend="margin-left:1em;text-indent:-1em">㈠《寶通賢首傳燈錄續錄》二卷,每卷各分卷上、卷下,共四冊。<lb 
n="261.12"/>一至二冊清景林心露、體寬通申等校集(西元一八​〇五年撰);
<pb n="262"/><lb n="262.01"/>三至四冊,民國吉安圓徹等撰述(西元一九一三年撰)。</item>
<lb n="262.02"/><item rend="margin-left:1em;text-indent:-1em">㈡《伯亭大師傳記總帙》,《灌頂伯亭大師塔誌銘》,清徐自洙(<lb 
n="262.03"/>西元一七二八年撰),《卍續》一五​〇冊。</item>
...
</list>
  • 兩層 list(list in list)

例:《華嚴經十地品淺釋》(下冊),p1

<list>
<lb n="1.09"/><item>⑴地行:六地主要修行可以於三個章節看到。<list>
<lb n="1.10"/><item>1.勝慢對治。</item>
<lb n="1.11"/><item>2.不住道行勝。</item>
<lb n="1.12"/><item>3.彼果勝。</item></list></item>
<pb n="2"/><lb n="2.01"/><item>⑵位果</item>
</list>

lg

TEI 定義:<lg> (行組) 包含形式上視為一組的詩行,例如詩節、疊句、韻文段落等。
lg 是 line group,裡面包一個或多個<l> (line)。
例:《華嚴經講錄》(世主妙嚴品),p.269

n="269.12"/><lg><l>佛所莊嚴廣大剎 等於一切微塵數</l>
<pb n="270"/><lb 
n="270.01"/><l>清淨佛子悉滿中 雨不思議最妙法</l><lb 
n="270.02"/><l>如於此會見佛坐 一切塵中悉如是</l><lb 
n="270.03"/><l>佛身無去亦無來 所有國土皆明現</l><lb 
n="270.04"/><l>顯示菩薩所修行 無量趣地諸方便</l><lb 
n="270.05"/><l>及說難思真實理 令諸佛子入法界</l><lb 
n="270.06"/><l>出生化佛如塵數 普應群生心所欲</l><lb 
n="270.07"/><l>入深法界方便門 廣大無邊悉開演</l><lb 
n="270.08"/><l>如來名號等世間 十方國土悉充徧</l><lb 
n="270.09"/><l>一切方便無空過 調伏眾生皆離垢</l><lb 
n="270.10"/><l>佛於一切微塵中 示現無邊大神力</l><lb 
n="270.11"/><l>悉坐道場能演說 如佛往昔菩提行</l><lb 
n="270.12"/><l>三世所有廣大劫 佛念念中皆示現</l>
<pb n="271"/><lb 
n="271.01"/><l>彼諸成壞一切事 不思議智無不了</l><lb 
n="271.02"/><l>佛子眾會廣無限 欲共測量諸佛地</l><lb 
n="271.03"/><l>諸佛法門無有邊 能悉了知甚為難</l><lb 
n="271.04"/><l>佛如虛空無分別 等真法界無所依</l><lb 
n="271.05"/><l>化現周行靡不至 悉坐道場成正覺</l><lb 
n="271.06"/><l>佛以妙音廣宣暢 一切諸地皆明了</l><lb 
n="271.07"/><l>普現一一眾生前 盡與如來平等法</l></lg>

pb

頁碼記錄於 pb 元素的 n 屬性,例如:

<pb n="1"/>
  • 空白頁的頁碼亦標示出。

lb

在 <lb> 的屬性 n 之前換行,n 屬性的格式為"頁碼.行號"

<pb n="1"/><lb 
n="1.01"/><div><head></head><lb 
n="1.02"/><p>當一個人面對現實世界的種種黑暗、罪惡、貧窮、愚痴等卑劣的環境,以<lb 
n="1.03"/>及人性的貪、瞋、痴、慢、疑等煩惱時,應該是要厭棄它,而逃到一個,如西<lb

lb 換行功能取消

lb 加上 display:none 屬性,可取消多出了空行,例如:pb 和 lb、p 和 lb 等同時存在而多出的空行。
例:《華嚴經講義》,p33

n="33.02"/>。</cell><cell>南天竺烏茶國王手<lb 
n="32.12"/>書此品梵筴進貢德<lb 
n="32.13"/>宗,罽賓般若三藏翻<lb 
n="32.14"/>譯,澄觀、靈邃詳定<lb 
n="32.15"/>,圓照筆受,弘道、
<pb n="33"/><lb rend="display:none" 
n="33.01"/>鑒虛潤文,道通證義<lb 
n="33.02"/></cell>

例:《華嚴經講義》,p61

<cell>
  <p rend="text-indent:0em">4.成行因果周:</p>
  <p rend="margin-left:3em;text-indent:-2em">因—五位之行。</p><lb rend="display:none"
  n="61.14"/><p rend="margin-left:3em;text-indent:-2em">果—八相成道之果德。</p>
</cell>

figure

圖內無文字

<figure><graphic url="01.010.png"/></figure>

table

例:《華嚴學講義》p. 33

<table>
<head>附表:</head>
<lb n="31.02"/>
<row>
<cell>經名</cell><cell>內容</cell><cell>譯者</cell><cel>時間</cell><cell>地點</cell>
</row>
<lb n="31.03"/>
<row>
<cell>九卷梵本,攜入中<lb n="31.04"/>國,華嚴前分三萬<lb n="31.05"/>六千偈三十四品<lb n="31.06"/>《六十華嚴》。</cell><cell>三十八品略本
。<lb n="31.04"/>缺十定品,七處八會<lb n="31.05"/>未完整。舊譯教學價<lb n="31.06"/>值高,稱為晉經。</cell><cell>支法嶺佛馱跋陀羅
<lb n="31.04"/>尊者主譯,與沙門法<lb n="31.05"/>業、慧嚴等百餘人。</cell><cell>東晉義熙十四年<lb n="31.04"/>至元熙二年。
<lb n="31.05"/>西元四一八年至<lb n="31.06"/>四二○年。</cell><cell>遮拘槃國<lb n="31.04"/>道場寺<lb n="31.05"/>華嚴堂</cell>
</row>
...
</table>

<lb>的位置

  • 表格的列與列之間換行的 <lb> 放在 <row> 與 <row> 之間。

無框線

加上屬性:rendition="no_border"
例:《華嚴學講義》p. 185

<table rendition="no_border">
<lb n="185.02"/><row><cell>德相十玄:</cell><cell>業用十玄:</cell></row>
<lb n="185.03"/><row><cell>⑴同時具足相應德</cell><cell>⑴同時具足相應用</cell></row>
<lb n="185.04"/><row><cell>⑵相即德</cell><cell>⑵相即用</cell></row>
<lb n="185.05"/><row><cell>⑶相在德</cell><cell>⑶相在用</cell></row>
<lb n="185.06"/><row><cell>⑷隱顯德</cell><cell>⑷相入用</cell></row>
<lb n="185.07"/><row><cell>⑸伴德</cell><cel>⑸相作用</cell></row>
<lb n="185.08"/><row><cell>⑹同體成即德</cell><cell>⑹純雜用</cell></row>
<lb n="185.09"/><row><cell>⑺具足無盡德</cell><cell>⑺隱顯用</cell></row>
<lb n="185.10"/><row><cell>⑻純雜德</cell><cell>⑻主伴用</cell></row>
<lb n="185.11"/><row><cell>⑼微細德</cell><cell>⑼微細用</cell></row>
<lb n="185.12"/><row><cell>⑽如因陀羅網德</cell><cell>⑽如因陀羅網用</cell></row>
</table>

儲存格跨欄或跨列

  • row 元素表示表格的一列
  • cell 元素表示表格的一格
  • cell 元素的 cols 屬性表示這一格跨了幾欄
  • cell 元素的 rows 屬性表示這一格跨了幾列
  • 跨三欄:<cell cols=”3”>
  • 跨三列:<cell rows=”3”>

框線不顯示

  • 上框線不顯示:<cell rend="border-top:none">
  • 下框線不顯示:<cell rend="border-bottom:none">
  • 左框線不顯示:<cell rend="border-left:none">
  • 右框線不顯示:<cell rend="border-right:none">

儲存格欄寬

  • 若欄寬為1字元,標記為:<cell rend="width:1em>

框線大小與樣式設定

  • 例:<cell rend="border-top:2em solid;border-bottom:1em solid">

表格與圖片皆呈現

表格之圖片若也於介面呈現,加入圖片屬性。 例:《華嚴學講義》,p63

<table facs="01.063.png">
  <head>攝大經七處九會三十九品為四分五周因果</head>
  ......
 </table>

此處的 EPUB 則以圖片呈現。

table 包 p

《華嚴學講義》,p61

<table>
...
 <row>
  <cell rend="padding-left:1.5em;text-indent:-1em">3.託法進修成行分:託離世間二千行法,表示<lb n="61.14"/>等覺行者不會再沾染世間一切染污惡行。</cell>
  <cell>
    <p rend="text-indent:0em">4.成行因果周:</p>
    <p rend="margin-left:3em;text-indent:-2em">因—五位之行。</p><lb rend="display:none"
    n="61.14"/><p rend="margin-left:3em;text-indent:-2em">果—八相成道之果德。</p>
  </cell>
 </row>
...
</table>

table 包 table

《佛教制度與儀軌》,p221

<table rendition="no_border"><lb n="221.02"/>
 <row>
  <cell rend="vertical-align:middle"></cell>
  <cell rend="vertical-align:middle">
   <table rend="display:inline-block;font-size:small;vertical-align:middle;line-height:16px;margin:0" rendition="no_border">
     <row><cell rend="font-size:small">佛子</cell></row>
     <row><cell rend="font-size:small">有情</cell></row>
     <row><cell rend="font-size:small">孤魂</cell></row>
   </table>
   <table rend="display:inline-block;vertical-align:middle;margin:0" rendition="no_border">
      <row><cell rend="vertical-align:center">所造諸惡業</cell></row>
   </table>
...
 </row>
...
</table>

seg

在 TEI 的中英文解釋:
<seg> (arbitrary segment) represents any segmentation of text below the ‘chunk’ level.
<seg> (隨機分割) 包含文件中任何隨機字詞層次的單元 (包括其他分割元素)。
例:《華嚴學專題研究》p. 267

<seg rend="font-family:標楷體;font-weight:bold">西元一九九三年十月十六日</seg>

ptr

  • TEI 的 ptr 元素定義:(pointer) 標明一個與其他位置相連結的指標。
  • 如註解如果放在章節末,在內文中會有標號連結,此標號以 ptr 元素標記,例如《Development of the Hua-yen School During The Tang Dynasty》p.02
    • 內文標號連結標記:
Yampolsky,“to establish a history for itself.”<ptr type="note" target="#note.001"/> It is the creation of one impressive
    • 章節末標記:
<p><note xml:id="note.001">See Philip Yampolsky, <seg rend="font-style:italic">The Platform sutra of the sixth Patriarch</seg>, New York: Columbia University ...</p>

note

行中夾註:<note place="inline">

例如:《華嚴經講錄》(世主妙鹽品)P.77

經文的一開始一共分出了幾個大段。從第一句「如是我聞」開始,它是「總顯己聞」,這是就《疏鈔》的分判。<note place="inline">(註:此即依澄觀大師之分判。
此處《疏鈔》係指華嚴蓮社編印之《新修華嚴經疏鈔》之略稱。本書是將八十卷本《華嚴經》及澄觀大師所撰《華嚴經疏》、《華嚴經隨疏演義鈔》三本之內容彙整,加上
新式標點、註解引文出處所成之會本,全套二十冊,是一套便利研修華嚴之專書。)</note>
  • 行中夾註呈現上預設為灰色小字

雙行夾註:<note place="inline2">

例如:《佛教制度與儀軌》P.29

㈠梵唄:梵語的音譯,又稱婆陟、唄匿:義譯止<note place="inline2" rend="color:black;font-size:medium">息—內心<lb/>斷—外緣</note>
  • 雙行夾註呈現上預設為灰色小字

label

TEI 的 label 元素定義:包含和列表中某項目相關聯的標號;在詞彙表中則用來標記被定義的字詞。
某些段落開頭會有粗體字表示本段落的標題,我們也以 label 元素標記,例如:《華嚴經十地品淺釋》(上冊),P.332

<p><label rend="display:inline-block;vertical-align:top;text-indent:0">經云:</label>
<quote rend="display:inline-block;margin:0;text-indent:0"><lg rend="margin:0">
<l>菩薩聞此勝地行,於法解悟心歡喜,</l>...

ruby

此為旁註標記, 是 ruby base,也就是本文; 是 ruby text,旁註的文字。於全集多用於板眼。 例如:《佛教制度與儀軌》P.29

<p rend="text-indent:0">普為四恩三<h:ruby><h:rb></h:rb><h:rtc rend="font-size:small"></h:rtc></h:ruby>。
及法界眾<h:ruby><h:rb></h:rb><h:rtc rend="font-size:small"></h:rtc></h:ruby>。
悉願<h:ruby><h:rb></h:rb><h:rtc rend="font-size:small"></h:rtc>
</h:ruby>除諸障歸命<h:ruby><h:rb></h:rb><h:rtc rend="font-size:small"></h:rtc></h:ruby></p>
  • 上面:為<h:rtc place="over">,為預設值。
  • 最上面:<h:rtc place="top">
  • 下面:<h:rtc place="under">
  • 最下面:<h:rtc place="bottom">

例如:《佛教制度與儀軌》P.230

<p rend="text-indent:0">南無普賢菩薩
<h:ruby><h:rb></h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb></h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb> </h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb></h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb></h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb> </h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb></h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb></h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb> </h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb></h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb> </h:rb><h:rtc place="under"></h:rtc><h:rtc place="bottom"><graphic url="banyan-7.png"/></h:rtc></h:ruby>
<h:ruby><h:rb></h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb> </h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb></h:rb><h:rtc place="under"></h:rtc></h:ruby>
<h:ruby><h:rb> </h:rb><h:rtc place="bottom"><graphic url="banyan-7.png"/></h:rtc></h:ruby><seg rend="font-size:smaller">歸位 止佛聲 長跪</seg></p>

type="group"

若旁註為一語詞,可用此標記。 例如:《佛教制度與儀軌》P.234

<p>懺悔發願<h:ruby><h:rb></h:rb><h:rtc><graphic url="banyan-7.png"/></h:rtc></h:ruby>
<h:ruby type="group"><h:rb>歸命</h:rb><h:rtc>(起身)</h:rtc></h:ruby></p>

全集統一預設樣式

  • p:首行內縮兩格。
  • quote:標楷體,整段內縮兩格;EPUB預設為綠色字體。
  • lg、list:整段內縮兩格。
  • figure 與 table 下的 head 不於目錄裡呈現。
  • label 預設為標楷體;EPUB預設為綠色字體。
  • p type="head" 預設為粗體。
  • 《轉法輪集》一、二之附錄(散於不同章節之圖表,table、figure 下的 head 標題標記)依程式設定於目錄裡。

某本書範圍中某一類元素的共同樣式

如果在某本書中的某類元素,樣式與預設的不同,但並不是同名稱的元素都相同樣式。 可以在檔頭中使用 rendition 元素為這類元素定義共用的樣式,樣式名稱放在 xml:id 屬性。
例:《華嚴經十地品淺釋(上冊)》

<teiHeader>
  <fileDesc>
    <!-- 中略 -->
  </fileDesc>
  <encodingDesc>
   <tagsDecl>
      <rendition xml:id="r1">margin-left:2em;text-indent:0;font-family:"標楷體"</rendition>
   </tagsDecl>
  </encodingDesc>
</teiHeader>

在內文中將屬於同一類樣式的元素, 使用 rendition 屬性指定要套用哪一個樣式。
例:《華嚴經十地品淺釋(上冊)》,p34

<p rendition="#r1">經云:<quote>爾時,世尊在他化自在天王宮摩尼寶藏殿。</quote></p>

缺字處理

介面的缺字圖片來源依據難檢字庫之ID,EPUB電子書所使用的圖片為放於以下路徑之圖片:Y:\Projects\2013《賢度法師著作》數位化專案\02MasterData\glyphs
TeiHeader 標記需紀錄如下:

<encodingDesc>
  <char xml:id="Z1305">/*難檢字庫ID,介面缺字圖片來源*/
    <mapping type="組字式">[口*捺]</mapping>
    <graphic url="Z1305.svg"/>/*電子書缺字圖片來源*/
  </char>
</encodingDesc>

文內標記, 例:《佛教制度與儀軌》,p92

<p rend="text-indent:0">唵。薩㗚末。怛達遏怛遏怛。巴<g ref="#Z1305"/><g ref="#Z1305"/>。難葛浪彌</p>

CSS

邊界

margin

  • 左邊界1個字:margin-left:1em

例:《華嚴學講義》,p98

n="98.08"/><p rend="margin-left:3em;text-indent:-3em">附註:1.南山真萃以下「代」即代表傳「賢首、慈恩宗法系」。<lb  type="always-newline"
n="98.09"/>2.「世」即代表「寶通法系」。<lb type="always-newline"
n="98.10"/>3.「傳」即代表「雲棲法系」。</p>

padding(內距)

  • padding-left:1em

例:《華嚴學講義》p. 182

<cell rend="padding-left:1em;">因陀羅網境界門</cell>

text(文字)

縮排

  • 首行縮排2個字:text-indent:2em(負值變成凸排)
  • text-indent為0時,不須加em值:text-indent:0

例:《華嚴學講義》p. 9

首行內縮2個字,第二行內縮3個字,要設左邊界3個字,首行縮排-1個字
<p rend="margin-left:3em;text-indent:-1em">㈠理法之聚集稱為法身,滅除一切煩惱等障,而具足一切之諸善法故。為 
證顯實相真如之理體,無二無別,常住湛然稱為法身,是如來藏的顯現
狀態。</p>
  • 水平置中:text-align:center
  • 靠右對齊:text-align:right

垂直對齊

  • 上標:vertical-align:super

例:《華嚴學專題演講》p371

3.6×10<seg rend="font-size:x-small;vertical-align:super;">60</seg>
  • 置中:vertical-align:middle

字體

  • 粗體:font-weight:bold
  • 標楷體:font-family:標楷體
  • 斜體:font-style:italic
  • 文字大小:
    • font-size:x-small
    • font-size:small

行高

  • 每行之間的距離,例如:line-height:16px

換行

禁止文字自動換行:white-space:nowrap

例如:《華嚴學講義》p268

<cell rend="vertical-align:middle;white-space:nowrap">歡喜地</cell>

不管平板寬度,或web視窗大小,「歡喜地」會保持於同一行,不會被換行。

強迫換行:<lb type="always-newline"/>​​

由於電子書沒有依原書換行,若沒有加上強迫換行標記,需要換行的文句會前後連接在一起。
例如:《華嚴學講義》p.34

<row><cell>羅摩伽經<lb type="always-newline" n="34.05"/>(入法界品序文)<lb type="always-newline" n="34.06"/>一本三卷</cell><cell></cell>
<cell>曹魏安法賢<lb type="always-newline" n="34.05"/>北涼曇無讖譯一本一卷<lb n="34.06"/></cell><cell>西元二二​〇年至二<lb n="34.05"/>六四年</cell></row>

inherit

lg 全集預設為標楷體,但此處 lg 字體不呈現標楷體,與本文字體一致。
例如:《華嚴學講義》P316

<lg rend="font-family:inherit;color:inherit"><l>菩薩在家,當願眾生,知家性空,免其逼迫。</l>
<l>孝事父母,當願眾生,善事於佛,護養一切。</l>....</lg>

發行

網站

EPUB

cd 到這個資料夾:P:/2013賢度法師著作數位化專案/02MasterData/bin

例如在 mac 下要將 01.xml 轉為 EPUB 就執行:

python3 ebook.py 01