Hi, I'm trying to write a small article using lyx with the "DocBook article (SGML)" class, with dissapointing results. I can view as dvi, postscript or pdf; but the TOC and the images fail to be produced. I can not even view as html, no file. However, I can export to sgml (or DocBook), and from that file manually export to html using "docbook2html texto.sgml" on a console, and I get better results: at least the html files are produced. The TOC is there, but the images lack the extension on their names, so that the html files have to be manually edited. Using "sgml2html texto.sgml" produces the same bad results. But there is worse. The html production stops, as the conversion complains with: jade:I: maximum number of errors (200) reached; change with -E option and the html document stays incomplete. Thus, I edited the file "/usr/share/sgml/docbook/utils-0.6.6/backends/html" and changed a line; it said: $SGML_JADE -t sgml $SGML_ARGUMENTS it reads now: $SGML_JADE -E 500 -t sgml $SGML_ARGUMENTS So now the document is fully parsed, but with many errors; it begins as follows: jade:/home/cer/lyx/texto.sgml:1:58:W: cannot generate system identifier for public te xt "-//OASIS//DTD DocBook V4.1//EN" jade:/home/cer/lyx/texto.sgml:1:58:E: reference to entity "ARTICLE" for which no system identifier could be generated jade:/home/cer/lyx/texto.sgml:1:0: entity was defined here jade:/home/cer/lyx/texto.sgml:1:58:E: DTD did not contain element declaration for document type name jade:/home/cer/lyx/texto.sgml:3:14:E: there is no attribute "LANG" jade:/home/cer/lyx/texto.sgml:3:18:E: element "ARTICLE" undefined jade:/home/cer/lyx/texto.sgml:5:12:E: element "ARTICLEINFO" undefined jade:/home/cer/lyx/texto.sgml:5:19:E: element "TITLE" undefined [etc] Using openjade as parser yields the same: openjade:/home/cer/lyx/texto.sgml:1:58:W: cannot generate system identifier for public text "-//OASIS//DTD DocBook V4.1//EN" openjade:/home/cer/lyx/texto.sgml:1:58:E: reference to entity "ARTICLE" for which no system identifier could be generated openjade:/home/cer/lyx/texto.sgml:1:0: entity was defined here openjade:/home/cer/lyx/texto.sgml:1:58:E: DTD did not contain element declaration for document type name openjade:/home/cer/lyx/texto.sgml:3:14:E: there is no attribute "LANG" openjade:/home/cer/lyx/texto.sgml:3:18:E: element "ARTICLE" undefined openjade:/home/cer/lyx/texto.sgml:5:12:E: element "ARTICLEINFO" undefined openjade:/home/cer/lyx/texto.sgml:5:19:E: element "TITLE" undefined openjade:/home/cer/lyx/texto.sgml:5:77:E: element "AUTHOR" undefined openjade:/home/cer/lyx/texto.sgml:5:99:E: element "ABSTRACT" undefined openjade:/home/cer/lyx/texto.sgml:5:105:E: element "PARA" undefined openjade:/home/cer/lyx/texto.sgml:5:218:E: element "PARA" undefined openjade:/home/cer/lyx/texto.sgml:5:223:E: element "TOC" undefined openjade:/home/cer/lyx/texto.sgml:6:6:E: element "SECT1" undefined openjade:/home/cer/lyx/texto.sgml:6:13:E: element "TITLE" undefined [etc] So I guess there is something very wrong on some package. It recognizes nothing! :-/ My system is Suse 7.3, but I remember I tried with 7.1 with similar results. Lyx was 1.1.6fix2; with this version, I could not even see images inside lyx, so I updated from sources to lyx-1.2.1; this version has some improvements, but the end result is mostly the same: the errors must be related to docbook or jade itself. What do you think? Package versions: docbook-dsssl-stylesheets-1.72-34 docbook-utils-0.6.6-67 docbook-xml-website-2.0a2-13 docbook-xsl-stylesheets-1.42-21 docbook_3-3.1-83 docbook_4-4.1-83 docbook-utils-0.6.6-67 jade_dsl-1.2.1-355 openjade-1.3-275 te_latex-1.0.7-285 lyx-1.2.1-1 -- Cheers, Carlos Robinson
On Sunday 06 October 2002 02:42 pm, Carlos E. R. wrote:
Hi,
I'm trying to write a small article using lyx with the "DocBook article (SGML)" class, with dissapointing results.
I can view as dvi, postscript or pdf; but the TOC and the images fail to be produced. I can not even view as html, no file.
However, I can export to sgml (or DocBook), and from that file manually export to html using "docbook2html texto.sgml" on a console, and I get better results: at least the html files are produced. The TOC is there, but the images lack the extension on their names, so that the html files have to be manually edited. Using "sgml2html texto.sgml" produces the same bad results.
But there is worse. The html production stops, as the conversion complains with:
jade:I: maximum number of errors (200) reached; change with -E option
and the html document stays incomplete. Thus, I edited the file "/usr/share/sgml/docbook/utils-0.6.6/backends/html" and changed a line; it said:
$SGML_JADE -t sgml $SGML_ARGUMENTS
it reads now:
$SGML_JADE -E 500 -t sgml $SGML_ARGUMENTS
So now the document is fully parsed, but with many errors; it begins as follows:
I know this isn't the answer you asked for, but IMO, LyX isn't the thing to be using. Learn to work with XEmacs + psgml. http://www.sagehill.net/xml/docbookxsl/ Yes this means looking at tags and not exactly WYSIWYM, but, take my advice, I've attempted both. The XEmacs is the better solution. This will also work with Emacs. I prefer XEmacs because of the package management features, and because people who use XEmacs are just cooller. STH
El 02.10.06 a las 21:04, Steven T. Hatton escribió:
Date: Sun, 6 Oct 2002 21:04:26 -0400 From: Steven T. Hatton <hattons@speakeasy.net> To: suse-linux-e@suse.com Subject: Re: [SLE] Lyx and docbook
[...]
$SGML_JADE -E 500 -t sgml $SGML_ARGUMENTS
So now the document is fully parsed, but with many errors; it begins as follows:
I know this isn't the answer you asked for, but IMO, LyX isn't the thing to be using. Learn to work with XEmacs + psgml.
http://www.sagehill.net/xml/docbookxsl/
Yes this means looking at tags and not exactly WYSIWYM, but, take my advice, I've attempted both. The XEmacs is the better solution. This will also work with Emacs. I prefer XEmacs because of the package management features, and because people who use XEmacs are just cooller.
Ugh! Thanks, but no. I don't like emacs. The first editor I ever used was wordstar on a cpm machine, and later on a two floppy PC. I loved it. Anything different, I don't quite like it, and emacs is way too different (the UI). I know it is very good, I won't deny that. It's simply I don't like it O:-) It must be some package of config file that suse didn't write right. I'm sure it worked for the people that designed lyx. -- Cheers, Carlos Robinson
* Carlos E. R.; <robin1.listas@tiscali.es> on 06 Oct, 2002 wrote:
I can view as dvi, postscript or pdf; but the TOC and the images fail to be produced. I can not even view as html, no file.
However, I can export to sgml (or DocBook), and from that file manually export to html using "docbook2html texto.sgml" on a console, and I get better results: at least the html files are produced. The TOC is there, but the images lack the extension on their names, so that the html files have to be manually edited. Using "sgml2html texto.sgml" produces the same bad results.
1) use db2html ( comes with docbook-toys
But there is worse. The html production stops, as the conversion complains with:
jade:I: maximum number of errors (200) reached; change with -E option
this will disappear when you use db2html
So now the document is fully parsed, but with many errors; it begins as follows:
jade:/home/cer/lyx/texto.sgml:1:58:W: cannot generate system identifier for public te xt "-//OASIS//DTD DocBook V4.1//EN" jade:/home/cer/lyx/texto.sgml:1:58:E: reference to entity "ARTICLE" for which no system identifier could be generated jade:/home/cer/lyx/texto.sgml:1:0: entity was defined here jade:/home/cer/lyx/texto.sgml:1:58:E: DTD did not contain element declaration for document type name jade:/home/cer/lyx/texto.sgml:3:14:E: there is no attribute "LANG" jade:/home/cer/lyx/texto.sgml:3:18:E: element "ARTICLE" undefined jade:/home/cer/lyx/texto.sgml:5:12:E: element "ARTICLEINFO" undefined jade:/home/cer/lyx/texto.sgml:5:19:E: element "TITLE" undefined [etc]
use SGML_CATALOG_FILES hint (look at /etc/profile.d/jade_dsl.sh /etc/profile.d/sp.sh) Note that ftp.gwdg.de/pub/suse/people/ke has some updated packages for docbook those may help toget better results HTH -- Togan Muftuoglu Unofficial SuSE FAQ Maintainer http://dinamizm.ath.cx
El 02.10.07 a las 08:49, Togan Muftuoglu escribió:
Date: Mon, 7 Oct 2002 08:49:43 +0300 From: Togan Muftuoglu <toganm@dinamizm.com> To: suse-linux-e@suse.com Subject: Re: [SLE] Lyx and docbook
have to be manually edited. Using "sgml2html texto.sgml" produces the same bad results.
1) use db2html ( comes with docbook-toys
Perfect! Marvelous! Ie, it works. 8-) Well, almost, it forgot to copy my images to the result directory. I had db2html installed (docbktls-0.60.1-47.rpm), but I did not remember. By the way, the images do not work because when lyx export as sgml it clips the extension of the name: <!ENTITY graph1001 "photosnap"> ]> I edit is to read "photosnap.png" and then the html contains a reference to "photosnap.gif" instead. That's weird... And once I got the image in the pdf, but no more.
jade:/home/cer/lyx/texto.sgml:3:14:E: there is no attribute "LANG" jade:/home/cer/lyx/texto.sgml:3:18:E: element "ARTICLE" undefined jade:/home/cer/lyx/texto.sgml:5:12:E: element "ARTICLEINFO" undefined jade:/home/cer/lyx/texto.sgml:5:19:E: element "TITLE" undefined [etc]
use SGML_CATALOG_FILES hint (look at /etc/profile.d/jade_dsl.sh /etc/profile.d/sp.sh)
Well, with db2html there are no error messages, just some warnings about the toc not allowed there. It's funy, the html contains a TOC, but not the pdf. I suppose the catalogs you mention are links in /usr/share/sgml, pointing to files in /var/lib/sgml, like: /usr/share/sgml/CATALOG.docbook_4 -> ../../../var/lib/sgml/CATALOG.docbk41 I edited the line in /etc/profile.d/sp.sh, that was: # export SGML_CATALOG_FILES=$HOME/sgml/CATALOG:/etc/sgml/CATALOG:/usr/share/sgml/CATALOG export SGML_CATALOG_FILES=$HOME/sgml/CATALOG:/etc/sgml/CATALOG:/usr/share/sgml/ but sgml2htm keeps producing those errors. I have just seen an entry in the sdb about that, but it refers to suse 8.0, I'm not sure it applies.
Note that ftp.gwdg.de/pub/suse/people/ke has some updated packages for docbook those may help toget better results
I'll have a look; I don't know if they will work with suse 7.3, or perhaps I should wait till I update to 8.1, perhaps next month. Well, thank you for your help! At least, I can get the html working. -- Cheers, Carlos Robinson
* Carlos E. R.; <robin1.listas@tiscali.es> on 08 Oct, 2002 wrote:
Perfect! Marvelous! I had db2html installed (docbktls-0.60.1-47.rpm), but I did not remember.
clips the extension of the name:
<!ENTITY graph1001 "photosnap"> ]>
I edit is to read "photosnap.png" and then the html contains a reference to "photosnap.gif" instead. That's weird...
by default db2html uses *filename_you_work.dsl* and if it cn not find it, then switches to /usr/share/sgml:docbook/docbook-toys/suse-both.dsl you may need to adjust it to your needs. (this one is used by html and print)
Note that ftp.gwdg.de/pub/suse/people/ke has some updated packages for docbook those may help toget better results
I'll have a look; I don't know if they will work with suse 7.3, or perhaps I should wait till I update to 8.1, perhaps next month.
They should as I have been using them since 7.2 and 8.0 and there are some bug fixes both with the dssl stylesheets and the docbook-toys -- Togan Muftuoglu Unofficial SuSE FAQ Maintainer http://dinamizm.ath.cx
El 02.10.08 a las 08:14, Togan Muftuoglu escribió:
Date: Tue, 8 Oct 2002 08:14:19 +0300 From: Togan Muftuoglu <toganm@dinamizm.com> To: suse-linux-e@suse.com Subject: Re: [SLE] Lyx and docbook
I edit is to read "photosnap.png" and then the html contains a reference to "photosnap.gif" instead. That's weird...
by default db2html uses *filename_you_work.dsl* and if it cn not find it, then switches to /usr/share/sgml:docbook/docbook-toys/suse-both.dsl you may need to adjust it to your needs. (this one is used by html and print)
¡YES! ¡It works! 8-) There was a line that said "(define %graphic-default-extension% "gif")" (or "eps" for print) and I changed it to "(define %graphic-default-extension% "png")". Now both pdf and html have the images. Well... I'll have to decide whether to make that change global or only local. And then find where the TOC should be, so that it doesn't complain.
Note that ftp.gwdg.de/pub/suse/people/ke has some updated packages for docbook those may help toget better results
I'll have a look; I don't know if they will work with suse 7.3, or perhaps I should wait till I update to 8.1, perhaps next month.
They should as I have been using them since 7.2 and 8.0 and there are some bug fixes both with the dssl stylesheets and the docbook-toys
Ah, then I'll definitely shall have a look. -- Cheers, Carlos Robinson
* Carlos E. R.; <robin1.listas@tiscali.es> on 10 Oct, 2002 wrote:
it, then switches to /usr/share/sgml:docbook/docbook-toys/suse-both.dsl you may need to adjust it to your needs. (this one is used by html and print)
¡YES! ¡It works! 8-)
There was a line that said "(define %graphic-default-extension% "gif")" (or "eps" for print) and I changed it to "(define %graphic-default-extension% "png")". Now both pdf and html have the images. Well... I'll have to decide whether to make that change global or only local. And then find where the TOC should be, so that it doesn't complain.
Glad that it works welcome to the joys of SGML/XML world. Just copy that stylesheet to your $HOME/directory with any name you want and that start playing with that just remember to run db2html -s directory/your_modified.dsl Document.sgml db2pdf -s directory/your_modified.dsl Document.sgml Should work for TOC IIRC Lyx adds something like <toc></toc> which is unnecessary just remove them let DSSL stylesheets do the work for the TOC actuall the index also :-) -- Togan Muftuoglu Unofficial SuSE FAQ Maintainer http://dinamizm.ath.cx
The 02.10.11 at 21:20, Togan Muftuoglu wrote:
%graphic-default-extension% "png")". Now both pdf and html have the images. Well... I'll have to decide whether to make that change global or only local. And then find where the TOC should be, so that it doesn't complain.
Glad that it works welcome to the joys of SGML/XML world. Just copy that stylesheet to your $HOME/directory with any name you want and that start playing with that just remember to run
db2html -s directory/your_modified.dsl Document.sgml db2pdf -s directory/your_modified.dsl Document.sgml
I'll try that.
Should work for TOC IIRC Lyx adds something like <toc></toc> which is unnecessary just remove them let DSSL stylesheets do the work for the TOC actuall the index also :-)
I removed my toc entry, and that stops db2pdf complaining, yes. But I still get no TOC in the pdf (I do get it in html). It also complains about: WARNING!! patterns for spanish not in format file WARNING!! - add them in language.dat and rebuild I'll wait till I get the updates; by the way, I could not find them in "ftp.gwdg.de/pub/suse/people/ke", but in "ftp.suse.com/pub/people/ke/" instead, which is slower. I'm trying to download them in chunks (I only have a V90 modem), so it will take some time. I run a script with commands like: wget --timeout=45 --waitretry=10 --continue ftp://anonymous:cerobinson@teleline.es@ftp.suse.com/pub/people/ke/openjade-1.3.1-107.i386.rpm and kill it when I kill the connection. It takes longer, but I don't keep the phone line busy for hours. -- Cheers, Carlos Robinson
* Carlos E. R.; <robin1.listas@tiscali.es> on 13 Oct, 2002 wrote:
Should work for TOC IIRC Lyx adds something like <toc></toc> which is unnecessary just remove them let DSSL stylesheets do the work for the TOC actuall the index also :-)
I removed my toc entry, and that stops db2pdf complaining, yes. But I still get no TOC in the pdf (I do get it in html). It also complains about:
check the whatever.dsl you are using to see if they are enabled for print output.
WARNING!! patterns for spanish not in format file WARNING!! - add them in language.dat and rebuild
Just a guess this is TeX complaining it should be somehere in /etc/texmf/ files This could be related to the hyphenation also see if also happens with hyphenation disabled. and then rebuild the TeX format files . That is the best I can say as TeX is something I have no idea
I'll wait till I get the updates; by the way, I could not find them in "ftp.gwdg.de/pub/suse/people/ke", but in "ftp.suse.com/pub/people/ke/" like:
Sorry the correct url is ftp://ftp.gwdg.de/pub/linux/suse/ftp.suse.com/people/ke/ -- Togan Muftuoglu Unofficial SuSE FAQ Maintainer http://dinamizm.ath.cx
Remember we were talking about docbook a month ago? :-) The 02.10.07 at 08:49, Togan Muftuoglu wrote:
* Carlos E. R.; <robin1.listas@tiscali.es> on 06 Oct, 2002 wrote:
I can view as dvi, postscript or pdf; but the TOC and the images fail to be produced. I can not even view as html, no file.
However, I can export to sgml (or DocBook), and from that file manually export to html using "docbook2html texto.sgml" on a console, and I get better results: at least the html files are produced. The TOC is there, but the images lack the extension on their names, so that the html files have to be manually edited. Using "sgml2html texto.sgml" produces the same bad results.
1) use db2html ( comes with docbook-toys
I have found one of the problems in sgmltools reading the howto (/usr/share/doc/howto/en/html/mini/DocBook-Install/using.html). It seems that sgmltools needs some environment variables: cer@nimrodel:~/lyx> set |grep sgml SGML_CATALOG_FILES=/home/cer/sgml/CATALOG:/etc/sgml/CATALOG:/usr/share/sgml/ But that is incorrect. It must list ALL the catalog files, one by one, not the directories. Thus, if I run a script like: SGML_CATALOG_FILES=$SGML_SHARE/CATALOG.db3sxml for FILES in CATALOG.docbk31 CATALOG.docbook-xml-website \ CATALOG.html CATALOG.iso_ent \ CATALOG.db3xml CATALOG.docbk41 CATALOG.docbook_3 \ CATALOG.html-3.2 CATALOG.jade_dsl CATALOG.db41xml \ CATALOG.docbkdsl CATALOG.docbook_4 CATALOG.html-4.0 \ CATALOG.sgmltools CATALOG.docbk30 \ CATALOG.docbook-dsssl-stylesheets CATALOG.gnome \ CATALOG.html-4.01 do SGML_CATALOG_FILES=$SGML_CATALOG_FILES:$SGML_SHARE/$FILES done export SGML_CATALOG_FILES sgmltools -b dvi howto.sgml (or lyx directly) Then it runs - at least it doesn't complain so much - but I will not say it works, not quite. :-( Also, the catalog for sgmltools is missing: a link named "CATALOG.sgmltools" must be created in "/usr/share/sgml and /var/lib/sgml/" to "/usr/share/sgml/stylesheets/sgmltools/sgmltools.cat" That's not all. The catalog file itself is wrong. It contains lines like: PUBLIC "-//SGMLtools//DOCUMENT Docbook Style Sheet for Print//EN" print.dsl that have to be changed to: PUBLIC "-//SGMLtools//DOCUMENT Docbook Style Sheet for Print//EN" /usr/share/sgml/stylesheets/sgmltools/print.dsl (in a single line) That's not all. Openjade complains of not begin able to find "/usr/share/sgml/jade_dsl/xml.dcl", which certainly does not exist, only xml.decl. So a symlink is in order... apparently: "sgmltools -b dvi test.sgml" complains with a "broken pipe". Go figure :-( Well... it's better, but still fails a lot. At least, I can view dvi or pdf form inside lyx, because that was failing. I'll continue using db2*, as you told me :-) It seems to me that the sgmltools are very broken in suse 7.3... I wonder if they ever tested it :-? I'll check when I update to 8.1 soon what happens. -- Cheers, Carlos Robinson
* Carlos E. R.; <robin1.listas@tiscali.es> on 05 Nov, 2002 wrote:
Remember we were talking about docbook a month ago? :-)
The 02.10.07 at 08:49, Togan Muftuoglu wrote:
* Carlos E. R.; <robin1.listas@tiscali.es> on 06 Oct, 2002 wrote:
I can view as dvi, postscript or pdf; but the TOC and the images fail to be produced. I can not even view as html, no file.
However, I can export to sgml (or DocBook), and from that file manually export to html using "docbook2html texto.sgml" on a console, and I get better results: at least the html files are produced. The TOC is there, but the images lack the extension on their names, so that the html files have to be manually edited. Using "sgml2html texto.sgml" produces the same bad results.
1) use db2html ( comes with docbook-toys
I have found one of the problems in sgmltools reading the howto (/usr/share/doc/howto/en/html/mini/DocBook-Install/using.html). It seems that sgmltools needs some environment variables:
/etc/profile.d/sp.sh /etc/profile.d/jade_dsl.sh They are commented by default so uncomment them and your SGML variables are set including jade :-)
It seems to me that the sgmltools are very broken in suse 7.3... I wonder if they ever tested it :-? I'll check when I update to 8.1 soon what happens.
They are sure at least I have been using them since 7.2 and had not had a problem (except Turkish language support which was fixed by me adding the translations and fixing the db2x.sh for the correct SP_ENCODING you may get the newer versions from your_favorite_mirror/ftp.suse.com/people/ke and if you want to use Lyx with Docbook check http://bgu.chez.tiscali.fr/doc/db4lyx/index.html -- Togan Muftuoglu Unofficial SuSE FAQ Maintainer http://dinamizm.ath.cx
Togan Muftuoglu wrote:
I have found one of the problems in sgmltools reading the howto (/usr/share/doc/howto/en/html/mini/DocBook-Install/using.html). It seems that sgmltools needs some environment variables:
/etc/profile.d/sp.sh /etc/profile.d/jade_dsl.sh They are commented by default so uncomment them and your SGML variables are set including jade :-)
Ah! I'll try that, perhaps tomorrow :-) But it doesn't agree with the howto. My sp.sh file has: export SGML_CATALOG_FILES=$HOME/sgml/CATALOG:/etc/sgml/CATALOG:/usr/share/sgml/ and that I can asure you it desn't work here. Acording to the howto, It has got to list every individual catalog file, like: export SGML_CATALOG_FILES=/usr/share/sgml/CATALOG.db3sxml:/usr/share/sgml/CATALOG. db41xml:..... etc One by one. If that is not done, at least "-//SGMLtools//DOCUMENT Docbook Style Sheet for Print//EN" is not found. I have found another place to look at, /etc/sgml/*. Perhaps the problem is that /etc/sgml/CATALOG does not list all of them. Any way, it doesn't matter much, I intend to upgrade to suse 8.1 soon.
It seems to me that the sgmltools are very broken in suse 7.3... I wonder if they ever tested it :-? I'll check when I update to 8.1 soon what happens.
They are sure at least I have been using them since 7.2 and had not had a problem (except Turkish language support which was fixed by me adding the translations and fixing the db2x.sh for the correct SP_ENCODING
Well... I don't know. It hasn't fully worked for me straight from the box. I think I tried with su7.1 and lyx failed to work well with docbook, so I used the normal article style instead at the time.
you may get the newer versions from your_favorite_mirror/ftp.suse.com/people/ke
Yes, I did. Perhaps I missed some file(s). I'll recheck.
and if you want to use Lyx with Docbook check http://bgu.chez.tiscali.fr/doc/db4lyx/index.html
[...] Good, I have just downloaded it, complete with sources. Wonderfull :-) Now lets hope somebody invents a way to take electronic reading to the bed - holding a PC there is cumbersome and noisy for late night reading X-)
participants (4)
-
Carlos E. R
-
Carlos E. R.
-
Steven T. Hatton
-
Togan Muftuoglu