On Tue, 14 Aug 2007, John R. Culleton wrote:
On Monday 13 August 2007, Aditya Mahajan wrote:
On Mon, 13 Aug 2007, John R. Culleton wrote:
I am trying to run a bunch of docbook files related to Krita. The convention in these files seems to be to prefix subordinate file names with an & character.
I do not understand what you mean by this. Can you post a sample text?
If I run e.g, texexec index.docbook it blows up on the first such ampersand. I can of course edit all the files to replace & with \& but I wonder if there is a better strategy?
AFAIU XML, having a lone & in the file is not valid. You need to have & if you want ampersand. Any other entity (&something;) should be appropriately defined by some style file.
I also tried the various "docbook2xxx" style utilities but they all failed to produce meaningful results.
Is it a valid xml file? Is it a valid docbook file? Do the utilities work with simple sample files.
All I want to do is read the #$% files!
Did you try db2latex? It comes with db2context which handles a large subset of docbook specifications.
I will look up db2latex, download it, and try it. But of course I would prefer a Context solution if possible.
Sorry. I was wrong about the name. I meant dblatex (http://dblatex.sourceforge.net/) which has dbcontext, so you can get a context solution.
Here is some code from the file titled "index.docbook" in the above mentioned set of files: ------------------ <?xml version="1.0" ?>
To me this means that this is not DocBook but a variant of docbook. Which explains why most docbook2xx utilities were failing on it.
<!ENTITY kappname "&krita;"> <!ENTITY package "koffice"> <!ENTITY % addindex "IGNORE"> <!ENTITY % English "INCLUDE"> <!ENTITY introduction SYSTEM "introduction.docbook"> <!ENTITY tutorial SYSTEM "tutorial.docbook"> <!ENTITY tutorial-starting SYSTEM "tutorial-starting.docbook"> <!ENTITY tutorial-select-layer SYSTEM "tutorial-select-layer.docbook"> <!ENTITY tutorial-quick-starts SYSTEM "tutorial-quick-starts.docbook"> <!ENTITY tutorial-tablet SYSTEM "tutorial-tablet.docbook"> <!ENTITY images SYSTEM "using-images.docbook"> <!ENTITY views SYSTEM "using-views.docbook"> <!ENTITY layers SYSTEM "using-layers.docbook"> <!ENTITY selections SYSTEM "using-selections.docbook"> <!ENTITY filters SYSTEM "using-filters.docbook"> <!ENTITY colorspaces SYSTEM "using-colorspaces.docbook"> <!ENTITY commands SYSTEM "commands.docbook"> <!ENTITY commands-toolbars SYSTEM "commands-toolbars.docbook"> <!ENTITY commands-palettes SYSTEM "commands-palettes.docbook"> <!ENTITY commands-menus SYSTEM "commands-menus.docbook"> <!ENTITY commands-dialogs SYSTEM "commands-dialogs.docbook"> <!ENTITY settings SYSTEM "settings.docbook"> <!ENTITY developers SYSTEM "developers.docbook"> <!ENTITY developers-scripting SYSTEM "developers-scripting.docbook"> <!ENTITY developers-plugins SYSTEM "developers-plugins.docbook"> <!ENTITY faq SYSTEM "faq.docbook"> <!ENTITY credits SYSTEM "credits.docbook"> <!ENTITY installation SYSTEM "installation.docbook"> ]>
<book lang="&language;">
<bookinfo> <title>The &krita; Handbook</title> ----------snip-------------------------------- ----------------------------------------------
I don't know enough about docbook to determine the validity of any of the above. There is a subdirectory called "common" that contains style files with css suffix but I don't have the foggiest notion of which to use or how to include them into a translation of the document.
Regarding &krita; you can make context recognize them by using \definexmlentity. See xtag-ent for entities that are already defined. Also see the Hans's XML manual http://www.pragma-ade.com/general/manuals/example.pdf. However writing the code to do everything from scratch will be a lot of work. Best is to figure out what is the difference between this variant and docbook, and add those definitions to dbcontext. Or perhaps, if the document is simple, remove all the xml tags and add tex/context tags manually. Aditya