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

Convert from example result in IndexError: list index out of range #33

Closed
DenisSalem opened this issue Oct 11, 2018 · 4 comments

Comments

@DenisSalem
Copy link

commented Oct 11, 2018

Hello there, I have a file (math.txt) with the following content (from examples).

 \begin{bmatrix}
  a_{1,1} & a_{1,2} & \cdots & a_{1,n} \\
  a_{2,1} & a_{2,2} & \cdots & a_{2,n} \\
  \vdots  & \vdots  & \ddots & \vdots  \\
  a_{m,1} & a_{m,2} & \cdots & a_{m,n} 
 \end{bmatrix}

The code below is trying to parse and convert the above but fail with IndexError: list index out ouf range

#! /usr/bin/python3

import latex2mathml.converter

latex_input = open("math.txt","r").read().strip()
mathml_output = latex2mathml.converter.convert(latex_input)
print(mathml_output)

Is there something I'm doing the wrong way? I'm using version 2.5.2

@DenisSalem DenisSalem changed the title IndexError: list index out of range Convert from example result in IndexError: list index out of range Oct 11, 2018

@roniemartinez roniemartinez self-assigned this Oct 11, 2018

@roniemartinez

This comment has been minimized.

Copy link
Owner

commented Oct 11, 2018

Hi @DenisSalem
I wasn't able to test this after I migrated the parser to TexSoup. Thanks for checking. I will begin fixing this.

@roniemartinez roniemartinez added the bug label Oct 11, 2018

@DenisSalem

This comment has been minimized.

Copy link
Author

commented Oct 11, 2018

@Code-ReaQtor Thank you for the quick reply and your awesome work!

roniemartinez added a commit that referenced this issue Oct 13, 2018
Drop TexSoup (#33)
- Support Python 2.7
roniemartinez added a commit that referenced this issue Oct 13, 2018
roniemartinez added a commit that referenced this issue Oct 13, 2018
roniemartinez added a commit that referenced this issue Oct 13, 2018
Merge branch 'develop' into 2.6.0 (#33)
# Conflicts:
#	latex2mathml/aggregator.py
#	setup.py
#	tests/test_command.py
roniemartinez added a commit that referenced this issue Oct 13, 2018
@roniemartinez roniemartinez referenced this issue Oct 13, 2018
@roniemartinez

This comment has been minimized.

Copy link
Owner

commented Oct 13, 2018

Hi @DenisSalem

Version 2.6.0 have been released. Kindly check.

@DenisSalem

This comment has been minimized.

Copy link
Author

commented Nov 11, 2018

Thank you :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.