OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] How to make chemical structure automatically numbered


Hi,

Am Freitag, 12. Oktober 2018, 15:19:59 CEST schrieb Peter Desjardins:
> I think the table is adding valid semantic structure here. It allows the
> figure numbering to exist at the Docbook level, not in SVG.
> 
> Maybe use <figure> elements inside an <informaltable>? You could wrap the
> informaltable in an example to give the entire set of diagrams a title.

Thanks for your reply Peter. I'm sorry, but I have to disagree. :)

If Bernhard tries to display chemical structures, why using an overly 
complicated structure? KISS (keep it simple, stupid)! ;) I see no benefit in 
using a table here. Even the opposite: tables on mobile devices (EPUB) can 
have issues. It's better to avoid them.

Even if you go from simple chemical structure to a chemical reaction, there is 
even no reason to split it into several pieces. A structure---and so a 
reaction---belongs together IMHO. With the features of SVG, it's possible.

As DocBook doesn't provide a element for chemical structures, you need either 
use figure or equation (as Jirka pointed out). For example:

 <equation condition="chem">
    <title>Steran</title>
    <mediaobject>
       <imageobject>
          <imagedata fileref="steran.svg"/>
       </imageobject>
       <caption>
          <para>Steran...</para>
       </caption>
    </mediaobject>
 </equation>

IMHO, this is totally enough. Put everything in steran.svg what you need: 
labeling, text, arrows, etc.

With the @condition attribute, you can distinguish a chemical structure from a 
"normal" equation (if you need to).

Even if you really have to use subfigures for a chemical structure I would 
avoid table structures at all costs. For example, if you need to have two 
subfigures, you could use two mediaobjects:

 <equation condition="chem">
    <title>Steran A and B</title>
    <mediaobject>
       <imageobject>
          <imagedata fileref="steran-A.svg"/>
       </imageobject>
       <caption>
          <para>Steran A...</para>
       </caption>
    </mediaobject>
    <mediaobject>
       <imageobject>
          <imagedata fileref="steran-B.svg"/>
       </imageobject>
       <caption>
          <para>Steran B...</para>
       </caption>
    </mediaobject>
 </equation>

Of course, you need to delegate the layout to the stylesheet and you need to 
write a customization layer. For FO it can be rendered indeed as a table and 
for HTML there are different (CSS) methods to position two objects side by 
side.


-- 
GruÃ/Regards
  Thomas Schraitle





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]