Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output two sumation signs in equal height in Word 2010 #896

Closed
aschilling opened this issue Jun 30, 2013 · 3 comments
Closed

Output two sumation signs in equal height in Word 2010 #896

aschilling opened this issue Jun 30, 2013 · 3 comments

Comments

@aschilling
Copy link

Hi everybody,

I am opening this issue after posting it already on the mailinglist (https://groups.google.com/forum/#!topic/pandoc-discuss/6zF_q_K4uok).

I need to output some complex equations in Word 2010 (docx). To do so I write the equations in tex and use pandoc to translate them as Word formulas.

However I found that if I use the following tex equation:

\sum_{m=1}^\infty\sum_{n=1}^\infty

In Word the resulting two summation signs are not of the same size but the latter is smaler than the first one. Is this a bug? I found no appropriate workaround to solve this?

Thank you in advance

@jgm
Copy link
Owner

jgm commented Jun 30, 2013

It's really an issue with the texmath library (https://github.com/jgm/texmath).
The issues seems to be that the second summation is included in a group with the first, rather than being coordinate with it. I see a place in the code where this is done, and it's clear that it's being done for a reason -- texmath doesn't do this in MathML. However, even though I wrote the code, I no longer recall the reason. Probably the thing to do is create the formula using Word's equation editor, then look at the OMML code in the docx container. Hopefully that would tell me how to render this correctly.

@jgm
Copy link
Owner

jgm commented Jun 30, 2013

Here is what Word produced when I tried the equation editor:

  <m:oMathPara>
    <m:oMath>
      <m:nary>
        <m:naryPr>
          <m:chr m:val="∑" />
          <m:limLoc m:val="undOvr" />
          <m:ctrlPr>
            <w:rPr>
              <w:rFonts w:ascii="Cambria Math"
              w:hAnsi="Cambria Math" />
              <w:i />
            </w:rPr>
          </m:ctrlPr>
        </m:naryPr>
        <m:sub>
          <m:r>
            <w:rPr>
              <w:rFonts w:ascii="Cambria Math"
              w:hAnsi="Cambria Math" />
            </w:rPr>
            <m:t>m=1</m:t>
          </m:r>
        </m:sub>
        <m:sup>
          <m:r>
            <w:rPr>
              <w:rFonts w:ascii="Cambria Math"
              w:hAnsi="Cambria Math" />
            </w:rPr>
            <m:t>2</m:t>
          </m:r>
        </m:sup>
        <m:e>
          <m:nary>
            <m:naryPr>
              <m:chr m:val="∑" />
              <m:limLoc m:val="undOvr" />
              <m:ctrlPr>
                <w:rPr>
                  <w:rFonts w:ascii="Cambria Math"
                  w:hAnsi="Cambria Math" />
                  <w:i />
                </w:rPr>
              </m:ctrlPr>
            </m:naryPr>
            <m:sub>
              <m:r>
                <w:rPr>
                  <w:rFonts w:ascii="Cambria Math"
                  w:hAnsi="Cambria Math" />
                </w:rPr>
                <m:t>m=1</m:t>
              </m:r>
            </m:sub>
            <m:sup>
              <m:r>
                <w:rPr>
                  <w:rFonts w:ascii="Cambria Math"
                  w:hAnsi="Cambria Math" />
                </w:rPr>
                <m:t>2</m:t>
              </m:r>
            </m:sup>
            <m:e>
              <m:r>
                <w:rPr>
                  <w:rFonts w:ascii="Cambria Math"
                  w:hAnsi="Cambria Math" />
                </w:rPr>
                <m:t>x</m:t>
              </m:r>
            </m:e>
          </m:nary>
        </m:e>
      </m:nary>
    </m:oMath>
  </m:oMathPara>

@jgm
Copy link
Owner

jgm commented Jun 30, 2013

Culprit was the <m:grow />. I've fixed this in texmath. If you are desperate for the change you can install texmath from github source (cabal install --force will be needed), then reinstall pandoc (cabal install pandoc). But the fix will be in the next texmath release.

@jgm jgm closed this as completed Jun 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants