Skip to main content

A md-to-LaTeX converter

Project description

md2latex-converter introduction

pip install md2latex-converter

md2latex-converter is a Python package that helps to convert a .md (Markdown) file into a .tex (LaTeX) file, with special support for Chinese, using the ctex package provided by the LaTeX community.

md2latex-converter 是一个将 Markdown 文件转换成 LaTeX 源代码的 Python 工具包。使用了 LaTeX 的 ctex 包,因此对于 中文的编码环境有特别的关照。

Installation and Usage | 安装与使用

pip install md2latex-converter

This will install the package into your current python interpreter. The installation will add m2l.exe into the Scripts folder of python (on Windows) or m2l into ~/.local/bin/ by default (on Linux), if you have previously added the path above into your system PATH variable, you should be able to invoke the program through the command m2l.

这会在现有的 Python 解释器中安装此包。安装过程中会将 m2l.exe 安装在 当前的 Python 的 Scripts 路径(Windows)或默认将 m2l 安装到 ~/.local/bin/ 路径(Linux)。如果此前已经将这个路径加入了 PATH 变量, 那么可以通过 m2l 指令来运行此程序。

m2l file.md

This will read and convert the content in file.md into output.tex at the current working directory. After the conversion, use xelatex output to produce a .pdf file from the LaTeX source code.

这会读取并转换 file.md 的内容到当前工作路径的 output.tex 文件。在此之后,可以使用 xelatex output 来编译产生 pdf

Current progress and plans | 进度,安排

  • Currently m2l basically supports plain text, title, unordered/ordered lists and pictures (please use a local path if you do so, otherwise you are being impolite to LaTeX.)

  • The future versions will focus on equations, codeblocks and inline patterns (bold, italic, hyperlinks, inline-code-snippets, etc.)

  • 现阶段支持了纯文本,标题,有/无序列表,图片(本地url)等。

  • 未来版本计划支持公式、代码块和行内样式(粗体斜体超链接行内代码

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

md2latex_converter-0.0.3.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

md2latex_converter-0.0.3.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file md2latex_converter-0.0.3.1.tar.gz.

File metadata

  • Download URL: md2latex_converter-0.0.3.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for md2latex_converter-0.0.3.1.tar.gz
Algorithm Hash digest
SHA256 86ffad4742dcca0adfcba143394cef56ffe2476c43f466ae698d67ea6bab3252
MD5 77b000cc70fd68ba9aaae9b64c4936c7
BLAKE2b-256 4187422abd223ace32f93e576a8d40c25d2e99540fb77fa4e6bf8b3d65b83288

See more details on using hashes here.

File details

Details for the file md2latex_converter-0.0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for md2latex_converter-0.0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 68fbd7a7c3af1f3697f686468ded41779ec617974fc137f7096f53111442ca30
MD5 1c651db4a507520769a08a7b1a73ee15
BLAKE2b-256 20563df4aa42eade51eae791509d70ee3113c99cd6ab7176ebf2b091b92b8282

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page