Closed mmahnic closed 12 years ago
I guess I'm not clear on the purpose of this. It seems as though it allows you to embed markdown inside of a LaTeX document, and then convert it to LaTeX?
Why not just write the document in markdown to begin with and convert the whole thing to LaTeX?
I'm sure I'm just missing something.
F-
Fletcher T. Penney fletcher@fletcherpenney.net
On Dec 20, 2011, at 4:47 PM, Marko Mahnič wrote:
Hi,
In the lualatex directory there is a module for LuaLaTeX that provides a method for writing markdown in LaTeX documents. It is in an early stage, but it's working. A test is provided if you want to give it a try.
You can merge this Pull Request by running:
git pull https://github.com/mmahnic/peg-multimarkdown master
Or you can view, comment on it, or merge it online at:
https://github.com/fletcher/peg-multimarkdown/pull/98
-- Commit Summary --
- Initial import of the lualatex module.
- Test added.
- Cleanup.
- Minor doc update
-- File Changes --
A lualatex/.gitignore (7) A lualatex/Makefile (64) A lualatex/README.markdown (61) A lualatex/luamarkdown.c (47) A lualatex/multimarkdown.lua (158) A lualatex/multimarkdown.sty (41) A lualatex/test/doit.sh (5) A lualatex/test/example.mkd (57) A lualatex/test/mkdtest.tex (52)
-- Patch Links --
https://github.com/fletcher/peg-multimarkdown/pull/98.patch https://github.com/fletcher/peg-multimarkdown/pull/98.diff
Reply to this email directly or view it on GitHub: https://github.com/fletcher/peg-multimarkdown/pull/98
I guess I'm not clear on the purpose of this. It seems as though it allows you to embed markdown inside of a LaTeX document, and then convert it to LaTeX?
Precisely.
Why not just write the document in markdown to begin with and convert the whole thing to LaTeX?
I'm sure I'm just missing something.
Yes, if you want LaTeX code, this is still the best way. If you are only interested in the final PDF, these are some of the advantages of the proposed module:
the LaTeX template could be kept in one file, while currently multiple documents have to be referenced while transforming markdown to LaTeX:
% File: example.mkd
LaTeX Input: mmd-memoir-header
LaTeX Input: mmd-memoir-begin-doc
LaTeX Footer: mmd-memoir-footer
% File: example.tex
[code copied from mmd-memoir-header]
[code copied from mmd-memoir-begin]
\includemarkdown{example.mkd}{mode=memoir} % (mode is currently not implemented)
[code copied from mmd-memoir-footer]
if a document needs a slight modification of a template specific to the document, no new template file has to be created. Instead:
% File: example.tex
\input{mmd-memoir-header}
\input{mmd-memoir-begin}
\includemarkdown{example.mkd}{mode=memoir}
[modified code from mmd-memoir-footer]
Sounds interesting, but probably not something I would use myself.
Good luck with the project!
Fletcher
Fletcher T. Penney fletcher@fletcherpenney.net
On Dec 21, 2011, at 4:21 AM, Marko Mahnič wrote:
I guess I'm not clear on the purpose of this. It seems as though it allows you to embed markdown inside of a LaTeX document, and then convert it to LaTeX?
Precisely.
Why not just write the document in markdown to begin with and convert the whole thing to LaTeX?
I'm sure I'm just missing something.
Yes, if you want LaTeX code, this is still the best way. If you are only interested in the final PDF, these are some of the advantages of the proposed module:
the LaTeX template could be kept in one file, while currently multiple documents have to be referenced while transforming markdown to LaTeX:
- current situation:
% File: example.mkd LaTeX Input: mmd-memoir-header LaTeX Input: mmd-memoir-begin-doc LaTeX Footer: mmd-memoir-footer
new situation:
% File: example.tex [code copied from mmd-memoir-header] [code copied from mmd-memoir-begin] \includemarkdown{example.mkd}{mode=memoir} % (mode is currently not implemented) [code copied from mmd-memoir-footer]
if a document needs a slight modification of a template specific to the document, no new template file has to be created. Instead:
% File: example.tex \input{mmd-memoir-header} \input{mmd-memoir-begin} \includemarkdown{example.mkd}{mode=memoir} [modified code from mmd-memoir-footer]
- one can include multiple markdown files into a single document
- formatting is not part of the markdown document so it can be easily changed (eg. example-beamer.tex, example-article.tex); in a future version the proposed module will remove the unwanted headers from the markdown document if so instructed.
- only one program has to be run (lualatex)
- no temporary LaTeX file is generated
Reply to this email directly or view it on GitHub: https://github.com/fletcher/peg-multimarkdown/pull/98#issuecomment-3231456
Thanks,
Marko
Hi,
In the lualatex directory there is a module for LuaLaTeX that provides a method for writing markdown in LaTeX documents. It is in an early stage, but it's working. A test is provided if you want to give it a try.