public inbox for docbook-tools-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Horacio MG <homega@ciberia.es>
To: docbook-tools-discuss@sourceware.cygnus.com
Subject: QandA: nesting questions
Date: Wed, 27 Dec 2000 06:36:00 -0000	[thread overview]
Message-ID: <20000705173828.A2399@ciberia.es> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3327 bytes --]

Hello,

I'm converting a FAQ to DocBook using <book> and <qandaset>.

Instead of having it all in one sgml file I split the sources into
various <chapter>'s.  Please, bear with me through the example.  I'll
write the questions in between <!-- --> comments.

---------- Main file (faq.sgml) ----------

  <!DOCTYPE BOOK PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
  ... some entities ...
  <!ENTITY intro SYSTEM "intro.sgm">
  <!ENTITY resources SYSTEM "resources.sgm">
  ]>

<book>
<bookinfo>

<graphic format="ps" align="center" fileref="../images/image"></graphic>

<!-- problems with graphic are:
1) I can't make it show above the title or to the left of the title
centering the title.  Is this possible?
2) db2html produces an html output with the graphic included (in
book1.html: SRC="../images/image.gif"), wheras db2ps (or db2pdf) don't
include the graphic at all (in faq.tex: {../images/image.eps}).  Now,
this is weird as images/image is a file converted to ps, so how can I
see with html an inexistant file?  and how can I make the ps graphic
show on ps or pdf without fiddling with the latex source?
-->

<title>...</title>

<abstract>

<para>...</para>

... some different types of lists: <itmezidelist> <glosslist>
<simplelist> ...

</abstract>
</bookinfo>

&intro.sgm
&resources.sgm

</book>

---------- end ----------


---------- resources.sgm ----------

<chapter id="resources" xreflabel="2">

<title>...</title>

<graphic format="ps" align="center" fileref="../images/image"></graphic>

<qandaset id="info" defaultlabel="number">
<qandadiv>
<qandaentry>
<question>...</question>
<answer>...</answer>
</qandaentry>

<!-- so far so good, except for the numbering scheme which I'll comment
at the end.  But now I need to nest some Q&As -->

<qandaentry>
<question>...</question>
<answer>...</answer>

<!-- and the next Q&As I want them to be subquestion within the previous
question, so I don't close the </qandaentry> tag until (*), and instead
I open a <qandadiv> tag -->

<qandadiv>
<qandaentry>
<question>...</question>
</answer>...</answer>
</qandaentry>

<qandaentry>
<question>...</question>
</answer>...</answer>
</qandaentry>
</qandadiv>
</qandaentry> (*)

</qandaset>
</chapter>

<!-- ok, I've tried several other ways, but none seems to work.  Well,
it does work, but still get the parsing error:

jade:../resourcex.sgm:332:21:E: document type does not allow element
"QANDADIV" here

which I assume means that I should be using <article class="faq">
instead of <book>, but that gives me the same error and doesn't allow me
to have the html output nicely split as with <book> -->
----------- end -----------

The problem with the numbering scheme is that while I get a chapter 1,
and all Q&As within that chapter numbered 1.1, 1.2, 1.3, 1.4, ..., then
on chapter 2 I get again Q&As numbered as 1.1, 1.2, 1.3, and the q&a's
nested within 1.3 are numbered 1.1.1, 1.1.2, ...

how can I have Q&As in chapter 2 (and subsequent chaps) numbered as 2.x,
and how can I have nested q&a's with the numbering scheme:
[chapter].[Q&A].1, [chapter].[Q&A].2, ...  ??


Thank you for your patience,

-- 
Horacio					Anno MMDCCLIII A.U.C.
hacho@crosswinds.net			Valencia - ESPAÑA
--------------------------------------------------------------------
Key fingerprint = F4EE AE5E 2F01 0DB3 62F2  A9F4 AD31 7093 4233 7AE6

                 reply	other threads:[~2000-12-27  6:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000705173828.A2399@ciberia.es \
    --to=homega@ciberia.es \
    --cc=docbook-tools-discuss@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).