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

Docx equations not italicized #2075

Closed
jrgcmu opened this issue Apr 12, 2015 · 7 comments
Closed

Docx equations not italicized #2075

jrgcmu opened this issue Apr 12, 2015 · 7 comments

Comments

@jrgcmu
Copy link

jrgcmu commented Apr 12, 2015

Math zones in docx output are displayed in an upright font, instead of italics which is customary for non-operator math.

@mpickering
Copy link
Collaborator

Can you please post an example which shows your problem.

@jrgcmu
Copy link
Author

jrgcmu commented Apr 12, 2015

For example

Inline: $x$

Displayed: 

$$x$$

displays as:
docxexample

The x's should be italicized.

@jgm
Copy link
Owner

jgm commented Apr 12, 2015

+++ John Gardner [Apr 12 15 09:19 ]:

Math zones in docx output are displayed in an upright font, instead of italics which is customary for non-operator math.

Some information that would be helpful here:
What pandoc version?
What output format (HTML?)?
What options, if any, did you use to control how math is rendered in HTML (e.g. --mathjax?)?

With recent pandoc versions, the default math output in HTML will put
variables in italics.

@jrgcmu
Copy link
Author

jrgcmu commented Apr 12, 2015

Output format is docx, tested using pandoc versions 1.13.1 and 1.13.2 using no options, just pandoc test.md -o test.docx. I could be wrong, but I believe prior versions resulted in italicized math.

@jgm
Copy link
Owner

jgm commented Apr 12, 2015

+++ John Gardner [Apr 12 15 15:34 ]:

Output format is docx, tested using pandoc versions 1.13.1 and 1.13.2
using no options, just pandoc test.md -o test.docx. I could be wrong,
but I believe prior versions resulted in italicized math.

You are correct that there was a change. In prior versions, pandoc just "faked it" using unicode for equations. (And, even moderately complex equations could not be faked that way.)

Recent versions actually convert the latex math into an equivalent Word equation.

I'll look into jgm/texmath and see if this can be fixed there.

@jrgcmu
Copy link
Author

jrgcmu commented Apr 12, 2015

Hopefully this helps: 1.12.4 is the last version that produces the expected behavior.

jgm added a commit to jgm/texmath that referenced this issue Apr 13, 2015
This change ensures that variables etc. will be italic by default
in Word.  See jgm/pandoc#2075.
@jgm
Copy link
Owner

jgm commented Apr 13, 2015

Okay, I've just released texmath 0.8.1, which should fix this issue.
If you installed pandoc using cabal, you can

cabal update
cabal install texmath --force
cabal install pandoc --reinstall

If you use binary packages, the fix will be in the next release.

@jgm jgm closed this as completed Apr 13, 2015
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

3 participants