Docbook i UTF-8

Marek Ciesielski ciesiel at toya.net.pl
Wed Feb 9 20:48:02 CET 2011


W dniu 2011-02-08 16:17, Marek Ciesielski pisze:
> W dniu 2011-02-08 15:53, Wieslaw Kierbedz pisze:
>> W dniu 08.02.2011 15:47, Marek Ciesielski anonsuje::
>>> Czy bawił się może ktoś docbookiem przy kodowaniu UTF-8 w PLD?
>>> Próbuje przekonwertować dokumentację do UTF-8 i po wszystkim, po
>>> parsowaniu dostaje:
>>>
>>> $ xmllint --valid --noout pl_book__master.docb
>>> pl_book__siec/pl_siec__dsl_neo_thompson.sec:4: element section: validity
>>> error : Syntax of value for attribute id of section is not valid
>>>          <section id="siec_dsl_neo_thompson_wst�p">
>> ^^^^^^^^^^
>> Nie wydaje mi się, żeby poza treścią wskazane było używanie diaktryków.
>> Wszystko jedno, czy w xml, czy w postscripcie, html czy visualbasicu.
>>>                                                      ^
>>>
> OK - to poprawiłem i tu nie ma problemów. Za to później:
>
> stylesheet]$ make
> rm -rf {html *.pdf *.txt *.log all.xml}
> mkdir -p html
> xsltproc --novalid copy.xsl ../pl_book__master.docb | (read xml; cat) >
> all.xml
> xspp pld-guide.xspp > style.xsl
> docbook2html -u ../../howto/pl_howto__master.docb
> Using catalogs: /etc/sgml/catalog
> Using stylesheet:
> /usr/share/sgml/docbook/utils-0.6.14/docbook-utils.dsl#html
> Working on:
> /home/users/svnpld/svnpld/PLD-doc/book/stylesheet/../../howto/pl_howto__master.docb
> jade:/home/users/svnpld/svnpld/PLD-doc/book/stylesheet/../../howto/pl_howto__master.docb:9:25:E:
> non SGML character number 133
> jade:/home/users/svnpld/svnpld/PLD-doc/book/stylesheet/../../howto/pl_wskazowki__docbook.chp:4:29:E:
> non SGML character number 153
>
> ...
>
> jade:/home/users/svnpld/svnpld/PLD-doc/book/stylesheet/../../howto/pl_howto__svn.chp:68:74:E:
> non SGML character number 135
> jade:I: maximum number of errors (200) reached; change with -E option
> make: *** [all] Błąd 8
>
>
>
>

Odpowiem sam sobie :)
Wystarczy ustawić zmienną "SP_ENCODING=UTF-8" i docbook tekstowy i html
można generować. Problemem jest jednak PDF, którego nie potrafię zmusić
do wyrenderowania (problemem jest openjade, które jest już bardzo stare
i ma prawo się sypać)
Próbowałem także renderu przez dblatexa - ten znowu ma problem z pythonem:

$ dblatex -D all.xml
Build the book set list...
Build the listings...
XSLT stylesheets DocBook - LaTeX 2e (0.3)
===================================================
Processing Revision History
Build all.pdf
Unexpected error occured
Traceback (most recent call last):
  File "/usr/share/python2.7/site-packages/dbtexmf/core/dbtex.py", line
332, in compile
  File "/usr/share/python2.7/site-packages/dbtexmf/core/dbtex.py", line
399, in _compile
  File "/usr/share/python2.7/site-packages/dbtexmf/core/dbtex.py", line
317, in make_bin
  File "/usr/share/python2.7/site-packages/dbtexmf/dblatex/runtex.py",
line 113, in compile
  File
"/usr/share/python2.7/site-packages/dbtexmf/dblatex/grubber/texbuilder.py",
line 71, in compile
  File
"/usr/share/python2.7/site-packages/dbtexmf/dblatex/grubber/maker.py",
line 240, in make
  File
"/usr/share/python2.7/site-packages/dbtexmf/dblatex/grubber/maker.py",
line 106, in make
  File
"/usr/share/python2.7/site-packages/dbtexmf/dblatex/grubber/latex.py",
line 152, in run
  File
"/usr/share/python2.7/site-packages/dbtexmf/dblatex/grubber/latex.py",
line 214, in compile
  File "/usr/share/python2.7/subprocess.py", line 486, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/share/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)
  File "/usr/share/python2.7/subprocess.py", line 1202, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
--------------------------------------------------------


Ma ktoś może propozycję odnośnie generowania w miarę bezproblemowego z
docbooka (utf-8) do PDFa

-- 
				Marek Ciesielski

   \  |  ___|
  |\/ | |     marekc(at)klub.chip.pl; PLD Team
  |   | |     ciesiel(at)jabber.mc.ptja.pl; GG: 3809029
  |   | |     http://klub.chip.pl/mc_540ddc
 _|  _|\____|



More information about the pld-devel-pl mailing list