Re: [docbook] PDF Convertion faults

View: New views
20 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [docbook] PDF Convertion faults

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[moving this over to the docbook-apps mailing list where such issues are
discussed]

Hi,
Some comments below.

----- Original Message -----
From: "fingerli" <MICHAEl.finger@...>
To: <docbook@...>
Sent: Monday, March 10, 2008 5:53 AM
Subject: [docbook] PDF Convertion faults


>
> HI @ all
>
> There are some faults by converting my file (with docbook 5.0) into pdf.
> The
> following are:
>
> - links on external homepages doesn't work. i create them this way:
>
> <link xl:href="www.google.ch">Google</link>

This works when I try it.  Does your XML file declare the xl namespace?

> - there is no breakup

I don't understand what you mean by "breakup".

> - the tables are illegal ( table-layout="auto")

Most tables are assigned table-layout="fixed", but there are a few layout
tables for certain elements generated by the stylesheet that don't have a
table-layout property.  That is a deficiency of the stylesheet, but FOP
still processes them as "fixed" after complaining about them.

> - some pages produce an overflow

FOP still has some bugs like that.  Turning off keep-together on tables
seems to help.

> - the formatting with CSS doesn't work. Is this because the FOP can't read
> CSS?

That's correct.

Bob Stayton
Sagehill Enterprises
bobs@...




---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


indexterm and FOP

by Emmanuel Bégué-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

The docbook DTD allows the element indexterm as a direct
child of section or chapter; however, if we do that, the
index is correctly built by the stylesheets, but the target
elements that are direct children of section or chapter
(original indexterm elements) are discarded by FOP, which
then complains of unfound references.

A simple solution to this problem is to enclose indexterm
elements with para elements: in that case the targets
are not discarded and the index works fine.

But, then there is another problem: big white spaces in
the PDF output where the "wrapper" para elements were.

So the question is:

- is there a way to tell FOP to not allow white space
  or space before / after for paragraphs that have no
  visible content?

- or, is there another "wrapper element" that can be
  used to hold indexterm elements under sections?

Thanks,
Regards,
EB



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: indexterm and FOP

by Dave Pawson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Emmanuel Bégué wrote:
> Hello,
>
> The docbook DTD allows the element indexterm as a direct
> child of section or chapter;

An indexterm generally wraps content to be indexed. Since you cannot
have content as such a child, why would you want to index 'nothing'?

>
> So the question is:
>
> - is there a way to tell FOP to not allow white space
>   or space before / after for paragraphs that have no
>   visible content?
>
> - or, is there another "wrapper element" that can be
>   used to hold indexterm elements under sections?


Why not use indexterm with existing content, which is
how I think it  is intended to be used




regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


RE: indexterm and FOP

by Emmanuel Bégué-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

Thank you for your answer.

Our indexterm have primary as children elements, and those
primary elements contain terms that should appear in the
index, but do not appear in the text.

For example, if a section talks about "Mozart" but never
uses the term "music", and we would like to have an entry
"music" in the index that points to the section, then we
have:

  section
    indexterm
      primary
        music

Of course, it would be a little more specific and accurate
if the indexterm was next to Mozart instead of as child of
section, but that would require much too much editorial
work (considering that the original document was authored
this way).

Thanks,
Regards,
EB


> -----Original Message-----
> From: Dave Pawson [mailto:davep@...]
> Sent: Tuesday, March 11, 2008 11:48 AM
> To: Emmanuel Bégué
> Cc: docbook-apps@...
> Subject: Re: [docbook-apps] indexterm and FOP
>
> An indexterm generally wraps content to be indexed. Since you cannot
> have content as such a child, why would you want to index 'nothing'?
>
> Why not use indexterm with existing content, which is
> how I think it  is intended to be used



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: indexterm and FOP

by Dave Pawson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Emmanuel Bégué wrote:
> Hello,
>
> Thank you for your answer.
>
> Our indexterm have primary as children elements, and those
> primary elements contain terms that should appear in the
> index, but do not appear in the text.

I agree it would be nice if content could be used for the index
term, but many times the entry is different from the actual
content.

See the example at

http://www.docbook.org/tdg/en/html/indexterm.html


It is necessary to add the content you want which is
used in the index, as extra text.
Note that the indexterm content does not appear in
the output main text.


regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


RE: indexterm and FOP

by Emmanuel Bégué-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, I have no problem with that: we are adding the
terms that should appear in the index, as extra text.

And it usually works flawlessly, when the indexterms
are in the "flow" of the text.

But some terms are relevant to a section "as a whole"
and (therefore) the corresponding index entry should
point to the first page of the section, not the first
page of the content, or (worse) descendant sections.

In those cases (ie where index terms are relevant to a
whole section and not just some paragraph), indexterm
elements cannot be anywhere else but as children of
section:

- if they are put at the start of the actual content,
  the page number can be wrong (if the section
  starts at the end of a page for example) -- and it
  is semantically wrong anyway

- if they are put in a descendant section it is
  semantically very wrong, and the page number will
  very likely be incorrect.

Or is there another way?

Regards,
EB


> -----Original Message-----
> From: Dave Pawson [mailto:davep@...]
> Sent: Tuesday, March 11, 2008 12:19 PM
>
> It is necessary to add the content you want which is
> used in the index, as extra text.
> Note that the indexterm content does not appear in
> the output main text.
>



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: indexterm and FOP

by Dave Pawson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Emmanuel Bégué wrote:

> But some terms are relevant to a section "as a whole"
> and (therefore) the corresponding index entry should
> point to the first page of the section,

The reason you 'need' the para (or title) is for
the anchor/id attribute in the html/pdf output?
If the  output starts with the title then that
is the correct place surely?
You could tweak the fo to insist on 'keep-with-next'
for the title and first para, but I can't think of
any reason why you would get a page break before
a section title and *after* a (non existant) start
of a section?





regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


RE: indexterm and FOP

by Emmanuel Bégué-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ah, yes, the idea of putting indexterm as children of title
instead of section, without a "para wrapper", was simple
enough... and it works, too! ;-)

Thanks...!

Regards,
EB


(Actually it works for section/title but doesn't seem to work
for part/title in which case the relevant anchors are not
produced by the docbook xsl -- but there is only one occurrence
and it doesn't really matter).


> -----Original Message-----
> From: Dave Pawson [mailto:davep@...]
> Sent: Tuesday, March 11, 2008 12:58 PM
>
> The reason you 'need' the para (or title) is for
> the anchor/id attribute in the html/pdf output?
> If the  output starts with the title then that
> is the correct place surely?



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: indexterm and FOP

by Dave Pawson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Emmanuel Bégué wrote:
> Ah, yes, the idea of putting indexterm as children of title
> instead of section, without a "para wrapper", was simple
> enough... and it works, too! ;-)
>
> Thanks...!


See later thread on Clarification.

Example. If you had an indexterm which is formatted 4 pages
later than the sect1 element, the pdf output would be wrong.

It appears that the processing should be different for
html and print, or the descriptions and expectations need
to be aligned better.


regards




regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


How to include Mathematical equations in DocBook 5 ?

by Anagha Tongaonkar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,

I would like to know how to include Mathematical equations in DocBook 5 ?
I know of an example listed on:
http://www.sagehill.net/docbookxsl/MathML.html
However, it's using DB 4.5. I am using DB 5.0.

Any examples will be helpful.

TIA,
Anagha

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: indexterm and FOP

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Actually, this is something that the stylesheet can and should handle.  The
DocBook schema does permit indexterm elements at all those levels, and the
stylesheet should support them without the workarounds that have been
discussed (and will make it work for you today).

There was already some code to solve this problem for the Antenna House FO
engine, because it also could not recognize an fo:wrapper as a child of the
fo:flow for index entries at the top level.  It required an empty fo:block
at that level to work, as does the current FOP.  But it turns out that the
code had a bug in it that prevented it from working properly.  I fixed that
bug, and added "fop1.extensions" to the choose statement that uses it.  The
next snapshot should support indexterm elements as a direct child of chapter
and section for both Antenna House and fop 0.94.

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message -----
From: "Emmanuel Bégué" <emmanuel.begue@...>
To: <docbook-apps@...>
Sent: Tuesday, March 11, 2008 1:45 AM
Subject: [docbook-apps] indexterm and FOP


> Hello,
>
> The docbook DTD allows the element indexterm as a direct
> child of section or chapter; however, if we do that, the
> index is correctly built by the stylesheets, but the target
> elements that are direct children of section or chapter
> (original indexterm elements) are discarded by FOP, which
> then complains of unfound references.
>
> A simple solution to this problem is to enclose indexterm
> elements with para elements: in that case the targets
> are not discarded and the index works fine.
>
> But, then there is another problem: big white spaces in
> the PDF output where the "wrapper" para elements were.
>
> So the question is:
>
> - is there a way to tell FOP to not allow white space
>  or space before / after for paragraphs that have no
>  visible content?
>
> - or, is there another "wrapper element" that can be
>  used to hold indexterm elements under sections?
>
> Thanks,
> Regards,
> EB
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@...
> For additional commands, e-mail: docbook-apps-help@...
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: How to include Mathematical equations in DocBook 5 ?

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
In DocBook 5's RelaxNG schema, the imagedata, equation, and informalequation
elements can contain elements in the MathML namespace.  So the equation
example in the book is still accurate, you can just skip the DOCTYPE
declarations.

Once you mix namespaces, though, validation becomes more complicated.  See
this doc for more information:

http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message -----
From: "Anagha Tongaonkar" <anagha@...>
To: "Bob Stayton" <bobs@...>; "DocBook Apps"
<docbook-apps@...>
Sent: Tuesday, March 11, 2008 12:07 PM
Subject: [docbook-apps] How to include Mathematical equations in DocBook 5 ?


> Hi All,
>
> I would like to know how to include Mathematical equations in DocBook 5 ?
> I know of an example listed on:
> http://www.sagehill.net/docbookxsl/MathML.html
> However, it's using DB 4.5. I am using DB 5.0.
>
> Any examples will be helpful.
>
> TIA,
> Anagha
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@...
> For additional commands, e-mail: docbook-apps-help@...
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: [docbook] PDF Convertion faults

by fingerli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-I don't understand what you mean by "breakup".

With breakup i mean hyphenation. Sorry bout my worse english. :)

- This works when I try it.  Does your XML file declare the xl namespace?

It works in PDF and HTML Help but in Java Help they don't work.

- the formatting with CSS doesn't work. Is this because the FOP can't read CSS?
- That's correct.

How can i avoid using CSS? Is there another way to colorise my text in PDF?

Kind regards

Michael FInger


Bob Stayton wrote:
[moving this over to the docbook-apps mailing list where such issues are
discussed]

Hi,
Some comments below.

----- Original Message -----
From: "fingerli" <MICHAEl.finger@gmx.ch>
To: <docbook@lists.oasis-open.org>
Sent: Monday, March 10, 2008 5:53 AM
Subject: [docbook] PDF Convertion faults


>
> HI @ all
>
> There are some faults by converting my file (with docbook 5.0) into pdf.
> The
> following are:
>
> - links on external homepages doesn't work. i create them this way:
>
> <link xl:href="www.google.ch">Google</link>

This works when I try it.  Does your XML file declare the xl namespace?

> - there is no breakup

I don't understand what you mean by "breakup".

> - the tables are illegal ( table-layout="auto")

Most tables are assigned table-layout="fixed", but there are a few layout
tables for certain elements generated by the stylesheet that don't have a
table-layout property.  That is a deficiency of the stylesheet, but FOP
still processes them as "fixed" after complaining about them.

> - some pages produce an overflow

FOP still has some bugs like that.  Turning off keep-together on tables
seems to help.

> - the formatting with CSS doesn't work. Is this because the FOP can't read
> CSS?

That's correct.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net




---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

Re: How to include Mathematical equations in DocBook 5 ?

by Anagha Tongaonkar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for your reply.

Following the instructions on http://docbook.org/docs/howto/#faq-customization-mathml, I downloaded the MathML RELAX NG schema from http://yupotan.sppd.ne.jp/relax-ng/mml2.html & unpacked it in "mathml" directory. Added the following lines to my customdocbook.rng
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">

<include href="/path/to/docbook.rng">
  <define name="db._any.mml">
    <externalRef href="mathml/mathml2.rng"/>
  </define>

  <define name="db._any">
    <element>
      <anyName>
        <except>
          <nsName ns="http://docbook.org/ns/docbook"/>
          <nsName ns="http://www.w3.org/1999/xhtml"/>
          <nsName ns="http://www.w3.org/1998/Math/MathML"/>
        </except>
      </anyName>
      <zeroOrMore>
        <choice>
          <attribute>
            <anyName/>
          </attribute>
          <text/>
          <ref name="db._any"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
</include>
</grammar>

Then, I added the following equation:
<sect1><title>Equations <title>
<equation>
            <title>My MathML example</title>
            <mml:math>
                <mml:mrow>
                    <mml:mo>&sum;</mml:mo>
                    <mml:mn>4</mml:mn>
                    <mml:mo>+</mml:mo>
                    <mml:mi>x</mml:mi>
                </mml:mrow>
            </mml:math>
 </equation>
</sect1>

in the article.  When I tried to validate it, (I'm using oXygen XML Editor) I got error messages:

conflicting ID-types for attribute "linkend" of element "msginfo" from namespace "http://docbook.org/ns/docbook"
The prefix "mml" for element "mml:math" is not bound.

I read the information on: http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation
However, did not find it helpful, may be because I'm using the XML editor.

Any idea, why does it not like/recognize the prefix "mml"?

Thanks!


Bob Stayton wrote:
Hi,
In DocBook 5's RelaxNG schema, the imagedata, equation, and informalequation elements can contain elements in the MathML namespace.  So the equation example in the book is still accurate, you can just skip the DOCTYPE declarations.

Once you mix namespaces, though, validation becomes more complicated.  See this doc for more information:

http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message ----- From: "Anagha Tongaonkar" anagha@...
To: "Bob Stayton" bobs@...; "DocBook Apps" docbook-apps@...
Sent: Tuesday, March 11, 2008 12:07 PM
Subject: [docbook-apps] How to include Mathematical equations in DocBook 5 ?


Hi All,

I would like to know how to include Mathematical equations in DocBook 5 ?
I know of an example listed on: http://www.sagehill.net/docbookxsl/MathML.html
However, it's using DB 4.5. I am using DB 5.0.

Any examples will be helpful.

TIA,
Anagha

--------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@...

Re: How to include Mathematical equations in DocBook 5 ?

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,
Well, any namespace you use in a document must be declared in the document.  If you are using DocBook5, you know how to declare the docbook namespace in the root element's start tag.  Do the same for the mml namespace in the same place and it will apply to the entire document.  That should eliminate that error. 
 
Bob Stayton
Sagehill Enterprises
bobs@...
 
 
----- Original Message -----
From: anagha@...
Sent: Friday, March 14, 2008 3:15 PM
Subject: Re: [docbook-apps] How to include Mathematical equations in DocBook 5 ?

Thank you for your reply.

Following the instructions on http://docbook.org/docs/howto/#faq-customization-mathml, I downloaded the MathML RELAX NG schema from http://yupotan.sppd.ne.jp/relax-ng/mml2.html & unpacked it in "mathml" directory. Added the following lines to my customdocbook.rng
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">

<include href="/path/to/docbook.rng">
  <define name="db._any.mml">
    <externalRef href="mathml/mathml2.rng"/>
  </define>

  <define name="db._any">
    <element>
      <anyName>
        <except>
          <nsName ns="http://docbook.org/ns/docbook"/>
          <nsName ns="http://www.w3.org/1999/xhtml"/>
          <nsName ns="http://www.w3.org/1998/Math/MathML"/>
        </except>
      </anyName>
      <zeroOrMore>
        <choice>
          <attribute>
            <anyName/>
          </attribute>
          <text/>
          <ref name="db._any"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
</include>
</grammar>

Then, I added the following equation:
<sect1><title>Equations <title>
<equation>
            <title>My MathML example</title>
            <mml:math>
                <mml:mrow>
                    <mml:mo>&sum;</mml:mo>
                    <mml:mn>4</mml:mn>
                    <mml:mo>+</mml:mo>
                    <mml:mi>x</mml:mi>
                </mml:mrow>
            </mml:math>
 </equation>
</sect1>

in the article.  When I tried to validate it, (I'm using oXygen XML Editor) I got error messages:

conflicting ID-types for attribute "linkend" of element "msginfo" from namespace "http://docbook.org/ns/docbook"
The prefix "mml" for element "mml:math" is not bound.

I read the information on: http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation
However, did not find it helpful, may be because I'm using the XML editor.

Any idea, why does it not like/recognize the prefix "mml"?

Thanks!


Bob Stayton wrote:
Hi,
In DocBook 5's RelaxNG schema, the imagedata, equation, and informalequation elements can contain elements in the MathML namespace.  So the equation example in the book is still accurate, you can just skip the DOCTYPE declarations.

Once you mix namespaces, though, validation becomes more complicated.  See this doc for more information:

http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message ----- From: "Anagha Tongaonkar" anagha@...
To: "Bob Stayton" bobs@...; "DocBook Apps" docbook-apps@...
Sent: Tuesday, March 11, 2008 12:07 PM
Subject: [docbook-apps] How to include Mathematical equations in DocBook 5 ?


Hi All,

I would like to know how to include Mathematical equations in DocBook 5 ?
I know of an example listed on: http://www.sagehill.net/docbookxsl/MathML.html
However, it's using DB 4.5. I am using DB 5.0.

Any examples will be helpful.

TIA,
Anagha


Re: [docbook] PDF Convertion faults

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
Thanks for clarifying.  Hyphenation is done by the FO processor and is
dependent on the locale.  The Apache site has information about configuring
FOP for hyphenation:

http://xmlgraphics.apache.org/fop/0.94/hyphenation.html

Regarding adding color to text in PDF, the FO property named "color" can do
that.  It requires using an attribute-set if one is available for the
intended text, or a template customization.  Maybe you could describe what
you are trying to color.

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message -----
From: "fingerli" <MICHAEl.finger@...>
To: <docbook-apps@...>
Sent: Thursday, March 13, 2008 2:13 AM
Subject: Re: [docbook-apps] [docbook] PDF Convertion faults


>
> -I don't understand what you mean by "breakup".
>
> With breakup i mean hyphenation. Sorry bout my worse english. :)
>
> - This works when I try it.  Does your XML file declare the xl namespace?
>
> It works in PDF and HTML Help but in Java Help they don't work.
>
> - the formatting with CSS doesn't work. Is this because the FOP can't read
> CSS?
> - That's correct.
>
> How can i avoid using CSS? Is there another way to colorise my text in
> PDF?
>
> Kind regards
>
> Michael FInger
>
>
>
> Bob Stayton wrote:
>>
>> [moving this over to the docbook-apps mailing list where such issues are
>> discussed]
>>
>> Hi,
>> Some comments below.
>>
>> ----- Original Message -----
>> From: "fingerli" <MICHAEl.finger@...>
>> To: <docbook@...>
>> Sent: Monday, March 10, 2008 5:53 AM
>> Subject: [docbook] PDF Convertion faults
>>
>>
>>>
>>> HI @ all
>>>
>>> There are some faults by converting my file (with docbook 5.0) into pdf.
>>> The
>>> following are:
>>>
>>> - links on external homepages doesn't work. i create them this way:
>>>
>>> <link xl:href="www.google.ch">Google</link>
>>
>> This works when I try it.  Does your XML file declare the xl namespace?
>>
>>> - there is no breakup
>>
>> I don't understand what you mean by "breakup".
>>
>>> - the tables are illegal ( table-layout="auto")
>>
>> Most tables are assigned table-layout="fixed", but there are a few layout
>> tables for certain elements generated by the stylesheet that don't have a
>> table-layout property.  That is a deficiency of the stylesheet, but FOP
>> still processes them as "fixed" after complaining about them.
>>
>>> - some pages produce an overflow
>>
>> FOP still has some bugs like that.  Turning off keep-together on tables
>> seems to help.
>>
>>> - the formatting with CSS doesn't work. Is this because the FOP can't
>>> read
>>> CSS?
>>
>> That's correct.
>>
>> Bob Stayton
>> Sagehill Enterprises
>> bobs@...
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: docbook-apps-unsubscribe@...
>> For additional commands, e-mail: docbook-apps-help@...
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Re%3A--docbook--PDF-Convertion-faults-tp15969141p16023730.html
> Sent from the docbook apps mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@...
> For additional commands, e-mail: docbook-apps-help@...
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: How to include Mathematical equations in DocBook 5 ?

by Anagha Tongaonkar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Oh! I was under the (wrong) impression that including the namespace declaration in the customdocbook.rng schema was sufficient. I now have the namsespace declaration in the xml document & now it does not complain about the prefix "mml"; however, now upon validation, I get the following error:
"The entity "sum" was referenced, but not declared."
at line:
<mml:mo>&sum;</mml:mo>

Am I missing something ?


Bob Stayton wrote:
Hi,
Well, any namespace you use in a document must be declared in the document.  If you are using DocBook5, you know how to declare the docbook namespace in the root element's start tag.  Do the same for the mml namespace in the same place and it will apply to the entire document.  That should eliminate that error. 
 
Bob Stayton
Sagehill Enterprises
bobs@...
 
 
----- Original Message -----
From: anagha@...
Sent: Friday, March 14, 2008 3:15 PM
Subject: Re: [docbook-apps] How to include Mathematical equations in DocBook 5 ?

Thank you for your reply.

Following the instructions on http://docbook.org/docs/howto/#faq-customization-mathml, I downloaded the MathML RELAX NG schema from http://yupotan.sppd.ne.jp/relax-ng/mml2.html & unpacked it in "mathml" directory. Added the following lines to my customdocbook.rng
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">

<include href="/path/to/docbook.rng">
  <define name="db._any.mml">
    <externalRef href="mathml/mathml2.rng"/>
  </define>

  <define name="db._any">
    <element>
      <anyName>
        <except>
          <nsName ns="http://docbook.org/ns/docbook"/>
          <nsName ns="http://www.w3.org/1999/xhtml"/>
          <nsName ns="http://www.w3.org/1998/Math/MathML"/>
        </except>
      </anyName>
      <zeroOrMore>
        <choice>
          <attribute>
            <anyName/>
          </attribute>
          <text/>
          <ref name="db._any"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
</include>
</grammar>

Then, I added the following equation:
<sect1><title>Equations <title>
<equation>
            <title>My MathML example</title>
            <mml:math>
                <mml:mrow>
                    <mml:mo>&sum;</mml:mo>
                    <mml:mn>4</mml:mn>
                    <mml:mo>+</mml:mo>
                    <mml:mi>x</mml:mi>
                </mml:mrow>
            </mml:math>
 </equation>
</sect1>

in the article.  When I tried to validate it, (I'm using oXygen XML Editor) I got error messages:

conflicting ID-types for attribute "linkend" of element "msginfo" from namespace "http://docbook.org/ns/docbook"
The prefix "mml" for element "mml:math" is not bound.

I read the information on: http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation
However, did not find it helpful, may be because I'm using the XML editor.

Any idea, why does it not like/recognize the prefix "mml"?

Thanks!


Bob Stayton wrote:
Hi,
In DocBook 5's RelaxNG schema, the imagedata, equation, and informalequation elements can contain elements in the MathML namespace.  So the equation example in the book is still accurate, you can just skip the DOCTYPE declarations.

Once you mix namespaces, though, validation becomes more complicated.  See this doc for more information:

http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message ----- From: "Anagha Tongaonkar" anagha@...
To: "Bob Stayton" bobs@...; "DocBook Apps" docbook-apps@...
Sent: Tuesday, March 11, 2008 12:07 PM
Subject: [docbook-apps] How to include Mathematical equations in DocBook 5 ?


Hi All,

I would like to know how to include Mathematical equations in DocBook 5 ?
I know of an example listed on: http://www.sagehill.net/docbookxsl/MathML.html
However, it's using DB 4.5. I am using DB 5.0.

Any examples will be helpful.

TIA,
Anagha


--------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@...

Re: How to include Mathematical equations in DocBook 5 ?

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,
Any general entities like &sum; that you use in your document must be declared, either in the document or the schema.  Since RelaxNG does not have a way to declare entities, your document must reference the declarations of such entities.  See:
 
 
In addition to the DocBook entities, the MathML DTD also has many entities.  If you decide to use those, you will also have to include the declaration of those entities.
 
Bob Stayton
Sagehill Enterprises
bobs@...
 
 
----- Original Message -----
From: anagha@...
Sent: Monday, March 17, 2008 10:51 AM
Subject: Re: [docbook-apps] How to include Mathematical equations in DocBook 5 ?

Oh! I was under the (wrong) impression that including the namespace declaration in the customdocbook.rng schema was sufficient. I now have the namsespace declaration in the xml document & now it does not complain about the prefix "mml"; however, now upon validation, I get the following error:
"The entity "sum" was referenced, but not declared."
at line:
<mml:mo>&sum;</mml:mo>

Am I missing something ?


Bob Stayton wrote:
Hi,
Well, any namespace you use in a document must be declared in the document.  If you are using DocBook5, you know how to declare the docbook namespace in the root element's start tag.  Do the same for the mml namespace in the same place and it will apply to the entire document.  That should eliminate that error. 
 
Bob Stayton
Sagehill Enterprises
bobs@...
 
 
----- Original Message -----
From: anagha@...
Sent: Friday, March 14, 2008 3:15 PM
Subject: Re: [docbook-apps] How to include Mathematical equations in DocBook 5 ?

Thank you for your reply.

Following the instructions on http://docbook.org/docs/howto/#faq-customization-mathml, I downloaded the MathML RELAX NG schema from http://yupotan.sppd.ne.jp/relax-ng/mml2.html & unpacked it in "mathml" directory. Added the following lines to my customdocbook.rng
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">

<include href="/path/to/docbook.rng">
  <define name="db._any.mml">
    <externalRef href="mathml/mathml2.rng"/>
  </define>

  <define name="db._any">
    <element>
      <anyName>
        <except>
          <nsName ns="http://docbook.org/ns/docbook"/>
          <nsName ns="http://www.w3.org/1999/xhtml"/>
          <nsName ns="http://www.w3.org/1998/Math/MathML"/>
        </except>
      </anyName>
      <zeroOrMore>
        <choice>
          <attribute>
            <anyName/>
          </attribute>
          <text/>
          <ref name="db._any"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
</include>
</grammar>

Then, I added the following equation:
<sect1><title>Equations <title>
<equation>
            <title>My MathML example</title>
            <mml:math>
                <mml:mrow>
                    <mml:mo>&sum;</mml:mo>
                    <mml:mn>4</mml:mn>
                    <mml:mo>+</mml:mo>
                    <mml:mi>x</mml:mi>
                </mml:mrow>
            </mml:math>
 </equation>
</sect1>

in the article.  When I tried to validate it, (I'm using oXygen XML Editor) I got error messages:

conflicting ID-types for attribute "linkend" of element "msginfo" from namespace "http://docbook.org/ns/docbook"
The prefix "mml" for element "mml:math" is not bound.

I read the information on: http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation
However, did not find it helpful, may be because I'm using the XML editor.

Any idea, why does it not like/recognize the prefix "mml"?

Thanks!


Bob Stayton wrote:
Hi,
In DocBook 5's RelaxNG schema, the imagedata, equation, and informalequation elements can contain elements in the MathML namespace.  So the equation example in the book is still accurate, you can just skip the DOCTYPE declarations.

Once you mix namespaces, though, validation becomes more complicated.  See this doc for more information:

http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message ----- From: "Anagha Tongaonkar" anagha@...
To: "Bob Stayton" bobs@...; "DocBook Apps" docbook-apps@...
Sent: Tuesday, March 11, 2008 12:07 PM
Subject: [docbook-apps] How to include Mathematical equations in DocBook 5 ?


Hi All,

I would like to know how to include Mathematical equations in DocBook 5 ?
I know of an example listed on: http://www.sagehill.net/docbookxsl/MathML.html
However, it's using DB 4.5. I am using DB 5.0.

Any examples will be helpful.

TIA,
Anagha



Re: How to include Mathematical equations in DocBook 5 ?

by Anagha Tongaonkar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Thank you Bob; that was helpful.

I have now included the flattened entity definition file from W3C.
I am trying to include the following equation( sqrt(a) ) in my document:

<equation>
      <mml:math>
          <mml:msqrt>
               <mml:mi>a</mml:mi>
          </mml:msqrt>
      </mml:math>
</equation>

However, the element msqrt is not rendered as a Squareroot symbol, instead it appears as # in the transformed PDF file. I know, the element msqrt is declared in the mathml.dtd. Do I need to include the mathml.dtd in my DB5 document(or the customdb.rng schema)? If so, how do I include the mathml.dtd?

I have the following in the customdb.rng:

<include href="/w/audi/anagha/work/SVN/documentation/oXygen/frameworks/docbook/5.0/rng/docbook.rng">
  
    <define name="db._any.mml">
      <externalRef href="mml2/mathml2.rng"/>
    </define>
    
    <define name="db._any">
      <element>
        <anyName>
          <except>
            <nsName ns="http://docbook.org/ns/docbook"/>
            <nsName ns="http://www.w3.org/1999/xhtml"/>
            <nsName ns="http://www.w3.org/1998/Math/MathML"/>
          </except>
        </anyName>
        <zeroOrMore>
          <choice>
            <attribute>
              <anyName/>
            </attribute>
            <text/>
            <ref name="db._any"/>
          </choice>
        </zeroOrMore>
      </element>
    </define>
  </include>

Please let me know.

TIA,
Anagha




Bob Stayton wrote:
Hi,
Any general entities like &sum; that you use in your document must be declared, either in the document or the schema.  Since RelaxNG does not have a way to declare entities, your document must reference the declarations of such entities.  See:
 
 
In addition to the DocBook entities, the MathML DTD also has many entities.  If you decide to use those, you will also have to include the declaration of those entities.
 
Bob Stayton
Sagehill Enterprises
bobs@...
 
 
----- Original Message -----
From: anagha@...
Sent: Monday, March 17, 2008 10:51 AM
Subject: Re: [docbook-apps] How to include Mathematical equations in DocBook 5 ?

Oh! I was under the (wrong) impression that including the namespace declaration in the customdocbook.rng schema was sufficient. I now have the namsespace declaration in the xml document & now it does not complain about the prefix "mml"; however, now upon validation, I get the following error:
"The entity "sum" was referenced, but not declared."
at line:
<mml:mo>&sum;</mml:mo>

Am I missing something ?


Bob Stayton wrote:
Hi,
Well, any namespace you use in a document must be declared in the document.  If you are using DocBook5, you know how to declare the docbook namespace in the root element's start tag.  Do the same for the mml namespace in the same place and it will apply to the entire document.  That should eliminate that error. 
 
Bob Stayton
Sagehill Enterprises
bobs@...
 
 
----- Original Message -----
From: anagha@...
Sent: Friday, March 14, 2008 3:15 PM
Subject: Re: [docbook-apps] How to include Mathematical equations in DocBook 5 ?

Thank you for your reply.

Following the instructions on http://docbook.org/docs/howto/#faq-customization-mathml, I downloaded the MathML RELAX NG schema from http://yupotan.sppd.ne.jp/relax-ng/mml2.html & unpacked it in "mathml" directory. Added the following lines to my customdocbook.rng
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">

<include href="/path/to/docbook.rng">
  <define name="db._any.mml">
    <externalRef href="mathml/mathml2.rng"/>
  </define>

  <define name="db._any">
    <element>
      <anyName>
        <except>
          <nsName ns="http://docbook.org/ns/docbook"/>
          <nsName ns="http://www.w3.org/1999/xhtml"/>
          <nsName ns="http://www.w3.org/1998/Math/MathML"/>
        </except>
      </anyName>
      <zeroOrMore>
        <choice>
          <attribute>
            <anyName/>
          </attribute>
          <text/>
          <ref name="db._any"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
</include>
</grammar>

Then, I added the following equation:
<sect1><title>Equations <title>
<equation>
            <title>My MathML example</title>
            <mml:math>
                <mml:mrow>
                    <mml:mo>&sum;</mml:mo>
                    <mml:mn>4</mml:mn>
                    <mml:mo>+</mml:mo>
                    <mml:mi>x</mml:mi>
                </mml:mrow>
            </mml:math>
 </equation>
</sect1>

in the article.  When I tried to validate it, (I'm using oXygen XML Editor) I got error messages:

conflicting ID-types for attribute "linkend" of element "msginfo" from namespace "http://docbook.org/ns/docbook"
The prefix "mml" for element "mml:math" is not bound.

I read the information on: http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation
However, did not find it helpful, may be because I'm using the XML editor.

Any idea, why does it not like/recognize the prefix "mml"?

Thanks!


Bob Stayton wrote:
Hi,
In DocBook 5's RelaxNG schema, the imagedata, equation, and informalequation elements can contain elements in the MathML namespace.  So the equation example in the book is still accurate, you can just skip the DOCTYPE declarations.

Once you mix namespaces, though, validation becomes more complicated.  See this doc for more information:

http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message ----- From: "Anagha Tongaonkar" anagha@...
To: "Bob Stayton" bobs@...; "DocBook Apps" docbook-apps@...
Sent: Tuesday, March 11, 2008 12:07 PM
Subject: [docbook-apps] How to include Mathematical equations in DocBook 5 ?


Hi All,

I would like to know how to include Mathematical equations in DocBook 5 ?
I know of an example listed on: http://www.sagehill.net/docbookxsl/MathML.html
However, it's using DB 4.5. I am using DB 5.0.

Any examples will be helpful.

TIA,
Anagha



--------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@...

Re: How to include Mathematical equations in DocBook 5 ?

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Most likely this is a font issue.  Take a peek inside the FO file and see what character is shown for msqrt.  It is probably a Unicode character whose glyph isn't in your body font.  See:
 
 
 
Bob Stayton
Sagehill Enterprises
bobs@...
 
 
----- Original Message -----
From: anagha@...
Sent: Monday, March 24, 2008 2:43 PM
Subject: Re: [docbook-apps] How to include Mathematical equations in DocBook 5 ?

Thank you Bob; that was helpful.

I have now included the flattened entity definition file from W3C.
I am trying to include the following equation( sqrt(a) ) in my document:

<equation>
      <mml:math>
          <mml:msqrt>
               <mml:mi>a</mml:mi>
          </mml:msqrt>
      </mml:math>
</equation>

However, the element msqrt is not rendered as a Squareroot symbol, instead it appears as # in the transformed PDF file. I know, the element msqrt is declared in the mathml.dtd. Do I need to include the mathml.dtd in my DB5 document(or the customdb.rng schema)? If so, how do I include the mathml.dtd?

I have the following in the customdb.rng:

<include href="/w/audi/anagha/work/SVN/documentation/oXygen/frameworks/docbook/5.0/rng/docbook.rng">
  
    <define name="db._any.mml">
      <externalRef href="mml2/mathml2.rng"/>
    </define>
    
    <define name="db._any">
      <element>
        <anyName>
          <except>
            <nsName ns="http://docbook.org/ns/docbook"/>
            <nsName ns="http://www.w3.org/1999/xhtml"/>
            <nsName ns="http://www.w3.org/1998/Math/MathML"/>
          </except>
        </anyName>
        <zeroOrMore>
          <choice>
            <attribute>
              <anyName/>
            </attribute>
            <text/>
            <ref name="db._any"/>
          </choice>
        </zeroOrMore>
      </element>
    </define>
  </include>

Please let me know.

TIA,
Anagha




Bob Stayton wrote:
Hi,
Any general entities like &sum; that you use in your document must be declared, either in the document or the schema.  Since RelaxNG does not have a way to declare entities, your document must reference the declarations of such entities.  See:
 
 
In addition to the DocBook entities, the MathML DTD also has many entities.  If you decide to use those, you will also have to include the declaration of those entities.
 
Bob Stayton
Sagehill Enterprises
bobs@...
 
 
----- Original Message -----
From: anagha@...
Sent: Monday, March 17, 2008 10:51 AM
Subject: Re: [docbook-apps] How to include Mathematical equations in DocBook 5 ?

Oh! I was under the (wrong) impression that including the namespace declaration in the customdocbook.rng schema was sufficient. I now have the namsespace declaration in the xml document & now it does not complain about the prefix "mml"; however, now upon validation, I get the following error:
"The entity "sum" was referenced, but not declared."
at line:
<mml:mo>&sum;</mml:mo>

Am I missing something ?


Bob Stayton wrote:
Hi,
Well, any namespace you use in a document must be declared in the document.  If you are using DocBook5, you know how to declare the docbook namespace in the root element's start tag.  Do the same for the mml namespace in the same place and it will apply to the entire document.  That should eliminate that error. 
 
Bob Stayton
Sagehill Enterprises
bobs@...
 
 
----- Original Message -----
From: anagha@...
Sent: Friday, March 14, 2008 3:15 PM
Subject: Re: [docbook-apps] How to include Mathematical equations in DocBook 5 ?

Thank you for your reply.

Following the instructions on http://docbook.org/docs/howto/#faq-customization-mathml, I downloaded the MathML RELAX NG schema from http://yupotan.sppd.ne.jp/relax-ng/mml2.html & unpacked it in "mathml" directory. Added the following lines to my customdocbook.rng
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">

<include href="/path/to/docbook.rng">
  <define name="db._any.mml">
    <externalRef href="mathml/mathml2.rng"/>
  </define>

  <define name="db._any">
    <element>
      <anyName>
        <except>
          <nsName ns="http://docbook.org/ns/docbook"/>
          <nsName ns="http://www.w3.org/1999/xhtml"/>
          <nsName ns="http://www.w3.org/1998/Math/MathML"/>
        </except>
      </anyName>
      <zeroOrMore>
        <choice>
          <attribute>
            <anyName/>
          </attribute>
          <text/>
          <ref name="db._any"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>
</include>
</grammar>

Then, I added the following equation:
<sect1><title>Equations <title>
<equation>
            <title>My MathML example</title>
            <mml:math>
                <mml:mrow>
                    <mml:mo>&sum;</mml:mo>
                    <mml:mn>4</mml:mn>
                    <mml:mo>+</mml:mo>
                    <mml:mi>x</mml:mi>
                </mml:mrow>
            </mml:math>
 </equation>
</sect1>

in the article.  When I tried to validate it, (I'm using oXygen XML Editor) I got error messages:

conflicting ID-types for attribute "linkend" of element "msginfo" from namespace "http://docbook.org/ns/docbook"
The prefix "mml" for element "mml:math" is not bound.

I read the information on: http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation
However, did not find it helpful, may be because I'm using the XML editor.

Any idea, why does it not like/recognize the prefix "mml"?

Thanks!


Bob Stayton wrote:
Hi,
In DocBook 5's RelaxNG schema, the imagedata, equation, and informalequation elements can contain elements in the MathML namespace.  So the equation example in the book is still accurate, you can just skip the DOCTYPE declarations.

Once you mix namespaces, though, validation becomes more complicated.  See this doc for more information:

http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5Validation

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message ----- From: "Anagha Tongaonkar" anagha@...
To: "Bob Stayton" bobs@...; "DocBook Apps" docbook-apps@...
Sent: Tuesday, March 11, 2008 12:07 PM
Subject: [docbook-apps] How to include Mathematical equations in DocBook 5 ?


Hi All,

I would like to know how to include Mathematical equations in DocBook 5 ?
I know of an example listed on: http://www.sagehill.net/docbookxsl/MathML.html
However, it's using DB 4.5. I am using DB 5.0.

Any examples will be helpful.

TIA,
Anagha