On Sat, Apr 22, 2000 at 11:58:32AM +0200, Lars Gullik Bj&resh;nnes wrote:
> Dekel Tsur <[EMAIL PROTECTED]> writes:
>
> | The problem is in InsetFormula::Latex()
> |
> | if (fragile) // this is where fragile != 0 was used (Lgb)
> | par->Write(os, fragile);
> | else
> | mathed_write(par, os, &ret, fragile, label.c_str());
> |
> | I think it should be just
> |
> | mathed_write(par, os, &ret, fragile, label.c_str());
>
> So this isn't really a: label <-> no-label problem (why was the
> fragile value misuesed?)
I've looked again at the sources, and found that the fragile argument was
misused for exporting to ASCII text. Namely, the value of fragile was
-1 for ASCII export
0 for Latex "export", non-fragile
1 for Latex "export", fragile
Therefore, the suggestion I made above will fix the generation of latex files
but will (slightly) break the ASCII export.
I think that the correct way to fix this is to add ::Ascii methods to the inset
classes. This can also be used for improving the ASCII export. For example,
1. The output of a url inset in an ASCII file is now "\protect\url{<the url>}"
It should be changed to just "<the url>".
2. The output of a reference inset "\ref{label}".
It may be better to change it to "[ref]".
(another option is to use an external latex2ascii converter)
> Can you provide a patch?
I'll provide a patch if you agree that adding ::Ascii methods is the correct
thing to do (unless you want to do the changes yourself ?)