Gene Selkov wrote:
>
> I've got a small problem. I hope it is a small problem, as I simply
> want XXE not to do something, and I wonder if there is an option I can
> set. I want it to keep the exact formatting of the data in the ALT
> element. Here's an example:
>
> <equation label="3">
> <alt role="tex">
> \begin{chemistry}[carminsaeure]
> % formula(L,R,"Carmins""aure",HR,24)
> formula(L,R) {
> ring(,,H1=4=){
> vertex(,1,4,H0=2=){ 0: bond(r,,Ln) COOH_;
> 1: bond(r) HO_;
> 3: bond(r) Me_;
> };
> vertex(,4,1,H3=5=){ 0: bond(r) OH_;
> 3: bond(r) OH_;
> 4: bond(r) atom("CO(CHOH)$_4$CH$_3$",L);
> 5: bond(r) OH_;
> };
> 0: bond(r,=C) O_;
> 3: bond(r,=C) O_;
> }
> }
> \end{chemistry}
> </alt>
> <graphic fileref="figures/carminsaeure.png"/>
> </equation>
>
>
> This, when saved to a file, becomes:
>
> <equation label="3">
> <alt role="tex">\begin{chemistry}[carminsaeure] formula(L,R) {
> ring(,,H1=4=){ vertex(,1,4,H0=2=){ 0: bond(r,,Ln) COOH_; 1: bond(r)
> HO_; 3: bond(r) Me_; }; vertex(,4,1,H3=5=){ 0: bond(r) OH_; 3:
> bond(r) OH_; 4: bond(r) atom("CO(CHOH)$_4$CH$_3$",L); 5: bond(r)
> OH_; }; 0: bond(r,=C) O_; 3: bond(r,=C) O_; } } \end{chemistry}
> </alt>
>
> <graphic fileref="figures/carminsaeure.png" />
> </equation></para>
>
>
> I've got two problems with this. One, the text becomes unreadable.
> And, more often than not, this breaks the TeX syntax.
>
> Is there an easy solution to this?
>
--> Quick and dirty solution:
[1] Edit XXE_install_dir/addon/config/docbook/common.incl and modify
cfg:preserveSpace as follows:
---
<cfg:preserveSpace xmlns=""
elements="address funcsynopsisinfo classsynopsisinfo
literallayout programlisting screen synopsis
equation/alt" />
---
(More info in
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/preserveSpace.html)
[2] Edit XXE_install_dir/addon/config/docbook/css/docbook1.imp and add
the following "equation > alt" rule just after the stock "alt" rule:
---
alt {
font-size: small;
background-color: #EEEEFF;
}
equation > alt {
white-space: pre;
}
---
--> Easy to maintain solution (i.e. which survives XXE upgrades):
integrate the aboves changes in a customization of the DocBook
configuration. How to do this is explained here:
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/customizing.html