Hi jianlizhao,
jianlizhao <[email protected]> wrote:
> Hi Armin:
>
> I send an Email to Texmaths's author , asked he some questions, communicate
> with each other as follows:
>
> My question:
> LaTeX will equations can be inserted as images (SVG or PNG formats) and
> the LaTeX, code is saved into the image attribute for further editing.
>
> His reply:
> Image attributes are not stored directly in the png file but in LibreOffice
> data that are attached to the image.
>
>
> attached the image attribute in openOffice data below:( basic code)
> ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
> Sub SetAttributes( oShape as Variant, iEqSize as Integer, sEqType as String,
> sCode as String)
> 'Add the Latex attribute to the image.
> Dim oAttributes as Variant, oLatexAttribute as Variant
> oAttributes = oShape.UserDefinedAttributes
> oLatexAttribute = createUnoStruct(
> ;com.sun.star.xml.AttributeData" )
> oLatexAttribute.Type =
> oLatexAttribute.Value =
> oAttributes.insertByName( )
> oShape.UserDefinedAttributes = oAttributes
> End Sub
> ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
>
> My question is:
> When the image attribute very long, example 10M bytes, if it will wrong.
I cannot tell you, I never used this. You will have to just try it out. I
would guess that it will work, I see no reason someone should have added a
size limitation to it.
> The image attribute can as a zip file saved in the odf?
I do not know about internals, but saving image attributes with the image
is done internally at save/export time from the AOO code. I see no way to
do it yourself whithout changing this (e.g. implement callbacks which may
be used in an external module if needed). I think it is also not necessary.
Just try out if it works when you add that data and if it will be there
again after reading it.
> Look forward to your reply.
> Best Regards!
HTH!
Sincerely,
Armin
--
ALG