md2tex
is a command-line tool for converting Markdown files into LaTeX format. Written in Node.js, it's easy to install and use.
-
For those who have Node.js and npm
npm install -g md2tex
-
For those who don't have Node.js and npm Currently,
md2tex
can be installed by downloading the pre-compiled binary file. Please select the appropriate version for your operating system.
Using md2tex
is straightforward. To convert a Markdown file to LaTeX format, use the following command in the terminal:
md2tex <inputFile.md> -o <outputFile.tex>
-
<inputFile.md>
: The path to the Markdown file you want to convert. -
-o <outputFile.tex>
: (Optional) Specifies the path of the output file. If this option is not provided, a.tex
file with the same name will be created in the same directory as the input file.
To convert input.md
to LaTeX format and save it as output.tex
:
md2tex input.md -o output.tex
If you do not specify an output file:
md2tex input.md
This will create output.tex
in the same directory as input.md
.
I apologize for the frequent updates and modifications. This is my first time creating a tool like this with Node.js, and there are many aspects I didn't fully consider.
- 2024/03/05
-
Added: Added functionality for converting
table
. -
Added: Added functionality for converting
list
withinblockquote
.
- 2024/03/05
-
Fixed: Fixed some issues within
display-math
functionality.
- 2024/03/05
-
Added: Added functionality for converting
display-math
withinblockquote
.
- 2024/02/29
-
Added: Introduced functionality for converting
underline
.
- 2024/02/28
-
Added: Implemented functionality for converting
blockquote/display-code
.
- 2024/02/27
-
Added: Released the initial version, which includes basic functionality for conversions (
display-math
,inline-math
,inline-code
,bold
,italic
, etc.).
md2tex
is released under the MIT license. For more information, see the LICENSE file.