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

handling of soft breaks in omml input #134

Open
redstoneleo opened this issue Mar 4, 2019 · 5 comments
Open

handling of soft breaks in omml input #134

redstoneleo opened this issue Mar 4, 2019 · 5 comments

Comments

@redstoneleo
Copy link

Conversion command
E:\pandoc-2.7-windows-i386\pandoc.exe -s 2.docx -t markdown-smart --wrap=none -o example35.md
After conversion, only the two display style formula left, all other text was striped out.

One could test the problem with
2.docx

@redstoneleo
Copy link
Author

redstoneleo commented Mar 4, 2019

I think it is the downward pointing arrow that caused the problem, the arrow is in formula format , because if I removed the downward pointing arrow, the conversion went well .
image

@redstoneleo
Copy link
Author

redstoneleo commented Mar 4, 2019

image

The downward pointing arrow also caused the following problem

Conversion command
E:\pandoc-2.7-windows-i386\pandoc.exe -s a.docx -t markdown-smart --wrap=none -o example35.md

Wong result :
image

One could test the problem with
a.docx

@agusmba
Copy link

agusmba commented Mar 4, 2019

That symbol is not a regular new line, but a soft return, and pandoc does not treat it as a new paragraph.
If you use a regular return, it'll probably work.

I simplified your formulas and tested it with:

$ pandoc -t native a.docx
[Para [Math DisplayMath "\\left( L - \\epsilon_{1} \\right)"]
,Para [Math DisplayMath "{\\Downarrow \n}\\left( L - \\epsilon_{1} \\right)"]
,Para [Math DisplayMath "{\\Downarrow \n}\\left( L - \\epsilon_{1} \\right)"]]

You can see the soft-breaks as \n in the formula, which are lost in the docx writer

@jgm
Copy link
Owner

jgm commented Mar 4, 2019

Maybe there's a way texmath can handle this better.
Transferring the issue there.

@jgm jgm transferred this issue from jgm/pandoc Mar 4, 2019
@jgm jgm changed the title only the two display style formula left, all other text was striped out. handling of soft breaks in omml input Mar 4, 2019
@jgm
Copy link
Owner

jgm commented Mar 4, 2019

It's a <w:br /> element inside math.

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