{"id":22411022,"url":"https://github.com/dynstat/markdown-equations-fixer","last_synced_at":"2025-10-15T19:32:36.546Z","repository":{"id":264464038,"uuid":"893451647","full_name":"dynstat/markdown-equations-fixer","owner":"dynstat","description":"A command-line tool that converts LaTeX-style mathematical equations to proper markdown format within your markdown files, and can also convert to word docx.","archived":false,"fork":false,"pushed_at":"2025-01-24T19:26:23.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T19:46:22.827Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/markdown-equations-fixer/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dynstat.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-24T13:40:31.000Z","updated_at":"2025-01-24T19:24:47.000Z","dependencies_parsed_at":"2024-11-24T14:38:29.995Z","dependency_job_id":null,"html_url":"https://github.com/dynstat/markdown-equations-fixer","commit_stats":null,"previous_names":["dynstat/markdown-equations-fixer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynstat%2Fmarkdown-equations-fixer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynstat%2Fmarkdown-equations-fixer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynstat%2Fmarkdown-equations-fixer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynstat%2Fmarkdown-equations-fixer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dynstat","download_url":"https://codeload.github.com/dynstat/markdown-equations-fixer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236636254,"owners_count":19181028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T13:12:46.397Z","updated_at":"2025-10-15T19:32:36.522Z","avatar_url":"https://github.com/dynstat.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Markdown Equations Fixer and Converter\n\n[![PyPI version](https://badge.fury.io/py/markdown-equations-fixer.svg)](https://badge.fury.io/py/markdown-equations-fixer)\n[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA versatile command-line tool to standardize and fix mathematical equations in Markdown files and convert documents between various formats like Markdown, LaTeX, DOCX, and PDF.\n\n## Table of Contents\n\n- [Key Features](#key-features)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Command: `fix`](#command-fix)\n  - [Command: `convert`](#command-convert)\n- [Requirements](#requirements)\n  - [Python Packages](#python-packages)\n  - [System Dependencies](#system-dependencies)\n- [License](#license)\n- [Contributing](#contributing)\n\n## Key Features\n\n- **Fix Markdown Equations**: Standardizes common LaTeX-style equations to a consistent Markdown format.\n  - Converts block equations from `\\[...\\]` to the widely supported `$$...$$`.\n  - Converts inline equations from `\\(...\\)` to `$..$`.\n  - Handles both single-line and multi-line equations gracefully.\n- **Document Conversion**: Leverages Pandoc to convert files between a variety of formats, including:\n  - `markdown`, `gfm` (GitHub-Flavored Markdown), `commonmark`\n  - `latex`\n  - `org`\n  - `docx`\n  - `pdf`\n- **User-Friendly CLI**:\n  - Process multiple files or entire directories at once.\n  - `--recursive` flag to scan through subdirectories.\n  - `--dry-run` mode to preview changes without modifying files.\n  - Rich console output with progress bars and status indicators.\n\n## Installation\n\nYou can install the package directly from PyPI:\n\n```bash\npip install markdown-equations-fixer\n```\n\nOr, to install the latest development version from GitHub:\n\n```bash\npip install git+https://github.com/dynstat/markdown-equations-fixer.git\n```\n\n## Usage\n\nThe tool provides two main commands: `fix` and `convert`.\n\n### Command: `fix`\n\nUse the `fix` command to standardize mathematical equations within your Markdown files (`.md`, `.markdown`).\n\n**Syntax:**\n```bash\nmeq-fixer fix [OPTIONS] [PATHS]...\n```\n\n**Examples:**\n\n1.  **Fix a single file:**\n    ```bash\n    meq-fixer fix document.md\n    ```\n\n2.  **Fix multiple files and directories:**\n    ```bash\n    meq-fixer fix file1.md ./docs/\n    ```\n\n3.  **Recursively fix all markdown files in a directory:**\n    ```bash\n    meq-fixer fix -r ./my-project/\n    ```\n\n4.  **Preview changes without saving them (dry run):**\n    ```bash\n    meq-fixer fix --dry-run thesis.md\n    ```\n\n**Options:**\n\n-   `--dry-run`: Preview changes without modifying files.\n-   `--verbose`, `-v`: Show detailed, file-by-file progress.\n-   `--recursive`, `-r`: Process directories recursively.\n\n### Command: `convert`\n\nUse the `convert` command to translate documents between different formats.\n\n**Syntax:**\n```bash\nmeq-fixer convert [OPTIONS] \u003cINPUT_FILE\u003e \u003cOUTPUT_FILE\u003e\n```\n\n**Examples:**\n\n1.  **Convert Markdown to a DOCX document:**\n    ```bash\n    meq-fixer convert my-paper.md my-paper.docx --to-format docx\n    ```\n\n2.  **Convert a LaTeX file to GitHub-Flavored Markdown (GFM):**\n    ```bash\n    meq-fixer convert report.tex report.md --from-format latex --to-format gfm\n    ```\n\n3.  **Convert to Markdown and fix equations in one step:**\n    The `--fix-equations` flag applies the same logic as the `fix` command to the *output* file. This is only useful when converting *to* a Markdown format.\n    ```bash\n    meq-fixer convert paper.tex paper.md --to-format markdown --fix-equations\n    ```\n\n**Options:**\n\n-   `--from-format`, `-f`: The input format (e.g., `latex`, `markdown`).\n-   `--to-format`, `-t`: The output format (e.g., `docx`, `pdf`, `gfm`).\n-   `--fix-equations`: Fix equations in the output file (for Markdown output formats only).\n\n## Requirements\n\n### Python Packages\n\nThe installer will handle these dependencies automatically.\n\n-   `click\u003e=8.0.0`\n-   `rich\u003e=10.0.0`\n-   `pypandoc`\n\n### System Dependencies\n\nFor the `convert` command to function, especially for DOCX and PDF output, you must have the following software installed on your system:\n\n1.  **Pandoc**: A universal document converter.\n    -   **Windows (with Chocolatey)**: `choco install pandoc`\n    -   **macOS (with Homebrew)**: `brew install pandoc`\n    -   **Linux (Debian/Ubuntu)**: `sudo apt-get install pandoc`\n\n2.  **A LaTeX Distribution**: Required for rendering equations in PDF and DOCX files.\n    -   **Windows**: MiKTeX (`choco install miktex`)\n    -   **macOS**: MacTeX (`brew install --cask mactex` or `basictex`)\n    -   **Linux (Debian/Ubuntu)**: TeX Live (`sudo apt-get install texlive-latex-extra`)\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nIssues and pull requests are welcome! Please feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/dynstat/markdown-equations-fixer/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynstat%2Fmarkdown-equations-fixer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdynstat%2Fmarkdown-equations-fixer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynstat%2Fmarkdown-equations-fixer/lists"}