浏览代码

Generalize format of xrefs to chapters

Remove custom labels, and override the formating string to display
Chinese chapter numbers.
Xi Ruoyao 7 年之前
父节点
当前提交
1fa5f503b5

+ 1 - 1
chapter01/chapter01.xml

@@ -5,7 +5,7 @@
   %general-entities;
 ]>
 
-<chapter id="chapter-intro" xreflabel="Chapter&nbsp;1">
+<chapter id="chapter-intro">
   <?dbhtml dir="chapter01"?>
   <?dbhtml filename="chapter01.html"?>
 

+ 1 - 1
chapter02/chapter02.xml

@@ -5,7 +5,7 @@
   %general-entities;
 ]>
 
-<chapter id="chapter-partitioning" xreflabel="Chapter&nbsp;2">
+<chapter id="chapter-partitioning">
   <?dbhtml dir="chapter02"?>
   <?dbhtml filename="chapter02.html"?>
 

+ 1 - 1
chapter03/chapter03.xml

@@ -5,7 +5,7 @@
   %general-entities;
 ]>
 
-<chapter id="chapter-getting-materials" xreflabel="Chapter&nbsp;3">
+<chapter id="chapter-getting-materials">
   <?dbhtml dir="chapter03"?>
   <?dbhtml filename="chapter03.html"?>
 

+ 1 - 1
chapter04/chapter04.xml

@@ -5,7 +5,7 @@
   %general-entities;
 ]>
 
-<chapter id="chapter-final-preps" xreflabel="Chapter&nbsp;4">
+<chapter id="chapter-final-preps">
   <?dbhtml dir="chapter04"?>
   <?dbhtml filename="chapter04.html"?>
 

+ 1 - 1
chapter05/chapter05.xml

@@ -5,7 +5,7 @@
   %general-entities;
 ]>
 
-<chapter id="chapter-temporary-tools" xreflabel="Chapter&nbsp;5">
+<chapter id="chapter-temporary-tools">
   <?dbhtml dir="chapter05"?>
   <?dbhtml filename="chapter05.html"?>
 

+ 1 - 1
chapter06/chapter06.xml

@@ -5,7 +5,7 @@
   %general-entities;
 ]>
 
-<chapter id="chapter-building-system" xreflabel="Chapter&nbsp;6">
+<chapter id="chapter-building-system">
   <?dbhtml dir="chapter06"?>
   <?dbhtml filename="chapter06.html"?>
 

+ 1 - 1
chapter07/chapter07.xml

@@ -5,7 +5,7 @@
   %general-entities;
 ]>
 
-<chapter id="chapter-bootscripts" xreflabel="Chapter&nbsp;7">
+<chapter id="chapter-bootscripts">
   <?dbhtml dir="chapter07"?>
   <?dbhtml filename="chapter07.html"?>
 

+ 1 - 1
chapter08/chapter08.xml

@@ -5,7 +5,7 @@
   %general-entities;
 ]>
 
-<chapter id="chapter-bootable" xreflabel="Chapter&nbsp;8">
+<chapter id="chapter-bootable">
   <?dbhtml dir="chapter08"?>
   <?dbhtml filename="chapter08.html"?>
 

+ 1 - 1
chapter09/chapter09.xml

@@ -5,7 +5,7 @@
   %general-entities;
 ]>
 
-<chapter id="chapter-finalizing" xreflabel="Chapter&nbsp;9">
+<chapter id="chapter-finalizing">
   <?dbhtml dir="chapter09"?>
   <?dbhtml filename="chapter09.html"?>
 

+ 4 - 0
stylesheets/lfs-xsl/lfs-l10n.xml

@@ -27,6 +27,10 @@ $Date$
 	</l:context>
 	<l:gentext key="Copyright" text="版权所有"/>
 
+	<!-- Override xref chapter format to hide the title -->
+	<l:context name="xref-number-and-title">
+		<l:template name="chapter" text="第 %n 章"/>
+	</l:context>
 
   </l:l10n>