microsoft / microsoft/markitdown

Feature Request: Add LaTeX to Markdown Conversion Support

Open
#1,147 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
186k
Forks
13.7k
Avg merge
1d 4h
Merged PRs (30d)
49

Description

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'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported markitdown new.tex -o new.md command, then inspect markitdown/_markitdown.py, especially convert_local and _get_stream_info_guesses. Done means a LaTeX file can be converted to Markdown without the reported MagikaResult traceback; the issue does not define the expected Markdown output.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex, python
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.