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

Feature Request: Add LaTeX to Markdown Conversion Support #1147

Open
sommio opened this issue Mar 21, 2025 · 1 comment
Open

Feature Request: Add LaTeX to Markdown Conversion Support #1147

sommio opened this issue Mar 21, 2025 · 1 comment

Comments

@sommio
Copy link

sommio commented Mar 21, 2025

I tried to use markitdown to convert latex to markdown, but unfortunately markitdown doesn't seem to support latex at the moment.

❯ markitdown new.tex -o new.md
Traceback (most recent call last):
  File "/usr/bin/markitdown", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/lib/python3.13/site-packages/markitdown/__main__.py", line 186, in main
    result = markitdown.convert(args.filename, stream_info=stream_info)
  File "/usr/lib/python3.13/site-packages/markitdown/_markitdown.py", line 256, in convert
    return self.convert_local(source, stream_info=stream_info, **kwargs)
           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/markitdown/_markitdown.py", line 307, in convert_local
    guesses = self._get_stream_info_guesses(
        file_stream=fh, base_guess=base_guess
    )
  File "/usr/lib/python3.13/site-packages/markitdown/_markitdown.py", line 616, in _get_stream_info_guesses
    if result.status == "ok" and result.prediction.output.label != "unknown":
       ^^^^^^^^^^^^^
AttributeError: 'MagikaResult' object has no attribute 'status'
@afourney
Copy link
Member

Hmm, it seems there's a bug here... the error message should be about an unknown format. I will look into that.

As for Latex support, what did you have in mind? I imagine one could render latex to html, and then we could convert that to markdown pretty easily.

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