Date: 07/08/00
- Next message: Thomas Schuermann: "[PHP-DOC] cvs: phpdoc /de/functions misc.xml"
- Previous message: Andrei Zmievski: "[PHP-DOC] cvs: phpdoc /en/functions strings.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
jah Sat Jul 8 20:54:23 2000 EDT
Added files:
/phpdoc html-locale.dsl
Modified files:
/phpdoc common.dsl.in configure.in html.dsl.in
Log:
Some languages prefer '1. chapter' instead of 'Chapter 1.', so make it happen
that way.
Index: phpdoc/common.dsl.in
diff -u phpdoc/common.dsl.in:1.4 phpdoc/common.dsl.in:1.5
--- phpdoc/common.dsl.in:1.4 Thu Jun 15 02:26:24 2000
+++ phpdoc/common.dsl.in Sat Jul 8 20:54:23 2000
@@ -1,6 +1,6 @@
;; -*- Scheme -*-
;;
-;; $Id: common.dsl.in,v 1.4 2000/06/15 09:26:24 hholzgra Exp $
+;; $Id: common.dsl.in,v 1.5 2000/07/09 03:54:23 jah Exp $
;;
;; This file contains stylesheet customization common to the HTML
;; and print versions.
@@ -23,6 +23,7 @@
(define %number-programlisting-lines% #f)
(define %linenumber-mod% 1)
(define %shade-verbatim% #t)
+(define %prefers-ordinal-label-name-format% <email protected>@)
(define (php-code code)
(make processing-instruction
Index: phpdoc/configure.in
diff -u phpdoc/configure.in:1.36 phpdoc/configure.in:1.37
--- phpdoc/configure.in:1.36 Fri Jul 7 20:38:18 2000
+++ phpdoc/configure.in Sat Jul 8 20:54:23 2000
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.36 2000/07/08 03:38:18 jah Exp $
+dnl $Id: configure.in,v 1.37 2000/07/09 03:54:23 jah Exp $
AC_INIT(global.ent)
@@ -123,6 +123,14 @@
*) PAPER_TYPE="USletter" ;;
esac
AC_SUBST(PAPER_TYPE)
+
+dnl localize order of number and element name
+dnl in some headers autogenerated by jade
+case "$LANG" in
+ hu) NUMBER_FIRST="#t" ;;
+ *) NUMBER_FIRST="#f" ;;
+esac
+AC_SUBST(NUMBER_FIRST)
dnl optionaly reduce margins to save some trees life
AC_MSG_CHECKING(for treesaving)
Index: phpdoc/html.dsl.in
diff -u phpdoc/html.dsl.in:1.4 phpdoc/html.dsl.in:1.5
--- phpdoc/html.dsl.in:1.4 Sun May 14 08:30:26 2000
+++ phpdoc/html.dsl.in Sat Jul 8 20:54:23 2000
@@ -1,13 +1,14 @@
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY docbook.dsl SYSTEM " <email protected>@" CDATA DSSSL>
<!ENTITY html-common.dsl SYSTEM "html-common.dsl">
+<!ENTITY html-locale.dsl SYSTEM "html-locale.dsl">
<!ENTITY common.dsl SYSTEM "common.dsl">
<!ENTITY version.dsl SYSTEM "version.dsl">
]>
<!--
- $Id: html.dsl.in,v 1.4 2000/05/14 15:30:26 hholzgra Exp $
+ $Id: html.dsl.in,v 1.5 2000/07/09 03:54:23 jah Exp $
HTML-specific stylesheet customization.
@@ -21,6 +22,7 @@
(define %output-dir% "html")
&html-common.dsl;
+&html-locale.dsl;
&common.dsl;
&version.dsl;
Index: phpdoc/html-locale.dsl
+++ phpdoc/html-locale.dsl
;; -*- Scheme -*-
;;
;; $Id: html-locale.dsl,v 1.1 2000/07/09 03:54:23 jah Exp $
;;
;; This file contains stylesheet customization for locale specific
;; preferences in HTML version.
;;
(define ($component-title$ #!optional (titlegi "H1") (subtitlegi "H2"))
(let* ((info (cond
((equal? (gi) (normalize "appendix"))
(select-elements (children (current-node)) (normalize "docinfo")))
((equal? (gi) (normalize "article"))
(select-elements (children (current-node)) (normalize "artheader")))
((equal? (gi) (normalize "bibliography"))
(select-elements (children (current-node)) (normalize "docinfo")))
((equal? (gi) (normalize "chapter"))
(select-elements (children (current-node)) (normalize "docinfo")))
((equal? (gi) (normalize "dedication"))
(empty-node-list))
((equal? (gi) (normalize "glossary"))
(select-elements (children (current-node)) (normalize "docinfo")))
((equal? (gi) (normalize "index"))
(select-elements (children (current-node)) (normalize "docinfo")))
((equal? (gi) (normalize "preface"))
(select-elements (children (current-node)) (normalize "docinfo")))
((equal? (gi) (normalize "reference"))
(select-elements (children (current-node)) (normalize "docinfo")))
((equal? (gi) (normalize "setindex"))
(select-elements (children (current-node)) (normalize "docinfo")))
(else
(empty-node-list))))
(exp-children (if (node-list-empty? info)
(empty-node-list)
(expand-children (children info)
(list (normalize "bookbiblio")
(normalize "bibliomisc")
(normalize "biblioset")))))
(parent-titles (select-elements (children (current-node)) (normalize "title")))
(info-titles (select-elements exp-children (normalize "title")))
(titles (if (node-list-empty? parent-titles)
info-titles
parent-titles))
(subtitles (select-elements exp-children (normalize "subtitle"))))
(make sequence
(make element gi: titlegi
(make element gi: "A"
attributes: (list (list "NAME" (element-id)))
(if (and %chapter-autolabel%
(or (equal? (gi) (normalize "chapter"))
(equal? (gi) (normalize "appendix"))))
(if %prefers-ordinal-label-name-format%
(literal (element-label (current-node)) ". "
(gentext-element-name (gi))
(gentext-label-title-sep (gi)))
(literal (gentext-element-name-space (gi))
(element-label (current-node))
(gentext-label-title-sep (gi))))
(empty-sosofo))
(if (node-list-empty? titles)
(element-title-sosofo) ;; get a default!
(with-mode title-mode
(process-node-list titles)))))
(if (node-list-empty? subtitles)
(empty-sosofo)
(with-mode subtitle-mode
(make element gi: subtitlegi
(process-node-list subtitles)))))))
(define (nav-context-sosofo elemnode)
(let* ((component (ancestor-member elemnode
(append (book-element-list)
(division-element-list)
(component-element-list))))
(context-text (inherited-dbhtml-value elemnode "context-text")))
(if (and context-text (not (string=? context-text "")))
(literal context-text)
(if (equal? (element-label component) "")
(make sequence
(element-title-sosofo component))
(make sequence
;; Special case. This is a bit of a hack.
;; I need to revisit this aspect of
;; appendixes.
(if (and (equal? (gi component) (normalize "appendix"))
(or (equal? (gi elemnode) (normalize "sect1"))
(equal? (gi elemnode) (normalize "section")))
(equal? (gi (parent component)) (normalize "article")))
(empty-sosofo)
(if %prefers-ordinal-label-name-format%
(make sequence
(element-label-sosofo component)
(literal ". " (gentext-element-name (gi component))))
(make sequence
(literal (gentext-element-name-space (gi component)))
(element-label-sosofo component))))
(literal (gentext-label-title-sep (gi component)))
(element-title-sosofo component))))))
- Next message: Thomas Schuermann: "[PHP-DOC] cvs: phpdoc /de/functions misc.xml"
- Previous message: Andrei Zmievski: "[PHP-DOC] cvs: phpdoc /en/functions strings.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

