Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#44 Patch: New check for SVG contents to prevent bug

v1.0_(example)
closed-fixed
nobody
None
5
2014-09-30
2014-04-09
Daniel Fett
No

When a LaTeX equation comes without a documentclass, the generated SVG file has no size. This patch prevents TexMaths from crashing with no useful error message:

https://bitbucket.org/webhamster/texmaths/commits/ee1b2ba647a896a5d73bd6a0348baea7c1c46708

Discussion

  • Roland Baudin
    Roland Baudin
    2014-04-09

    In what conditions do you get a LaTeX code without a document class?
    This should not happen, I think...
    RB

     
  • Daniel Fett
    Daniel Fett
    2014-04-09

    When you select to not use the preamble and then forget to type the \documentclass command in the LaTeX code field.

     
  • Roland Baudin
    Roland Baudin
    2014-04-09

    Do you have an example?
    Thx,
    RB

     
    • Daniel Fett
      Daniel Fett
      2014-04-09

      Yes, it is easy to reproduce: Create a new document (I tested in
      Impress), save it, create a new equation with the content

      \begin{document}
      test
      \end{document}

      select LaTeX equation type, select to ignore the preamble for this type
      and try to compile. Apparently, the SVG file then does not contain
      information about the size.

       
  • Daniel Fett
    Daniel Fett
    2014-04-09

    Yes, it is easy to reproduce: Create a new document (I tested in
    Impress), save it, create a new equation with the content

    \begin{document}
    test
    \end{document}

    select LaTeX equation type, select to ignore the preamble for this type
    and try to compile. Apparently, the SVG file then does not contain
    information about the size.

     
  • Daniel Fett
    Daniel Fett
    2014-04-09

    Of course this is a user error, but there should be a proper error message for this.

     
  • Roland Baudin
    Roland Baudin
    2014-09-30

    This is fixed in TexMaths 0.41.
    Thanks for your help.

     
  • Roland Baudin
    Roland Baudin
    2014-09-30

    • status: open --> closed-fixed