DSSSL

Jirka Kosek jirka na kosek.cz
Pátek Únor 7 15:47:16 CET 2003


Radek Budař wrote:

>  - pri cislovani kapitol (define %chapter-autolabel%  #t) se mi dotahuje i
> slovo  'Kapitola' - chtel bych ocislovat, ale bez tohoto slova, jde to
> nejak? Myslel jsme na upravu souboru  cs.xml, respektive vlozit tuto upravu
> do uzivatelske zmeny lokalizace, ale nasel jsme navod jak toho dosahnout v
> XSL, co ale DSSSL?

http://www.kosek.cz/xml/db/dsssl.html#d0e2395

Nadpisy se opraví obdobně, jen se nemění obsah seznamu cs-xref-strings
ale cs-element-name, konkrétně v něm musíte opravit řádek:

 (list (normalize "chapter")		"")

>  - potreboval bych odstranit zahlavi, kam je generovan vzdy nazev kapitoly,
> bud bych ho rad presunul na spodek straneky, nebo ho uplne odstranil. Myslel
> jsem na nastavebin (define bop-footnotes    #t), ale to mi se zahlavim
> naprosto nic nedela

A co zkusit

(define %chap-app-running-heads% #f) 

snad je to ono.
 
>  - dalsim probleme je cislovani obrazku. Potreboval bych, aby se cislovaly
> kontinualne a ne ve formatu 'cislo kapitoly' - 'cislo obrazku v ramci
> kapitoly', ale nikde v DSSSL jsme nenasel nastaveni, ktere by to mohlo
> ridit...

Zkuste následující definici přidat stylu s úpravami:

(define (block-autolabel nd #!optional (force-label? #f))
  (let* ((chn    (element-label (ancestor (normalize "chapter") nd)))
	 (apn    (element-label (ancestor (normalize "appendix") nd)))
	 (rfn    (element-label (ancestor (normalize "refentry") nd)))
	 ;; If the root of this document isn't in component-element-list, these
	 ;; things all wind up being numbered 0. To avoid that, we force the
	 ;; root element to be in the list of components if it isn't already
	 ;; a component.
	 (incomp (member (gi (sgml-root-element)) (component-element-list)))
	 ;; In articles in books, number blocks from book not from article.
	 ;; Otherwise you get 1, 1, 1, 1, etc. for the first figure in each
	 ;; article.
	 (artinbook (and (not (node-list-empty? (ancestor (normalize "article")
nd)))
			 (not (node-list-empty? (ancestor (normalize "book") nd)))))

	 (bkn    (if artinbook
		     (format-number (component-child-number
				     nd
				     (list (normalize "book")))
				    (label-number-format nd))
		     (if incomp
			 (format-number (component-child-number
					 nd
					 (list (normalize "book")))
					(label-number-format nd))
			 (format-number (component-child-number
					 nd
					 (append (list (normalize "book"))
						 (list (gi (sgml-root-element)))))
					(label-number-format nd))))))
    (if (equal? chn "")
	(if (equal? apn "")
	    (if (equal? rfn "")
		bkn
		(string-append rfn (gentext-intra-label-sep nd) bkn))
	    (string-append apn (gentext-intra-label-sep nd) bkn))
	(string-append chn (gentext-intra-label-sep nd) bkn))))


-- 
-----------------------------------------------------------------
  Jirka Kosek  	                     
  e-mail: jirka na kosek.cz
  http://www.kosek.cz


Další informace o konferenci Docbook