# Markdown-LaTeX This is a Python script that looks for a README written with Markdown + $$\LaTeX$$ and outputs a README.md with the $$\LaTeX$$ equations replaced by images rendered by [CodeCogs]. You can use it with other Markdown files, just pass the path to them as an argument to the script: ``` python insert_equations.py [MARKDOWN_FILE_PATH] ``` ## How to write the equations To type the equations in the original document, just put them between double dolar signs ($). As an example, this is a [README.md] generated by the [README] in this repo using that script, so we can type things like this: $$ J(\mathbf{W_1}, \mathbf{b_1}, \mathbf{W_2}, \mathbf{b_2}) = \frac{1}{2t}\mathbf{1_v}^T \cdot [((\mathbf{a_3} - \mathbf{X}) \odot (\mathbf{a_3} - \mathbf{X})) \cdot \mathbf{1_t}] + \frac{\lambda}{2}[\mathbf{1_h}^T \cdot (\mathbf{W_1}\odot \mathbf{W_1}) \cdot \mathbf{1_v} + \mathbf{1_v}^T \cdot (\mathbf{W_2}\odot \mathbf{W_2}) \cdot \mathbf{1_h} ] + \beta\mathbf{1_h}^T \cdot [\rho \log(\rho\mathbf{1_h} \oslash \boldsymbol{\hat \rho}) + (1 - \rho)\log((\mathbf{1_h}-\rho\mathbf{1_h}) \oslash (\mathbf{1_h} - \boldsymbol{\hat \rho}))]$$. Now compare the [README] and the raw version of this [README.md]. That's a simple way to write equations here in Github. Have $$f \cup \mathbb{N}$$! [CodeCogs]:http://www.codecogs.com/latex/eqneditor.php [README]:https://raw.github.com/allanino/markdown-latex/master/README [README.md]:https://raw.github.com/allanino/markdown-latex/master/README.md