Skip to content

gloridifice/markdown-latex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdown -> LaTex

markdown-latex is an executable app for converting markdown to latex.

Tips: the code for this project is mainly generated by neural network (but this readme is written by human).

Usage

$ markdown-latex foo.md

It will generate foo.tex in the same path.

$ markdown-latex foo.md build/foo.tex

Use second argument to define the output path manually.

$ markdown-latex --help

Use --help to get help message.

For macOS user

If you are prompted that you cannot open the program when using binaries from GitHub release, try the following steps:

  1. Right-click on the app.
  2. Hold down the Option key and click Open.
  3. The app will run and exit immediately. Then you can use this app normally.

Supported Grammar

Name Markdown Generated LaTeX Tips
Chapter # \chapter{}
Section ## \section{}
Subsection ### \subsection{}
Sub-subsection #### \subsubsection{}
Sub-sub-subsection ##### \paragraph{}
Cite [`<foo>`] \cite{<foo>}
Hyperlink [<foo>](<bar>) \href{<bar>}{<foo>} hyperrefpackage needed
Unordered list - <foo> \begin{itemize} \item <foo> \end{itemize}
Ordered list 1. <foo> \begin{enumerate} \item <foo> \end{enumerate}
Inline equation $<foo>$ $<foo>$
Equation block $$ {<label>} <foo> $$ \begin{equation} <foo> \label{eq:<label>} \end{equation} amsmath package needed
Image ![<caption>](<path>) \begin{figure}[h] \includegraphics{<path>} \caption{<caption>} \label{fig:<path>} \end{figure} graphicx package needed
Bold **<foo>** \textbf{<foo>}
Italic *<foo>* \textit{<foo>}
Table Markdown table tabularx table tabularx package needed
Code block Markdown code block listings code block listingspackage needed

Heading classes

You can use markdown heading class .unnumbered to make a heading unnumbered. It won't be in contents if a heading is unnumbered. Use .add-contents to add the heading to contents manually.

### This is a unnumbered heading {.unnumbered .add-contents}

Example

See file_test/test.md and file_test/test.tex.

About

A command line tool converting Markdown .md file into Latex . tex

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •