chiark / gitweb /
doxygen: support math formulas in custom environment.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 29 Jan 2018 20:28:58 +0000 (21:28 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 29 Jan 2018 22:51:45 +0000 (23:51 +0100)
And also be more generous with spacing.

doxygen/dox2html5.py
doxygen/test/contents_math/index.html
doxygen/test/contents_math/input.dox

index 86479cbfa1dbdec1598e3d2718a28aefed71c2f6..9c72cc5bd2082f2fc4bb6342e2b32e588d6a48be 100755 (executable)
@@ -248,12 +248,11 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET.
 
             # <formula> can be both, depending on what's inside
             elif i.tag == 'formula':
-                if i.text.startswith('\[ ') and i.text.endswith(' \]'):
+                if i.text.startswith('$') and i.text.endswith('$'):
+                    formula_block = False
+                else:
                     end_previous_paragraph = True
                     formula_block = True
-                else:
-                    assert i.text.startswith('$ ') and i.text.endswith(' $')
-                    formula_block = False
 
             # <programlisting> is autodetected to be either block or inline
             elif i.tag == 'programlisting':
@@ -731,17 +730,18 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET.
 
             logging.debug("{}: rendering math: {}".format(state.current, i.text))
 
+            # Assume that Doxygen wrapped the formula properly to distinguish
+            # between inline, block or special environment
+            rendered = latex2svg.latex2svg('{}'.format(i.text), params=m.math.latex2svg_params)
+
             # We should have decided about block/inline above
             assert formula_block is not None
             if formula_block:
                 has_block_elements = True
-                rendered = latex2svg.latex2svg('$${}$$'.format(i.text[3:-3]), params=m.math.latex2svg_params)
                 out.parsed += '<div class="m-math{}">{}</div>'.format(
                     ' ' + add_css_class if add_css_class else '',
                     m.math._patch(i.text, rendered, ''))
             else:
-                rendered = latex2svg.latex2svg('${}$'.format(i.text[2:-2]), params=m.math.latex2svg_params)
-
                 # CSS classes and styling for proper vertical alignment. Depth is relative
                 # to font size, describes how below the line the text is. Scaling it back
                 # to 12pt font, scaled by 125% as set above in the config.
index b6795619ef3cacf7beae3343590ae3fbede5368e..a171f7150dc2ad21e09c1cb8e5471346a1b0e2f6 100644 (file)
@@ -100,7 +100,7 @@ $ \hat q $
 </svg></div><p><svg class="m-math" style="vertical-align: -0.0pt;" height='11.8434pt' version='1.1' viewBox='0 -9.47474 9.27217 9.47474' width='11.5902pt'>
 <title>LaTeX Math</title>
 <desc>
-$ c^2 $
+$c^2$
 </desc>
 <defs>
 <path d='M4.67447 -4.49514C4.44732 -4.49514 4.33973 -4.49514 4.17235 -4.35168C4.10062 -4.29191 3.96912 -4.11258 3.96912 -3.9213C3.96912 -3.68219 4.14844 -3.53873 4.37559 -3.53873C4.66252 -3.53873 4.98531 -3.77783 4.98531 -4.25604C4.98531 -4.82989 4.43537 -5.27223 3.61046 -5.27223C2.04433 -5.27223 0.478207 -3.56264 0.478207 -1.86501C0.478207 -0.824907 1.12379 0.119552 2.34321 0.119552C3.96912 0.119552 4.99726 -1.1477 4.99726 -1.30311C4.99726 -1.37484 4.92553 -1.43462 4.87771 -1.43462C4.84184 -1.43462 4.82989 -1.42267 4.72229 -1.31507C3.95716 -0.298879 2.82142 -0.119552 2.36712 -0.119552C1.54222 -0.119552 1.2792 -0.836862 1.2792 -1.43462C1.2792 -1.85305 1.48244 -3.0127 1.91283 -3.82565C2.22366 -4.38755 2.86924 -5.03313 3.62242 -5.03313C3.77783 -5.03313 4.43537 -5.00922 4.67447 -4.49514Z' id='eq4-g0-99'/>
@@ -110,7 +110,55 @@ $ c^2 $
 <use x='0' xlink:href='#eq4-g0-99' y='0'/>
 <use x='5.03799' xlink:href='#eq4-g1-50' y='-4.33844'/>
 </g>
-</svg> should be part of a new paragraph, not stuck out of it.</p>
+</svg> should be part of a new paragraph, not stuck out of it. The following formula has a custom environment:</p><div class="m-math"><svg height='48.331pt' version='1.1' viewBox='136.775 -38.6648 114.495 38.6648' width='143.118pt'>
+<title>LaTeX Math</title>
+<desc>
+\begin{eqnarray*} g &=& \frac{Gm_2}{r^2} \\ &=& 9.82066032\,\mbox{m/s}^2 \end{eqnarray*}
+</desc>
+<defs>
+<path d='M2.19975 -0.573848C2.19975 -0.920548 1.91283 -1.15965 1.6259 -1.15965C1.2792 -1.15965 1.0401 -0.872727 1.0401 -0.585803C1.0401 -0.239103 1.32702 0 1.61395 0C1.96065 0 2.19975 -0.286924 2.19975 -0.573848Z' id='eq5-g0-58'/>
+<path d='M8.91856 -8.30884C8.91856 -8.41644 8.83487 -8.41644 8.81096 -8.41644S8.73923 -8.41644 8.64359 -8.29689L7.81868 -7.30461C7.7589 -7.40025 7.5198 -7.81868 7.05355 -8.09365C6.53948 -8.41644 6.0254 -8.41644 5.84608 -8.41644C3.28767 -8.41644 0.597758 -5.81021 0.597758 -2.98879C0.597758 -1.01619 1.96065 0.251059 3.75392 0.251059C4.61469 0.251059 5.70262 -0.0358655 6.30037 -0.789041C6.43188 -0.334745 6.69489 -0.0119552 6.77858 -0.0119552C6.83836 -0.0119552 6.85031 -0.0478207 6.86227 -0.0478207C6.87422 -0.071731 6.96986 -0.490162 7.02964 -0.705355L7.22092 -1.47049C7.31656 -1.86501 7.36438 -2.03238 7.44807 -2.39103C7.56762 -2.84533 7.59153 -2.8812 8.24907 -2.89315C8.29689 -2.89315 8.44035 -2.89315 8.44035 -3.1203C8.44035 -3.23985 8.3208 -3.23985 8.28493 -3.23985C8.08169 -3.23985 7.85455 -3.21594 7.63935 -3.21594H6.99377C6.49166 -3.21594 5.96563 -3.23985 5.47547 -3.23985C5.36787 -3.23985 5.22441 -3.23985 5.22441 -3.02466C5.22441 -2.90511 5.32005 -2.90511 5.32005 -2.89315H5.61893C6.56339 -2.89315 6.56339 -2.79751 6.56339 -2.61818C6.56339 -2.60623 6.33624 -1.39875 6.10909 -1.0401C5.65479 -0.37061 4.71034 -0.0956413 4.00498 -0.0956413C3.08443 -0.0956413 1.59004 -0.573848 1.59004 -2.64209C1.59004 -3.44309 1.87696 -5.27223 3.03661 -6.62316C3.78979 -7.48394 4.90162 -8.06974 5.95367 -8.06974C7.36438 -8.06974 7.8665 -6.86227 7.8665 -5.76239C7.8665 -5.57111 7.81868 -5.30809 7.81868 -5.14072C7.81868 -5.03313 7.93823 -5.03313 7.9741 -5.03313C8.1056 -5.03313 8.11756 -5.04508 8.16538 -5.26027L8.91856 -8.30884Z' id='eq5-g0-71'/>
+<path d='M4.04085 -1.51831C3.99303 -1.32702 3.96912 -1.2792 3.8137 -1.09988C3.32354 -0.466252 2.82142 -0.239103 2.45081 -0.239103C2.05629 -0.239103 1.68568 -0.549938 1.68568 -1.37484C1.68568 -2.00847 2.04433 -3.34745 2.30735 -3.88543C2.65405 -4.55492 3.19203 -5.03313 3.69415 -5.03313C4.48319 -5.03313 4.63861 -4.0528 4.63861 -3.98107L4.60274 -3.8137L4.04085 -1.51831ZM4.78207 -4.48319C4.62665 -4.82989 4.29191 -5.27223 3.69415 -5.27223C2.39103 -5.27223 0.908593 -3.63437 0.908593 -1.85305C0.908593 -0.609714 1.66177 0 2.4269 0C3.06052 0 3.62242 -0.502117 3.83761 -0.74122L3.5746 0.334745C3.40722 0.992279 3.33549 1.29116 2.90511 1.70959C2.41494 2.19975 1.96065 2.19975 1.69763 2.19975C1.33898 2.19975 1.0401 2.17584 0.74122 2.0802C1.12379 1.9726 1.21943 1.63786 1.21943 1.50635C1.21943 1.31507 1.07597 1.12379 0.812951 1.12379C0.526027 1.12379 0.215193 1.36289 0.215193 1.75741C0.215193 2.24757 0.705355 2.43885 1.72154 2.43885C3.26376 2.43885 4.06476 1.44658 4.22017 0.800996L5.5472 -4.55492C5.58306 -4.69838 5.58306 -4.72229 5.58306 -4.7462C5.58306 -4.91357 5.45156 -5.04508 5.27223 -5.04508C4.98531 -5.04508 4.81793 -4.80598 4.78207 -4.48319Z' id='eq5-g0-103'/>
+<path d='M2.46276 -3.50286C2.48667 -3.5746 2.78555 -4.17235 3.2279 -4.55492C3.53873 -4.84184 3.94521 -5.03313 4.41146 -5.03313C4.88966 -5.03313 5.05704 -4.67447 5.05704 -4.19626C5.05704 -4.12453 5.05704 -3.88543 4.91357 -3.32354L4.61469 -2.09215C4.51905 -1.7335 4.29191 -0.848817 4.268 -0.71731C4.22017 -0.537983 4.14844 -0.227148 4.14844 -0.179328C4.14844 -0.0119552 4.27995 0.119552 4.45928 0.119552C4.81793 0.119552 4.87771 -0.155417 4.98531 -0.585803L5.70262 -3.44309C5.72653 -3.53873 6.34819 -5.03313 7.66326 -5.03313C8.14147 -5.03313 8.30884 -4.67447 8.30884 -4.19626C8.30884 -3.52677 7.84259 -2.22366 7.57958 -1.50635C7.47198 -1.21943 7.4122 -1.06401 7.4122 -0.848817C7.4122 -0.310834 7.78281 0.119552 8.35666 0.119552C9.46849 0.119552 9.88692 -1.63786 9.88692 -1.70959C9.88692 -1.76936 9.8391 -1.81719 9.76737 -1.81719C9.65978 -1.81719 9.64782 -1.78132 9.58804 -1.57808C9.31308 -0.621669 8.87073 -0.119552 8.39253 -0.119552C8.27298 -0.119552 8.08169 -0.131507 8.08169 -0.514072C8.08169 -0.824907 8.22516 -1.20747 8.27298 -1.33898C8.48817 -1.91283 9.02615 -3.32354 9.02615 -4.01694C9.02615 -4.73425 8.60772 -5.27223 7.69913 -5.27223C6.89813 -5.27223 6.25255 -4.81793 5.77435 -4.11258C5.73848 -4.75816 5.34396 -5.27223 4.44732 -5.27223C3.38331 -5.27223 2.82142 -4.51905 2.60623 -4.22017C2.57036 -4.90162 2.0802 -5.27223 1.55417 -5.27223C1.20747 -5.27223 0.932503 -5.10486 0.705355 -4.65056C0.490162 -4.22017 0.32279 -3.49091 0.32279 -3.44309S0.37061 -3.33549 0.454296 -3.33549C0.549938 -3.33549 0.561893 -3.34745 0.633624 -3.62242C0.812951 -4.32777 1.0401 -5.03313 1.51831 -5.03313C1.79328 -5.03313 1.88892 -4.84184 1.88892 -4.48319C1.88892 -4.22017 1.76936 -3.75392 1.68568 -3.38331L1.35093 -2.09215C1.30311 -1.86501 1.17161 -1.32702 1.11183 -1.11183C1.02814 -0.800996 0.896638 -0.239103 0.896638 -0.179328C0.896638 -0.0119552 1.02814 0.119552 1.20747 0.119552C1.35093 0.119552 1.51831 0.0478207 1.61395 -0.131507C1.63786 -0.191283 1.74545 -0.609714 1.80523 -0.848817L2.06824 -1.92478L2.46276 -3.50286Z' id='eq5-g0-109'/>
+<path d='M4.65056 -4.88966C4.27995 -4.81793 4.08867 -4.55492 4.08867 -4.29191C4.08867 -4.00498 4.31582 -3.90934 4.48319 -3.90934C4.81793 -3.90934 5.0929 -4.19626 5.0929 -4.55492C5.0929 -4.93748 4.72229 -5.27223 4.12453 -5.27223C3.64633 -5.27223 3.09639 -5.05704 2.59427 -4.32777C2.51059 -4.96139 2.03238 -5.27223 1.55417 -5.27223C1.08792 -5.27223 0.848817 -4.91357 0.705355 -4.65056C0.502117 -4.22017 0.32279 -3.50286 0.32279 -3.44309C0.32279 -3.39527 0.37061 -3.33549 0.454296 -3.33549C0.549938 -3.33549 0.561893 -3.34745 0.633624 -3.62242C0.812951 -4.33973 1.0401 -5.03313 1.51831 -5.03313C1.80523 -5.03313 1.88892 -4.82989 1.88892 -4.48319C1.88892 -4.22017 1.76936 -3.75392 1.68568 -3.38331L1.35093 -2.09215C1.30311 -1.86501 1.17161 -1.32702 1.11183 -1.11183C1.02814 -0.800996 0.896638 -0.239103 0.896638 -0.179328C0.896638 -0.0119552 1.02814 0.119552 1.20747 0.119552C1.33898 0.119552 1.56613 0.0358655 1.63786 -0.203238C1.67372 -0.298879 2.11606 -2.10411 2.1878 -2.37908C2.24757 -2.64209 2.3193 -2.89315 2.37908 -3.15616C2.4269 -3.32354 2.47472 -3.51482 2.51059 -3.67024C2.54645 -3.77783 2.86924 -4.36364 3.16812 -4.62665C3.31158 -4.75816 3.62242 -5.03313 4.11258 -5.03313C4.30386 -5.03313 4.49514 -4.99726 4.65056 -4.88966Z' id='eq5-g0-114'/>
+<path d='M5.35592 -3.82565C5.35592 -4.81793 5.29614 -5.7863 4.86575 -6.69489C4.37559 -7.68717 3.51482 -7.95019 2.92902 -7.95019C2.23562 -7.95019 1.3868 -7.60349 0.944458 -6.61121C0.609714 -5.85803 0.490162 -5.11681 0.490162 -3.82565C0.490162 -2.666 0.573848 -1.79328 1.00423 -0.944458C1.47049 -0.0358655 2.29539 0.251059 2.91706 0.251059C3.95716 0.251059 4.55492 -0.37061 4.90162 -1.06401C5.332 -1.96065 5.35592 -3.13225 5.35592 -3.82565ZM2.91706 0.0119552C2.5345 0.0119552 1.75741 -0.203238 1.53026 -1.50635C1.39875 -2.22366 1.39875 -3.13225 1.39875 -3.96912C1.39875 -4.94944 1.39875 -5.83412 1.59004 -6.53948C1.79328 -7.34047 2.40299 -7.71108 2.91706 -7.71108C3.37136 -7.71108 4.06476 -7.43611 4.29191 -6.40797C4.44732 -5.72653 4.44732 -4.78207 4.44732 -3.96912C4.44732 -3.16812 4.44732 -2.25953 4.31582 -1.53026C4.08867 -0.215193 3.33549 0.0119552 2.91706 0.0119552Z' id='eq5-g3-48'/>
+<path d='M5.26027 -2.00847H4.99726C4.96139 -1.80523 4.86575 -1.1477 4.7462 -0.956413C4.66252 -0.848817 3.98107 -0.848817 3.62242 -0.848817H1.41071C1.7335 -1.12379 2.46276 -1.88892 2.7736 -2.17584C4.59078 -3.84956 5.26027 -4.47123 5.26027 -5.65479C5.26027 -7.02964 4.17235 -7.95019 2.78555 -7.95019S0.585803 -6.76663 0.585803 -5.73848C0.585803 -5.12877 1.11183 -5.12877 1.1477 -5.12877C1.39875 -5.12877 1.70959 -5.30809 1.70959 -5.69066C1.70959 -6.0254 1.48244 -6.25255 1.1477 -6.25255C1.0401 -6.25255 1.01619 -6.25255 0.980324 -6.2406C1.20747 -7.05355 1.85305 -7.60349 2.63014 -7.60349C3.64633 -7.60349 4.268 -6.75467 4.268 -5.65479C4.268 -4.63861 3.68219 -3.75392 3.00075 -2.98879L0.585803 -0.286924V0H4.94944L5.26027 -2.00847Z' id='eq5-g3-50'/>
+<path d='M2.19975 -4.29191C1.99651 -4.27995 1.94869 -4.268 1.94869 -4.1604C1.94869 -4.04085 2.00847 -4.04085 2.22366 -4.04085H2.7736C3.78979 -4.04085 4.24408 -3.20399 4.24408 -2.05629C4.24408 -0.490162 3.43113 -0.071731 2.84533 -0.071731C2.27148 -0.071731 1.29116 -0.3467 0.944458 -1.13574C1.32702 -1.07597 1.67372 -1.29116 1.67372 -1.72154C1.67372 -2.06824 1.42267 -2.30735 1.08792 -2.30735C0.800996 -2.30735 0.490162 -2.13998 0.490162 -1.68568C0.490162 -0.621669 1.55417 0.251059 2.8812 0.251059C4.30386 0.251059 5.35592 -0.836862 5.35592 -2.04433C5.35592 -3.14421 4.47123 -4.00498 3.32354 -4.20822C4.36364 -4.5071 5.03313 -5.37983 5.03313 -6.31233C5.03313 -7.25679 4.0528 -7.95019 2.89315 -7.95019C1.69763 -7.95019 0.812951 -7.22092 0.812951 -6.34819C0.812951 -5.86999 1.18356 -5.77435 1.36289 -5.77435C1.61395 -5.77435 1.90087 -5.95367 1.90087 -6.31233C1.90087 -6.69489 1.61395 -6.86227 1.35093 -6.86227C1.2792 -6.86227 1.25529 -6.86227 1.21943 -6.85031C1.67372 -7.66326 2.79751 -7.66326 2.85729 -7.66326C3.25181 -7.66326 4.02889 -7.48394 4.02889 -6.31233C4.02889 -6.08518 3.99303 -5.41569 3.64633 -4.90162C3.28767 -4.37559 2.8812 -4.33973 2.55841 -4.32777L2.19975 -4.29191Z' id='eq5-g3-51'/>
+<path d='M1.47049 -4.1604C1.47049 -7.18506 2.94097 -7.66326 3.58655 -7.66326C4.01694 -7.66326 4.44732 -7.53176 4.67447 -7.1731C4.53101 -7.1731 4.07671 -7.1731 4.07671 -6.68294C4.07671 -6.41993 4.25604 -6.19278 4.56687 -6.19278C4.86575 -6.19278 5.06899 -6.3721 5.06899 -6.7188C5.06899 -7.34047 4.61469 -7.95019 3.5746 -7.95019C2.06824 -7.95019 0.490162 -6.40797 0.490162 -3.77783C0.490162 -0.490162 1.92478 0.251059 2.94097 0.251059C4.24408 0.251059 5.35592 -0.884682 5.35592 -2.43885C5.35592 -4.02889 4.24408 -5.0929 3.04857 -5.0929C1.98456 -5.0929 1.59004 -4.17235 1.47049 -3.83761V-4.1604ZM2.94097 -0.071731C2.1878 -0.071731 1.82914 -0.74122 1.72154 -0.992279C1.61395 -1.30311 1.4944 -1.88892 1.4944 -2.72578C1.4944 -3.67024 1.92478 -4.8538 3.00075 -4.8538C3.65828 -4.8538 4.00498 -4.41146 4.18431 -4.00498C4.37559 -3.56264 4.37559 -2.96488 4.37559 -2.45081C4.37559 -1.8411 4.37559 -1.30311 4.14844 -0.848817C3.84956 -0.274969 3.41918 -0.071731 2.94097 -0.071731Z' id='eq5-g3-54'/>
+<path d='M3.56264 -4.31582C4.1604 -4.63861 5.03313 -5.18854 5.03313 -6.19278C5.03313 -7.23288 4.02889 -7.95019 2.92902 -7.95019C1.74545 -7.95019 0.812951 -7.07746 0.812951 -5.98954C0.812951 -5.58306 0.932503 -5.17659 1.26725 -4.77011C1.39875 -4.61469 1.41071 -4.60274 2.24757 -4.01694C1.08792 -3.47895 0.490162 -2.67796 0.490162 -1.80523C0.490162 -0.537983 1.69763 0.251059 2.91706 0.251059C4.24408 0.251059 5.35592 -0.729265 5.35592 -1.98456C5.35592 -3.20399 4.49514 -3.74197 3.56264 -4.31582ZM1.93674 -5.39178C1.78132 -5.49938 1.30311 -5.81021 1.30311 -6.39601C1.30311 -7.1731 2.11606 -7.66326 2.91706 -7.66326C3.77783 -7.66326 4.54296 -7.04159 4.54296 -6.18082C4.54296 -5.45156 4.01694 -4.86575 3.32354 -4.48319L1.93674 -5.39178ZM2.49863 -3.84956L3.94521 -2.90511C4.25604 -2.70187 4.80598 -2.33126 4.80598 -1.60199C4.80598 -0.6934 3.88543 -0.071731 2.92902 -0.071731C1.91283 -0.071731 1.0401 -0.812951 1.0401 -1.80523C1.0401 -2.73773 1.72154 -3.49091 2.49863 -3.84956Z' id='eq5-g3-56'/>
+<path d='M4.37559 -3.47895C4.37559 -0.657534 3.1203 -0.071731 2.40299 -0.071731C2.11606 -0.071731 1.48244 -0.107597 1.18356 -0.526027H1.25529C1.33898 -0.502117 1.76936 -0.573848 1.76936 -1.01619C1.76936 -1.2792 1.59004 -1.50635 1.2792 -1.50635S0.777086 -1.30311 0.777086 -0.992279C0.777086 -0.251059 1.37484 0.251059 2.41494 0.251059C3.90934 0.251059 5.35592 -1.33898 5.35592 -3.93325C5.35592 -7.14919 4.01694 -7.95019 2.96488 -7.95019C1.64981 -7.95019 0.490162 -6.85031 0.490162 -5.27223S1.60199 -2.61818 2.79751 -2.61818C3.68219 -2.61818 4.13649 -3.26376 4.37559 -3.87347V-3.47895ZM2.84533 -2.85729C2.09215 -2.85729 1.76936 -3.467 1.66177 -3.69415C1.47049 -4.14844 1.47049 -4.72229 1.47049 -5.26027C1.47049 -5.92976 1.47049 -6.50361 1.78132 -6.99377C1.99651 -7.31656 2.3193 -7.66326 2.96488 -7.66326C3.64633 -7.66326 3.99303 -7.0655 4.11258 -6.79054C4.35168 -6.20473 4.35168 -5.18854 4.35168 -5.00922C4.35168 -4.00498 3.89738 -2.85729 2.84533 -2.85729Z' id='eq5-g3-57'/>
+<path d='M8.06974 -3.87347C8.23711 -3.87347 8.4523 -3.87347 8.4523 -4.08867C8.4523 -4.31582 8.24907 -4.31582 8.06974 -4.31582H1.02814C0.860772 -4.31582 0.645579 -4.31582 0.645579 -4.10062C0.645579 -3.87347 0.848817 -3.87347 1.02814 -3.87347H8.06974ZM8.06974 -1.64981C8.23711 -1.64981 8.4523 -1.64981 8.4523 -1.86501C8.4523 -2.09215 8.24907 -2.09215 8.06974 -2.09215H1.02814C0.860772 -2.09215 0.645579 -2.09215 0.645579 -1.87696C0.645579 -1.64981 0.848817 -1.64981 1.02814 -1.64981H8.06974Z' id='eq5-g3-61'/>
+<path d='M3.43113 -8.08169H2.63014L-0.107597 0.167372H0.705355L3.43113 -8.08169Z' id='eq5-g2-47'/>
+<path d='M9.26526 0V-0.179328L8.95442 -0.203238C8.59577 -0.227148 8.44035 -0.442341 8.44035 -0.908593V-3.37136C8.44035 -4.78207 7.9741 -5.49938 7.05355 -5.49938C6.36015 -5.49938 5.75044 -5.18854 5.10486 -4.49514C4.88966 -5.17659 4.48319 -5.49938 3.83761 -5.49938C3.31158 -5.49938 2.97684 -5.332 1.98456 -4.57883V-5.47547L1.90087 -5.49938C1.29116 -5.27223 0.884682 -5.14072 0.227148 -4.96139V-4.75816C0.382565 -4.79402 0.478207 -4.80598 0.609714 -4.80598C0.920548 -4.80598 1.02814 -4.61469 1.02814 -4.04085V-1.01619C1.02814 -0.37061 0.860772 -0.191283 0.191283 -0.179328V0H2.84533V-0.179328C2.21171 -0.203238 2.03238 -0.334745 2.03238 -0.800996V-4.17235C2.03238 -4.17235 2.12802 -4.31582 2.21171 -4.3995C2.51059 -4.67447 3.02466 -4.87771 3.44309 -4.87771C3.96912 -4.87771 4.23213 -4.45928 4.23213 -3.62242V-1.02814C4.23213 -0.358655 4.10062 -0.227148 3.41918 -0.179328V0H6.09714V-0.179328C5.41569 -0.191283 5.23636 -0.394521 5.23636 -1.13574V-4.14844C5.59502 -4.66252 5.98954 -4.87771 6.53948 -4.87771C7.22092 -4.87771 7.43611 -4.55492 7.43611 -3.56264V-1.0401C7.43611 -0.358655 7.34047 -0.263014 6.64707 -0.179328V0H9.26526Z' id='eq5-g2-109'/>
+<path d='M4.1604 -1.41071C4.1604 -2.00847 3.88543 -2.40299 3.15616 -2.83337L1.86501 -3.59851C1.53026 -3.78979 1.35093 -4.08867 1.35093 -4.41146C1.35093 -4.90162 1.72154 -5.22441 2.27148 -5.22441C2.95293 -5.22441 3.31158 -4.82989 3.58655 -3.75392H3.76588L3.71806 -5.37983H3.58655L3.56264 -5.35592C3.45504 -5.27223 3.44309 -5.26027 3.39527 -5.26027C3.32354 -5.26027 3.20399 -5.28418 3.07248 -5.34396C2.82142 -5.4396 2.54645 -5.48742 2.25953 -5.48742C1.2792 -5.48742 0.609714 -4.88966 0.609714 -4.01694C0.609714 -3.34745 0.992279 -2.8812 2.00847 -2.29539L2.70187 -1.90087C3.1203 -1.66177 3.32354 -1.37484 3.32354 -1.00423C3.32354 -0.478207 2.94097 -0.143462 2.33126 -0.143462C1.50635 -0.143462 1.08792 -0.597758 0.812951 -1.81719H0.621669V0.0478207H0.777086C0.860772 -0.071731 0.908593 -0.0956413 1.05205 -0.0956413C1.18356 -0.0956413 1.31507 -0.071731 1.60199 0C1.93674 0.071731 2.23562 0.119552 2.48667 0.119552C3.39527 0.119552 4.1604 -0.573848 4.1604 -1.41071Z' id='eq5-g2-115'/>
+<path d='M2.24757 -1.6259C2.37509 -1.74545 2.70984 -2.00847 2.83736 -2.12005C3.33151 -2.57435 3.80174 -3.0127 3.80174 -3.73798C3.80174 -4.68643 3.00473 -5.30012 2.00847 -5.30012C1.05205 -5.30012 0.422416 -4.57484 0.422416 -3.8655C0.422416 -3.47497 0.73325 -3.41918 0.844832 -3.41918C1.0122 -3.41918 1.25928 -3.53873 1.25928 -3.84159C1.25928 -4.25604 0.860772 -4.25604 0.765131 -4.25604C0.996264 -4.83786 1.53026 -5.03711 1.9208 -5.03711C2.66202 -5.03711 3.04458 -4.40747 3.04458 -3.73798C3.04458 -2.90909 2.46276 -2.30336 1.52229 -1.33898L0.518057 -0.302864C0.422416 -0.215193 0.422416 -0.199253 0.422416 0H3.57061L3.80174 -1.42665H3.55467C3.53076 -1.26725 3.467 -0.868742 3.37136 -0.71731C3.32354 -0.653549 2.71781 -0.653549 2.59029 -0.653549H1.17161L2.24757 -1.6259Z' id='eq5-g1-50'/>
+</defs>
+<g id='eq5-page1'>
+<use x='136.775' xlink:href='#eq5-g0-103' y='-22.4076'/>
+<use x='152.772' xlink:href='#eq5-g3-61' y='-22.4076'/>
+<use x='173.035' xlink:href='#eq5-g0-71' y='-30.4954'/>
+<use x='182.268' xlink:href='#eq5-g0-109' y='-30.4954'/>
+<use x='192.508' xlink:href='#eq5-g1-50' y='-28.7021'/>
+<rect height='0.478187' width='24.2052' x='173.035' y='-25.6355'/>
+<use x='179.971' xlink:href='#eq5-g0-114' y='-14.207'/>
+<use x='185.571' xlink:href='#eq5-g1-50' y='-17.6607'/>
+<use x='152.772' xlink:href='#eq5-g3-61' y='-0.149434'/>
+<use x='171.839' xlink:href='#eq5-g3-57' y='-0.149434'/>
+<use x='177.692' xlink:href='#eq5-g0-58' y='-0.149434'/>
+<use x='180.944' xlink:href='#eq5-g3-56' y='-0.149434'/>
+<use x='186.797' xlink:href='#eq5-g3-50' y='-0.149434'/>
+<use x='192.65' xlink:href='#eq5-g3-48' y='-0.149434'/>
+<use x='198.503' xlink:href='#eq5-g3-54' y='-0.149434'/>
+<use x='204.356' xlink:href='#eq5-g3-54' y='-0.149434'/>
+<use x='210.209' xlink:href='#eq5-g3-48' y='-0.149434'/>
+<use x='216.062' xlink:href='#eq5-g3-51' y='-0.149434'/>
+<use x='221.915' xlink:href='#eq5-g3-50' y='-0.149434'/>
+<use x='229.76' xlink:href='#eq5-g2-109' y='-0.149434'/>
+<use x='239.061' xlink:href='#eq5-g2-47' y='-0.149434'/>
+<use x='242.385' xlink:href='#eq5-g2-115' y='-0.149434'/>
+<use x='247.036' xlink:href='#eq5-g1-50' y='-5.08562'/>
+</g>
+</svg></div>
       </div>
     </div>
   </div>
index 4eb2b0a1a60d8b31542a93f5da0d980c578ab4d5..b335ca6d47468618ee4db3f87def65ba9fa5bfb1 100644 (file)
@@ -12,6 +12,12 @@ And @f$ \hat q @f$ is how quaternion is denoted.
     a^2 + b^2 = c^2
 @f]
 
-@f$ c^2 @f$ should be part of a new paragraph, not stuck out of it.
+@f$c^2@f$ should be part of a new paragraph, not stuck out of it. The following
+formula has a custom environment:
+
+\f{eqnarray*}{
+    g &=& \frac{Gm_2}{r^2} \\
+      &=& 9.82066032\,\mbox{m/s}^2
+\f}
 
 */