Apologies in advance if the answer to my query is blindingly obvious---I am a UNIX newbie.
I am trying to implement Fletcher Penney's variant of Markdown, MultiMarkdown (http://fletcher.freeshell.org/wiki/MultiMarkdown), as a TextMate bundle. The basic idea is to convert a Markdown document into a full xhtml document and then to use xslt to convert it into different formats such as LaTeX.
I have written TextMate commands for each step of the process, and it all works fine, but I would also like to add commands that string these steps together. But there is a problem. For example, while the following two TextMate commands work:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" Input: None Output: Create New Document
Save: Nothing Command(s): #!/bin/bash /usr/bin/xsltproc -nonet -novalid /usr/local/bin/xhtml2article.xslt "$TM_FILEPATH" Input: None Output: Create New Document
the following fails---it generates an empty file:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" | /usr/bin/xsltproc - nonet -novalid /usr/local/bin/xhtml2article.xslt Input: None Output: Create New Document
Any ideas? Thanks in advance.
All the best, Mark _________________ Mark Eli Kalderon Department of Philosophy University College London Gower Street London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy Personal wepage: http://www.kalderon.demon.co.uk
Mark,
Here is my MultiMarkdown bundle.
There are commands to go from MultiMarkdown to Latex HTML PDF
I have found this to be a very useful little bundle. Let me know if you have any trouble.
Brad
On Mar 28, 2006, at 5:28 PM, Mark Eli Kalderon wrote:
Apologies in advance if the answer to my query is blindingly obvious---I am a UNIX newbie.
I am trying to implement Fletcher Penney's variant of Markdown, MultiMarkdown (http://fletcher.freeshell.org/wiki/MultiMarkdown), as a TextMate bundle. The basic idea is to convert a Markdown document into a full xhtml document and then to use xslt to convert it into different formats such as LaTeX.
I have written TextMate commands for each step of the process, and it all works fine, but I would also like to add commands that string these steps together. But there is a problem. For example, while the following two TextMate commands work:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" Input: None Output: Create New Document
Save: Nothing Command(s): #!/bin/bash /usr/bin/xsltproc -nonet -novalid /usr/local/bin/xhtml2article.xslt "$TM_FILEPATH" Input: None Output: Create New Document
the following fails---it generates an empty file:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" | /usr/bin/xsltproc - nonet -novalid /usr/local/bin/xhtml2article.xslt Input: None Output: Create New Document
Any ideas? Thanks in advance.
All the best, Mark _________________ Mark Eli Kalderon Department of Philosophy University College London Gower Street London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy Personal wepage: http://www.kalderon.demon.co.uk
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Thanks, Brad, I am keen to see what you have done with this. Thanks. Best, Mark On 29 Mar 2006, at 17:05, Brad Miller wrote:
Mark,
Here is my MultiMarkdown bundle.
There are commands to go from MultiMarkdown to Latex HTML PDF
I have found this to be a very useful little bundle. Let me know if you have any trouble.
<multimarkdown.zip>
Brad
On Mar 28, 2006, at 5:28 PM, Mark Eli Kalderon wrote:
Apologies in advance if the answer to my query is blindingly obvious---I am a UNIX newbie.
I am trying to implement Fletcher Penney's variant of Markdown, MultiMarkdown (http://fletcher.freeshell.org/wiki/MultiMarkdown), as a TextMate bundle. The basic idea is to convert a Markdown document into a full xhtml document and then to use xslt to convert it into different formats such as LaTeX.
I have written TextMate commands for each step of the process, and it all works fine, but I would also like to add commands that string these steps together. But there is a problem. For example, while the following two TextMate commands work:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" Input: None Output: Create New Document
Save: Nothing Command(s): #!/bin/bash /usr/bin/xsltproc -nonet -novalid /usr/local/bin/ xhtml2article.xslt "$TM_FILEPATH" Input: None Output: Create New Document
the following fails---it generates an empty file:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" | /usr/bin/xsltproc -nonet -novalid /usr/local/bin/xhtml2article.xslt Input: None Output: Create New Document
Any ideas? Thanks in advance.
All the best, Mark _________________ Mark Eli Kalderon Department of Philosophy University College London Gower Street London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy Personal wepage: http://www.kalderon.demon.co.uk
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Thanks again, Brad. It was useful to have a look at this. Is there any particular reason you are using htmldoc in generating the PDF? As opposed to pdflatex say? Is it because htmldoc does a better job at generating pdfs viewable online? Best, Mark On 29 Mar 2006, at 17:05, Brad Miller wrote:
Mark,
Here is my MultiMarkdown bundle.
There are commands to go from MultiMarkdown to Latex HTML PDF
I have found this to be a very useful little bundle. Let me know if you have any trouble.
<multimarkdown.zip>
Brad
On Mar 28, 2006, at 5:28 PM, Mark Eli Kalderon wrote:
Apologies in advance if the answer to my query is blindingly obvious---I am a UNIX newbie.
I am trying to implement Fletcher Penney's variant of Markdown, MultiMarkdown (http://fletcher.freeshell.org/wiki/MultiMarkdown), as a TextMate bundle. The basic idea is to convert a Markdown document into a full xhtml document and then to use xslt to convert it into different formats such as LaTeX.
I have written TextMate commands for each step of the process, and it all works fine, but I would also like to add commands that string these steps together. But there is a problem. For example, while the following two TextMate commands work:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" Input: None Output: Create New Document
Save: Nothing Command(s): #!/bin/bash /usr/bin/xsltproc -nonet -novalid /usr/local/bin/ xhtml2article.xslt "$TM_FILEPATH" Input: None Output: Create New Document
the following fails---it generates an empty file:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" | /usr/bin/xsltproc -nonet -novalid /usr/local/bin/xhtml2article.xslt Input: None Output: Create New Document
Any ideas? Thanks in advance.
All the best, Mark _________________ Mark Eli Kalderon Department of Philosophy University College London Gower Street London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy Personal wepage: http://www.kalderon.demon.co.uk
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Mark,
Good question. It was mostly for experimental reasons.
Around the time I did this there was lots of chat on ##textmate about various approaches to go from something like markdown to pdf. Several people were very anti xslt, and htmldoc sounded like one of the favorites at the time, and for smallish kinds of documents htmldoc seemed like it was quicker and more efficient than
MultiMarkdown -> xhtml -> Latex -> pdf
For more complicated documents I have had great luck writing the bulk of my document in multimarkdown and then tweaking the final markup in the generated latex document.
Brad
On Mar 29, 2006, at 1:49 PM, Mark Eli Kalderon wrote:
Thanks again, Brad. It was useful to have a look at this. Is there any particular reason you are using htmldoc in generating the PDF? As opposed to pdflatex say? Is it because htmldoc does a better job at generating pdfs viewable online? Best, Mark On 29 Mar 2006, at 17:05, Brad Miller wrote:
Mark,
Here is my MultiMarkdown bundle.
There are commands to go from MultiMarkdown to Latex HTML PDF
I have found this to be a very useful little bundle. Let me know if you have any trouble.
<multimarkdown.zip>
Brad
On Mar 28, 2006, at 5:28 PM, Mark Eli Kalderon wrote:
Apologies in advance if the answer to my query is blindingly obvious---I am a UNIX newbie.
I am trying to implement Fletcher Penney's variant of Markdown, MultiMarkdown (http://fletcher.freeshell.org/wiki/MultiMarkdown), as a TextMate bundle. The basic idea is to convert a Markdown document into a full xhtml document and then to use xslt to convert it into different formats such as LaTeX.
I have written TextMate commands for each step of the process, and it all works fine, but I would also like to add commands that string these steps together. But there is a problem. For example, while the following two TextMate commands work:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" Input: None Output: Create New Document
Save: Nothing Command(s): #!/bin/bash /usr/bin/xsltproc -nonet -novalid /usr/local/bin/ xhtml2article.xslt "$TM_FILEPATH" Input: None Output: Create New Document
the following fails---it generates an empty file:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" | /usr/bin/ xsltproc -nonet -novalid /usr/local/bin/xhtml2article.xslt Input: None Output: Create New Document
Any ideas? Thanks in advance.
All the best, Mark _________________ Mark Eli Kalderon Department of Philosophy University College London Gower Street London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy Personal wepage: http://www.kalderon.demon.co.uk
__ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For those of us who are real dummies, but fans of Markdown, could you elaborate on where to put what to get MultiMarkdown (MM) to work with Textmate (TM)?
I downloaded MM and stashed it in ~/Library/Application Support/Textmate/Support/bin. I put MM in ~/Lib ... /Bundles and called it Markdown.pl. I copied a chunk from the demo and tried to preview it. Got lots of "can't find" errors. Maybe I can puzzle this out but if you have a minute or so, a few hints would be really helpful.
Lewy
On 3/29/06, Brad Miller bonelake@mac.com wrote:
Mark,
Good question. It was mostly for experimental reasons.
Around the time I did this there was lots of chat on ##textmate about various approaches to go from something like markdown to pdf. Several people were very anti xslt, and htmldoc sounded like one of the favorites at the time, and for smallish kinds of documents htmldoc seemed like it was quicker and more efficient than
MultiMarkdown -> xhtml -> Latex -> pdf
For more complicated documents I have had great luck writing the bulk of my document in multimarkdown and then tweaking the final markup in the generated latex document.
Brad
On Mar 29, 2006, at 1:49 PM, Mark Eli Kalderon wrote:
Thanks again, Brad. It was useful to have a look at this. Is there any particular reason you are using htmldoc in generating the PDF? As opposed to pdflatex say? Is it because htmldoc does a better job at generating pdfs viewable online? Best, Mark On 29 Mar 2006, at 17:05, Brad Miller wrote:
Mark,
Here is my MultiMarkdown bundle.
There are commands to go from MultiMarkdown to Latex HTML PDF
I have found this to be a very useful little bundle. Let me know if you have any trouble.
<multimarkdown.zip>
Brad
On Mar 28, 2006, at 5:28 PM, Mark Eli Kalderon wrote:
Apologies in advance if the answer to my query is blindingly obvious---I am a UNIX newbie.
I am trying to implement Fletcher Penney's variant of Markdown, MultiMarkdown (http://fletcher.freeshell.org/wiki/MultiMarkdown), as a TextMate bundle. The basic idea is to convert a Markdown document into a full xhtml document and then to use xslt to convert it into different formats such as LaTeX.
I have written TextMate commands for each step of the process, and it all works fine, but I would also like to add commands that string these steps together. But there is a problem. For example, while the following two TextMate commands work:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" Input: None Output: Create New Document
Save: Nothing Command(s): #!/bin/bash /usr/bin/xsltproc -nonet -novalid /usr/local/bin/ xhtml2article.xslt "$TM_FILEPATH" Input: None Output: Create New Document
the following fails---it generates an empty file:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" | /usr/bin/ xsltproc -nonet -novalid /usr/local/bin/xhtml2article.xslt Input: None Output: Create New Document
Any ideas? Thanks in advance.
All the best, Mark _________________ Mark Eli Kalderon Department of Philosophy University College London Gower Street London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy Personal wepage: http://www.kalderon.demon.co.uk
__ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
The easiest thing to do is take the bundle that I posted to the list earlier today unzip it and put it in ~/Library/Application Suppport/ TextMate/Bundles (or just unzip and double click on it)
The bundle contains all the MultiMarkdown scripts and xslt files needed.
Brad
On Mar 29, 2006, at 7:57 PM, Lewis Overton wrote:
For those of us who are real dummies, but fans of Markdown, could you elaborate on where to put what to get MultiMarkdown (MM) to work with Textmate (TM)?
I downloaded MM and stashed it in ~/Library/Application Support/ Textmate/Support/bin. I put MM in ~/Lib ... /Bundles and called it Markdown.pl. I copied a chunk from the demo and tried to preview it. Got lots of "can't find" errors. Maybe I can puzzle this out but if you have a minute or so, a few hints would be really helpful.
Lewy
On 3/29/06, Brad Miller bonelake@mac.com wrote: Mark,
Good question. It was mostly for experimental reasons.
Around the time I did this there was lots of chat on ##textmate about various approaches to go from something like markdown to pdf. Several people were very anti xslt, and htmldoc sounded like one of the favorites at the time, and for smallish kinds of documents htmldoc seemed like it was quicker and more efficient than
MultiMarkdown -> xhtml -> Latex -> pdf
For more complicated documents I have had great luck writing the bulk of my document in multimarkdown and then tweaking the final markup in the generated latex document.
Brad
On Mar 29, 2006, at 1:49 PM, Mark Eli Kalderon wrote:
Thanks again, Brad. It was useful to have a look at this. Is there any particular reason you are using htmldoc in generating the PDF? As opposed to pdflatex say? Is it because htmldoc does a better job at generating pdfs viewable online? Best, Mark On 29 Mar 2006, at 17:05, Brad Miller wrote:
Mark,
Here is my MultiMarkdown bundle.
There are commands to go from MultiMarkdown to Latex HTML PDF
I have found this to be a very useful little bundle. Let me know if you have any trouble.
<multimarkdown.zip>
Brad
On Mar 28, 2006, at 5:28 PM, Mark Eli Kalderon wrote:
Apologies in advance if the answer to my query is blindingly obvious---I am a UNIX newbie.
I am trying to implement Fletcher Penney's variant of Markdown, MultiMarkdown (http://fletcher.freeshell.org/wiki/MultiMarkdown), as a TextMate bundle. The basic idea is to convert a Markdown document into a full xhtml document and then to use xslt to convert it into different formats such as LaTeX.
I have written TextMate commands for each step of the process, and it all works fine, but I would also like to add commands that string these steps together. But there is a problem. For example, while the following two TextMate commands work:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" Input: None Output: Create New Document
Save: Nothing Command(s): #!/bin/bash /usr/bin/xsltproc -nonet -novalid /usr/local/bin/ xhtml2article.xslt "$TM_FILEPATH" Input: None Output: Create New Document
the following fails---it generates an empty file:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" | /usr/bin/ xsltproc -nonet -novalid /usr/local/bin/xhtml2article.xslt Input: None Output: Create New Document
Any ideas? Thanks in advance.
All the best, Mark _________________ Mark Eli Kalderon Department of Philosophy University College London Gower Street London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy Personal wepage: http://www.kalderon.demon.co.uk
__ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you
don't)
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Thanks. I finally blundered my way to that after downloading MultiMarkdown and SmartyPants and putting them into ~/bin which is in my $PATH. MM now works from command line and from Textmate. I suppose, after rebooting my brain, that what i really want is the language definition which lets me use shortcuts.
I just discovered MultiMarkdown and have become quite fond of Markdown with TextMate. But Markdown wasn't enough for the websites or compatible with the Wiki. Well done, folks.
Lewy
On 3/29/06, Brad Miller bonelake@mac.com wrote:
The easiest thing to do is take the bundle that I posted to the list earlier today unzip it and put it in ~/Library/Application Suppport/TextMate/Bundles (or just unzip and double click on it) The bundle contains all the MultiMarkdown scripts and xslt files needed.
Brad
On Mar 29, 2006, at 7:57 PM, Lewis Overton wrote:
For those of us who are real dummies, but fans of Markdown, could you elaborate on where to put what to get MultiMarkdown (MM) to work with Textmate (TM)?
I downloaded MM and stashed it in ~/Library/Application Support/Textmate/Support/bin. I put MM in ~/Lib ... /Bundles and called it Markdown.pl. I copied a chunk from the demo and tried to preview it. Got lots of "can't find" errors. Maybe I can puzzle this out but if you have a minute or so, a few hints would be really helpful.
Lewy
On 3/29/06, Brad Miller <bonelake@mac.com > wrote:
Mark,
Good question. It was mostly for experimental reasons.
Around the time I did this there was lots of chat on ##textmate about various approaches to go from something like markdown to pdf. Several people were very anti xslt, and htmldoc sounded like one of the favorites at the time, and for smallish kinds of documents htmldoc seemed like it was quicker and more efficient than
MultiMarkdown -> xhtml -> Latex -> pdf
For more complicated documents I have had great luck writing the bulk of my document in multimarkdown and then tweaking the final markup in the generated latex document.
Brad
On Mar 29, 2006, at 1:49 PM, Mark Eli Kalderon wrote:
Thanks again, Brad. It was useful to have a look at this. Is there any particular reason you are using htmldoc in generating the PDF? As opposed to pdflatex say? Is it because htmldoc does a better job at generating pdfs viewable online? Best, Mark On 29 Mar 2006, at 17:05, Brad Miller wrote:
Mark,
Here is my MultiMarkdown bundle.
There are commands to go from MultiMarkdown to Latex HTML PDF
I have found this to be a very useful little bundle. Let me know if you have any trouble.
<multimarkdown.zip>
Brad
On Mar 28, 2006, at 5:28 PM, Mark Eli Kalderon wrote:
Apologies in advance if the answer to my query is blindingly obvious---I am a UNIX newbie.
I am trying to implement Fletcher Penney's variant of Markdown, MultiMarkdown ( http://fletcher.freeshell.org/wiki/MultiMarkdown), as a TextMate bundle. The basic idea is to convert a Markdown document into a full xhtml document and then to use xslt to convert it into different formats such as LaTeX.
I have written TextMate commands for each step of the process, and it all works fine, but I would also like to add commands that string these steps together. But there is a problem. For example, while the following two TextMate commands work:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" Input: None Output: Create New Document
Save: Nothing Command(s): #!/bin/bash /usr/bin/xsltproc -nonet -novalid /usr/local/bin/ xhtml2article.xslt "$TM_FILEPATH" Input: None Output: Create New Document
the following fails---it generates an empty file:
Save: Nothing Command(s): #!/bin/bash /usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" | /usr/bin/ xsltproc -nonet -novalid /usr/local/bin/xhtml2article.xslt Input: None Output: Create New Document
Any ideas? Thanks in advance.
All the best, Mark _________________ Mark Eli Kalderon Department of Philosophy University College London Gower Street London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy Personal wepage: http://www.kalderon.demon.co.uk
__ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Brad, Thanks for the MultiMarkdown bundle. I love the "convert to pdf" but I am having troubles using the "convert document to LaTeX" command. My LaTeX installation works fine in textmate. The error I am getting is:
-:9: parser error : Extra content at the end of the document
<hr /> ^ unable to parse -
Does not look like a LateX issue. Any ideas?
Thanks Robert
On 29 Mar 2006, at 17:05, Brad Miller wrote:
Mark, Here is my MultiMarkdown bundle.
[snip]
I have found this to be a very useful little bundle. Let me know if you have any trouble. <multimarkdown.zip> Brad
[snip]
I am trying to implement Fletcher Penney's variant of Markdown, MultiMarkdown (http://fletcher.freeshell.org/wiki/ MultiMarkdown), as a TextMate bundle. The basic idea is to convert a Markdown document into a full xhtml document and then to use xslt to convert it into different formats such as LaTeX.
[snip]
Robert,
Do you have the line:
Format: complete
at the beginning of your markdown document? I have seen similar error messages when I have omitted that declaration.
If you have the line Format: complete, have you tried converting to html to see what that looks like? Does the document preview OK ?
Brad
On Apr 2, 2006, at 4:56 PM, Robert M. Ullrey wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Brad, Thanks for the MultiMarkdown bundle. I love the "convert to pdf" but I am having troubles using the "convert document to LaTeX" command. My LaTeX installation works fine in textmate. The error I am getting is:
-:9: parser error : Extra content at the end of the document
<hr /> ^ unable to parse -
Does not look like a LateX issue. Any ideas?
Thanks Robert
On 29 Mar 2006, at 17:05, Brad Miller wrote:
Mark, Here is my MultiMarkdown bundle.
[snip]
I have found this to be a very useful little bundle. Let me know if you have any trouble. <multimarkdown.zip> Brad
[snip]
I am trying to implement Fletcher Penney's variant of Markdown, MultiMarkdown (http://fletcher.freeshell.org/wiki/ MultiMarkdown), as a TextMate bundle. The basic idea is to convert a Markdown document into a full xhtml document and then to use xslt to convert it into different formats such as LaTeX.
[snip] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin)
iD8DBQFEMEij0ZwlS5OIzRcRAojiAJwIiuAWijWbun6ukUtxGmhi3XO6eQCfUSDQ 0qqHUD5/gYAP/+/n8ijePWc= =hKWw -----END PGP SIGNATURE-----
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Thanks Brad. That deceleration (fromat:complete) did it. I must have missed that I need it when reading Fletcher’s site. :) All work great now.
Robert
------------------------- On Sunday, April 2, 2006 Brad Miller wrote this observation:
Robert,
Do you have the line:
Format: complete
at the beginning of your markdown document? I have seen similar error messages when I have omitted that declaration.
In case anyone is interested, I followed Brad's lead and created the following command for generating rtf from markdown:
Save: Nothing
Command(s): # first figure out a name for the result NAME="${TM_FILENAME:-untitled}" BASENAME="${NAME%.*}" DST="/tmp/$BASENAME"
MultiMarkdown.pl "$NAME" | SmartyPants.pl > "$DST.html"
/usr/bin/textutil -convert rtf - extension rtf -font Times -fontsize 11 "$DST.html"
open -a TextEdit.app "$DST.rtf"
Input: Selected Text or Document
Output: Discard
One limitation---textutil won't generate rtf documents with images.
All the best, Mark _________________ Mark Eli Kalderon Department of Philosophy University College London Gower Street London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy Personal wepage: http://www.kalderon.demon.co.uk
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Thanks Mark.
Works great.
On Apr 4, 2006, at 2:41 PM, Mark Eli Kalderon wrote:
In case anyone is interested, I followed Brad's lead and created the following command for generating rtf from markdown:
Save: Nothing
Command(s): # first figure out a name for the result NAME="${TM_FILENAME:-untitled}" BASENAME="${NAME%.*}" DST="/tmp/$BASENAME"
MultiMarkdown.pl "$NAME" | SmartyPants.pl > "$DST.html"
/usr/bin/textutil -convert rtf - extension rtf -font Times - fontsize 11 "$DST.html"
open -a TextEdit.app "$DST.rtf"
Input: Selected Text or Document
Output: Discard
One limitation---textutil won't generate rtf documents with images.
All the best, Mark _________________ Mark Eli Kalderon Department of Philosophy University College London Gower Street London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy Personal wepage: http://www.kalderon.demon.co.uk
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Hi,
using Markdown a lot from time to time I looked at Brads bundle.
I modified it in these ways:
# NEW
* MultiMarkdown Language Grammar.
This is really just a wrapper for Markdown and includes the following `firstLineMatch = '^Format:.*$';` to distinguish between Markdown and MultiMarkdown. This makes the commands work unambiguously (Scope: `text.html.multimarkdown`). It assumes, that one starts the file with the Format Meta Tag, though. But this is a good idea anyway, I think :). Otherwise normal Markdown grammar will match. * Added “Preview” which renders the file in the HTML view.
* “Generate Output and open in Browser” stores the result of the HTML conversion in a file `output.html` in the current files directory (for now) and opens the file in the browser. This is particularly useful when using the “Style” Meta Tag to make use of a stylesheet which cannot be found by the “Preview” command because the file is in some temp directory really when viewing it in the HTML Preview. # CHANGED
* Scopes of all commands changed to `text.html.multimarkdown` (see above) * Convert Document / Selection to HTML
Omitted the clutter the Markdown bundle introduced by parsing heading and adding ids to them. This is done automagically by MultiMarkdown.
# TODO/Issues
* Omitting “Format: complete” seems to break the commands like “Convert Document/Selection to LaTeX”, maybe we should catch that * “Generate Output and open in Browser” will save the file in “/” (root directory) because `$TM_DIRECTORY` is not set. * Add a "Readme" that explains what is needed: e.g. `htmldoc` for the PDF Conversion
Soryu.
PS: And of course we should also include the “RTF Generation” command :)
update:
Allan spotted two things
* The scope of the language is now `text.html.markdown.multimarkdown` which implies that we are branching the markdown grammar. * Added fallback to `/tmp` for the “Generate Output and open in Browser” Command.
Furthermore I included the “Convert Document/Selection to RTF” command with a shortcut of Control-Shift-R and reordered the command a little.
Soryu.
On Apr 6, 2006, at 7:19 AM, Soryu wrote:
update:
Allan spotted two things
- The scope of the language is now
`text.html.markdown.multimarkdown` which implies that we are branching the markdown grammar.
- Added fallback to `/tmp` for the “Generate Output and open in
Browser” Command.
Furthermore I included the “Convert Document/Selection to RTF” command with a shortcut of Control-Shift-R and reordered the command a little.
Soryu.
I notice one problem with this bundle: all the files it creates and displays are in the /tmp folder. My Markdown document has relative links to images. The relative links are correct in the document, and with the normal Markdown preview, the images are displayed. But with the PDF and the Markdown HTML, the images don't exist in the /tmp folder and are not displayed.
Thoughts?
Ken Scott
On 6/4/2006, at 16:32, Ken Scott wrote:
I notice one problem with this bundle: all the files it creates and displays are in the /tmp folder. My Markdown document has relative links to images. The relative links are correct in the document, and with the normal Markdown preview, the images are displayed. But with the PDF and the Markdown HTML, the images don't exist in the / tmp folder and are not displayed.
Thoughts?
The regular Markdown preview command puts a base tag in the generated result which points to the document folder (via the tm-file://- scheme, to avoid WebKit’s security restrictions).
Similar could be done for the MultiMarkdown command.
On 06.04.2006, at 20:59, Allan Odgaard wrote:
On 6/4/2006, at 16:32, Ken Scott wrote:
I notice one problem with this bundle: all the files it creates and displays are in the /tmp folder. My Markdown document has relative links to images. The relative links are correct in the document, and with the normal Markdown preview, the images are displayed. But with the PDF and the Markdown HTML, the images don't exist in the /tmp folder and are not displayed.
Thoughts?
The regular Markdown preview command puts a base tag in the generated result which points to the document folder (via the tm- file://-scheme, to avoid WebKit’s security restrictions).
Similar could be done for the MultiMarkdown command.
There even is a meta tag for Base url, but it only seems to work for wiki links?
http://fletcher.freeshell.org/wiki/MultiMarkdown#baseurl
Soryu
On 6 Apr 2006, at 14:19, Soryu wrote:
update:
Allan spotted two things
- The scope of the language is now
`text.html.markdown.multimarkdown` which implies that we are branching the markdown grammar.
- Added fallback to `/tmp` for the “Generate Output and open in
Browser” Command.
Furthermore I included the “Convert Document/Selection to RTF” command with a shortcut of Control-Shift-R and reordered the command a little.
Soryu.
Thanks Soryu.
An observation. This does not include the latest version of MultiMarkdown.pl. If people update the script, xsltproc will need to be run with the -novalid and -nonet switches.
The Convert Document to LaTeX command uses xthml2article. Fletcher Penney also provides xhtml2memoir. Would it make sense to branch the command to Convert Document to LaTeX Article and Convert document to LaTeX Memoir?
- Omitting “Format: complete” seems to break the commands like
“Convert Document/Selection to LaTeX”, maybe we should catch that
This seems like more of a feature than a bug. "Format: Complete" functions as a switch---without it xhtml snippets are generated as opposed to whole documents, just like the original Markdown. That's the reason Convert Document to LaTeX chokes---since it gets an xhtml snippet as opposed to an xhtml document and xsltproc won't run properly. The reason it seems more like a feature is that sometimes you want to generate a snippet, sometimes a document, MultiMarkdown allows you to do both...
All the best, Mark
Cool,
I think there are enough of us using this that I would like to commit this to the bundle repository.
Here's the question: Should we keep this a separate bundle as it is today, or should we treat this like bibtex and Beamer in the latex bundle and just add it as part of the markdown bundle?
Brad
On Apr 6, 2006, at 8:19 AM, Soryu wrote:
update:
Allan spotted two things
- The scope of the language is now
`text.html.markdown.multimarkdown` which implies that we are branching the markdown grammar.
- Added fallback to `/tmp` for the “Generate Output and open in
Browser” Command.
Furthermore I included the “Convert Document/Selection to RTF” command with a shortcut of Control-Shift-R and reordered the command a little.
Soryu.
<MultiMarkdown.tmbundle.zip>
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Apr 6, 2006, at 10:10 AM, Brad Miller wrote:
I think there are enough of us using this that I would like to commit this to the bundle repository.
+1
Here's the question: Should we keep this a separate bundle as it is today, or should we treat this like bibtex and Beamer in the latex bundle and just add it as part of the markdown bundle?
I personally think it should be part of the markdown bundle.
Brad
Haris
Are we voting? If yes, I totally agree with Haris to put it into the Markdown.bundle. If no, this mail will self-destruct if applicable.
Dan
My vote would be "no" for the selfish reason that I've made several changes to Fletcher's work, and some things in the bundle probably won't work with my version of MMDown. But then, I can always personalize the bundle, too.
-- Dr. Drang
On Apr 6, 2006, at 10:16 AM, Daniel Käsmayr wrote:
Are we voting? If yes, I totally agree with Haris to put it into the Markdown.bundle. If no, this mail will self-destruct if applicable.
Dan
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 6 Apr 2006, at 20:23, Dr. Drang wrote:
My vote would be "no" for the selfish reason that I've made several changes to Fletcher's work, and some things in the bundle probably won't work with my version of MMDown. But then, I can always personalize the bundle, too.
Just curious, have you just modified the stylesheets (to include frequently used LaTeX packages, say) or have you made more interesting changes?
All the best, Mark
Yes, I've changed both the stylesheets and the program itself.
As you anticipated, the elementary changes simply get rid of Fletcher Penney's favorite packages and include mine. The more substantive changes include a Markdown syntax for inline and display equations (e.g., $$ E = m c^2 $$ for inline and $$$ E = m c^2 $$$ for display).
I've been meaning to write this up in my blog, but just haven't gotten around to it. Worse, I was going to set up an SVN repository on my local computer so I could more easily incorporate Fletcher's changes into my branch. But that was a few months ago and he's kept improving while my branch has remained stagnant. If only work and family would go away so I could concentrate on the important things...
-- Dr. Drang
On Apr 6, 2006, at 2:56 PM, Mark Eli Kalderon wrote:
On 6 Apr 2006, at 20:23, Dr. Drang wrote:
My vote would be "no" for the selfish reason that I've made several changes to Fletcher's work, and some things in the bundle probably won't work with my version of MMDown. But then, I can always personalize the bundle, too.
Just curious, have you just modified the stylesheets (to include frequently used LaTeX packages, say) or have you made more interesting changes?
All the best, Mark
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 10 Apr 2006, at 15:28, Dr. Drang wrote:
Yes, I've changed both the stylesheets and the program itself.
As you anticipated, the elementary changes simply get rid of Fletcher Penney's favorite packages and include mine. The more substantive changes include a Markdown syntax for inline and display equations (e.g., $$ E = m c^2 $$ for inline and $$$ E = m c^2 $$$ for display).
I've been meaning to write this up in my blog, but just haven't gotten around to it. Worse, I was going to set up an SVN repository on my local computer so I could more easily incorporate Fletcher's changes into my branch. But that was a few months ago and he's kept improving while my branch has remained stagnant. If only work and family would go away so I could concentrate on the important things...
-- Dr. Drang
Thanks, Dr. Drang. Look forward to your blog entry. BTW have you seen TeXdown http://wwwth.mppmu.mpg.de/members/jgrosse/texdown/TeXdown- Readme.html ? It is a markdown preprocessor that adds just that functionality.
All the best, Mark
TeXdown looks interesting, but it has two characteristics that I want to avoid:
1. It creates HTML only. 2. It uses uses image files for the equations, which do not scale.
MultiMarkdown eliminates the first by allowing an XSLT transformation to LaTeX (MultiMarkdown.pl doesn't do this, but the MultiMarkdown system does). My additions to MultiMarkdown create <math> tags that can be processed in one of two ways:
1. Into LaTeX through the XSL files. 2. Into reasonably good-looking web pages through [jsMath][1].
jsMath is a pretty amazing rewrite of the TeX/LaTeX equation-handling code into JavaScript, which moves the characters into position. With jsMath, the size of an equation scales with the font size of the page, a great thing for those of us with failing eyesight.
Similar to jsMath is [ASCIIMathML][2], which takes TeX-like equations and turns them into MathML. Pretty nice if you're using a MathML- aware browser (Firefox), but not so good for us Safari users.
One very good thing about TeXdown is that it's implemented as a pre- filter. I may change my MultiMarkdown additions to that form, so I don't have to try to keep up with Fletcher Penney's development pace. I remember starting my work as a pre-filter, but can't remember why I decided to edit Fletcher's code directly. Memory, like eyesight, fades quickly in middle-age.
[1]: http://www.math.union.edu/locate/jsMath/ [2]: http://www1.chapman.edu/~jipsen/asciimath.html
-- Dr. Drang
On Apr 10, 2006, at 9:52 AM, Mark Eli Kalderon wrote:
Thanks, Dr. Drang. Look forward to your blog entry. BTW have you seen TeXdown http://wwwth.mppmu.mpg.de/members/jgrosse/texdown/ TeXdown-Readme.html ? It is a markdown preprocessor that adds just that functionality.
All the best, Mark
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Apr 10, 2006, at 1:24 PM, Dr. Drang wrote:
TeXdown looks interesting, but it has two characteristics that I want to avoid:
- It creates HTML only.
- It uses uses image files for the equations, which do not scale.
MultiMarkdown eliminates the first by allowing an XSLT transformation to LaTeX (MultiMarkdown.pl doesn't do this, but the MultiMarkdown system does). My additions to MultiMarkdown create <math> tags that can be processed in one of two ways:
- Into LaTeX through the XSL files.
- Into reasonably good-looking web pages through [jsMath][1].
I agree that the output of jsMath is amazing, and I like it better than the inserted image. Getting all the javascript bits in the right place is the only catch I guess.
To stay with the Multimarkdown philosophy of converting to xhtml and then using style sheets to go to other formats it seems that a script in the same vein as TeXdown would be pretty simple. 1. Detect that we are doing math either through $$ or `% or whatever mechanism. 2. wrap the math in a <math> tag 3. Write xsl transformations. For html + jsMath: insert all the <script> tags at the beginning of the template and Just keep the <math> tag around the math for LaTeX: you just get rid of the <math> tag and insert the math with $ around it. for direct to pdf, I don't think the current solution of htmldoc works. for rtf I have no idea....
Brad
-- Dr. Drang
On Apr 10, 2006, at 9:52 AM, Mark Eli Kalderon wrote:
Thanks, Dr. Drang. Look forward to your blog entry. BTW have you seen TeXdown http://wwwth.mppmu.mpg.de/members/jgrosse/texdown/ TeXdown-Readme.html ? It is a markdown preprocessor that adds just that functionality.
All the best, Mark
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Apr 10, 2006, at 3:29 PM, Brad Miller wrote:
To stay with the Multimarkdown philosophy of converting to xhtml and then using style sheets to go to other formats it seems that a script in the same vein as TeXdown would be pretty simple.
- Detect that we are doing math either through $$ or `% or
whatever mechanism. 2. wrap the math in a <math> tag 3. Write xsl transformations. For html + jsMath: insert all the <script> tags at the beginning of the template and Just keep the <math> tag around the math for LaTeX: you just get rid of the <math> tag and insert the math with $ around it.
This is exactly what I do. Most of my writing with equations gets turned into reports, so it goes the LaTex->PDF route and XHTML is only a transitional step. I do have a (lately neglected) blog at www.leancrew.com/mechanics that uses jsMath. The template contains the <script>s that load and execute jsMath, the individual posts have the <math> tags after processing by my fork of MultiMarkdown.
-- Dr. Drang
On 10/4/2006, at 16:28, Dr. Drang wrote:
As you anticipated, the elementary changes simply get rid of Fletcher Penney's favorite packages and include mine. [...]
I did read you did other changes, but wanted to share a tip related to this.
I had a script myself where some of the lines were “wrong” in one context. I was really not much for adding an option to control this, but I ran the script too often for me to manually fix the output each time.
So what I did was generate the output, make a copy, fix it, diff it, and then I had a patch file.
This allowed me to wrap the original command in a script that runs that first and then applies the patch to the output.
On 6/4/2006, at 17:10, Brad Miller wrote:
Here's the question: Should we keep this a separate bundle as it is today, or should we treat this like bibtex and Beamer in the latex bundle and just add it as part of the markdown bundle?
I’d say add it to the Markdown bundle. OTOH it is a lot of “convert” commands which only make sense for MultiMarkdown. They should probably get a prefix, but MultiMarkdown is too long.
Nice, I like the ↓↓↓ idea.
I'll work on getting it integrated and commit in the next day or so. I'll start with the latest that Soryu posted this morning. I'm just taking off for a conference so I may not get it committed until tomorrow.
Brad
On Apr 6, 2006, at 10:51 AM, Allan Odgaard wrote:
On 6/4/2006, at 17:36, Charilaos Skiadas wrote:
They should probably get a prefix, but MultiMarkdown is too long.
MMdown?
Or maybe just ↓↓↓ (multiple down marks ;) ).
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Format: complete Author: Soryu Copyright: All rights reversed Date: 2006-04-06 Title: Giant Squid!
Thanks to the feedback I made another version.
# Changes
* Updated MultiMarkdown.pl to latest version “1.0.1Multi19.1” though the website says “1.0.1Multi19.2” (?)
> An observation. This does not include the latest version of MultiMarkdown.pl. If people update the script, xsltproc will need to be run with the -novalid and -nonet switches. I added those options. Thanks Mark.
* Memoir Document Class
> Fletcher Penney also provides xhtml2memoir. Would it make sense to branch the command to Convert Document to LaTeX Article and Convert document to LaTeX Memoir? I included it for test purposes, so we can have a look at it and decide about it :) I'm not sure if someone would write something this complex with MultiMarkdown? It looks a little like the “book” class to me.
* ↓↓↓
Good idea indeed! I prefixed all commands and the grammar (to make the association) with “↓↓”. I think two “↓” look sleeker than three? > I was actually joking - but what the hell… :) 2l8 ;)
* Source Comments
I removed most comments in the Command Sources (They did not make sense).
* LaTeX Output
* The LaTeX Output uses the Packages “plainfootnote” and “xmpincl” They are not included in my LaTeX installation, so this would make for a Documentation item. * Though input encoding is set to utf-8 LaTeX does not know about the “↓” it seems :(
* Documentation
I made a stub “Readme” command. This should include both Markdown and MultiMarkdown doc when the bundles are merged.
* Inclusion of `MultiMarkdown.pl` in the Standard TextMate `Support` directory
Just so we don't forget about that.
Bye for now, Soryu.
PS: Best viewed with the (non-existing) Mail-Markdown Plugin ;)
PS: Best viewed with the (non-existing) Mail-Markdown Plugin ;)
Hey, I was looking for this as well. Is there a way to do this? i.e. create a custom bundle that assigns “text.plain.mail” and “text.html.markdown” to all text? Creating a language grammar that looks like this does not help:
{ scopeName = 'text.plain.mail.markdown'; fileTypes = ( 'mail' ); patterns = ( { include = 'text.plain.mail'; }, { include = 'text.html.markdown'; }, ); }
At least there is no general scope of text.html.markdown applied ; ( so snippets won't work; syntax hilighting does, though.
Dan
Fellow TextMates
Thanks to Brad for the MMD bundle. I noticed some problems while using it:
1) I have problems using german umlauts like ä, ö, ü, etc. when converting a Markdown document to PDF or HTML. All I get is some strange character sequences where the umlauts should be. And yes, I use UTF8 for my documents. 2) If I use the shortcut for "Preview in Browser" ctrl-shift-M while using Multimarkdown as the document language, I get the following error:
warning: failed to load external entity "/Library/Application% 20Support/TextMate/Bundles/Markdown.tmbundle/Support/markdown.xsl" cannot parse /Library/Application Support/TextMate/Bundles/ Markdown.tmbundle/Support/markdown.xsl
Funny thing is: It works if I select "Preview in Browser" from the menu in the status bar. The shortcut works while using Markdown as the document language though. Why are there two different languages anyway? Is there a difference between the syntax of Markdown and Multimarkdown?
3) If I use ctrl-shift-L, a html link get's inserted instead of converting it to Latex while using Markdown as language. It works while using MMDown as the language. (So this might be a problem of the Markdown bundle. Or is this expected behaviour?)
Anybody else noticing this?
Cheers. Oliver
On 29 Mar 2006, at 17:05, Brad Miller wrote:
Mark, Here is my MultiMarkdown bundle. I have found this to be a very useful little bundle. Let me know if you have any trouble. <multimarkdown.zip> Brad
On Apr 12, 2006, at 12:31 PM, Oliver Hagmann wrote:
Fellow TextMates
Thanks to Brad for the MMD bundle. I noticed some problems while using it:
- I have problems using german umlauts like ä, ö, ü, etc. when
converting a Markdown document to PDF or HTML. All I get is some strange character sequences where the umlauts should be. And yes, I use UTF8 for my documents.
Are you talking about the HTML source or what appears in the browser or preview window?? I can see that htmldoc gets confused and generates some weird pdf but html seems fine in the tests I've tried.
- If I use the shortcut for "Preview in Browser" ctrl-shift-M
while using Multimarkdown as the document language, I get the following error:
warning: failed to load external entity "/Library/Application% 20Support/TextMate/Bundles/Markdown.tmbundle/Support/markdown.xsl" cannot parse /Library/Application Support/TextMate/Bundles/ Markdown.tmbundle/Support/markdown.xsl
When the document is in MultiMarkdown mode ctrl-shift-m tries to run the command 'convert to markdown.' Not preview in browser. Now that I look at it carefully I'm not sure who wrote that command or what it is supposed to do. MultiMarkdown does not include a file called markdown.xsl as far as I can tell.
??Anyone??
That aside we should probably have a consistent shortcut for preview that works for Markdown and MultiMarkdown
Funny thing is: It works if I select "Preview in Browser" from the menu in the status bar. The shortcut works while using Markdown as the document language though. Why are there two different languages anyway? Is there a difference between the syntax of Markdown and Multimarkdown?
MultiMarkdown includes syntax for creating tables, and the creation of full documents. Markdown alone is designed to generate shorter snippets of html that are included as part of a page created by a blogging system or wiki and therefore does not create a full html page. Using the directive Format: complete at the top of a multimarkdown document causes multimarkdown to generate a complete xhtml document. Staring with this complete xhtml document multimarkdown can then produce other complete documents, like LaTeX articles, or rtf documents.
- If I use ctrl-shift-L, a html link get's inserted instead of
converting it to Latex while using Markdown as language. It works while using MMDown as the language. (So this might be a problem of the Markdown bundle. Or is this expected behaviour?)
You can't convert markdown to Latex for the reasons I mentioned above. So it is the expected behavior although once again we have shortcuts doing very different things with only subtle differences in the scope of the document.
Hope that helps clear up a few questions....
Brad
Anybody else noticing this?
Cheers. Oliver
On 29 Mar 2006, at 17:05, Brad Miller wrote:
Mark, Here is my MultiMarkdown bundle. I have found this to be a very useful little bundle. Let me know if you have any trouble. <multimarkdown.zip> Brad
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 12 Apr 2006, at 20:02, Brad Miller wrote:
When the document is in MultiMarkdown mode ctrl-shift-m tries to run the command 'convert to markdown.' Not preview in browser. Now that I look at it carefully I'm not sure who wrote that command or what it is supposed to do. MultiMarkdown does not include a file called markdown.xsl as far as I can tell.
??Anyone??
Dear Brad,
markdown.xsl[1] converts xhtml to markdown syntax. The comments:
# This command works well when you use the TextMate service from a # web-log editor like Ecto or MarsEdit. You can write in markdown # and then convert back to html before save and close.
provide the rationale for both the Convert to html and Convert to markdown commands. Not my usage case, but there are other legitimate uses for this, I think---if you wanted to feed an xhtml doc into your markdown based workflow, say.
All the best, Mark
[1] http://www.lowerelement.com/Geekery/XML/XHTML-to-Markdown.html
On Apr 12, 2006, at 2:45 PM, Mark Eli Kalderon wrote:
On 12 Apr 2006, at 20:02, Brad Miller wrote:
When the document is in MultiMarkdown mode ctrl-shift-m tries to run the command 'convert to markdown.' Not preview in browser. Now that I look at it carefully I'm not sure who wrote that command or what it is supposed to do. MultiMarkdown does not include a file called markdown.xsl as far as I can tell.
??Anyone??
Dear Brad,
markdown.xsl[1] converts xhtml to markdown syntax. The comments:
# This command works well when you use the TextMate service from a # web-log editor like Ecto or MarsEdit. You can write in markdown # and then convert back to html before save and close.
provide the rationale for both the Convert to html and Convert to markdown commands. Not my usage case, but there are other legitimate uses for this, I think---if you wanted to feed an xhtml doc into your markdown based workflow, say.
All the best, Mark
Thanks Mark,
After I sent the email I did some more investigating and I actually added that command to my original bundle experimentally. I could never get it to work, and in the meantime the markdown.xsl file was lost in the shuffle.
In looking at it again this afternoon I can get the command to work under the following conditions:
1. remove the -novalid and -nonet command line arguments to xsltproc 2. feed the command a valid xhtml document
Without that, the html in the document just disappears.
Is this a useful command to keep around? You can also get the same functionality from the Humane Text service.
Brad
[1] http://www.lowerelement.com/Geekery/XML/XHTML-to-Markdown.html
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 12 Apr 2006, at 22:12, Brad Miller wrote:
Is this a useful command to keep around? You can also get the same functionality from the Humane Text service.
Brad
True, plus it would eliminate an assymetry in the commands--- everything else converst markdown to some other format.
Best, Mark
On 12.04.2006, at 21:02, Brad Miller wrote:
- I have problems using german umlauts like ä, ö, ü, etc. when
converting a Markdown document to PDF or HTML. All I get is some strange character sequences where the umlauts should be. And yes, I use UTF8 for my documents.
Are you talking about the HTML source or what appears in the browser or preview window?? I can see that htmldoc gets confused and generates some weird pdf but html seems fine in the tests I've tried.
I'm sorry. I must have had a glitch in my mind. HTML output is fine. Only the PDF output is creating wrong characters. Thanks for the update on using Multimarkdown. Oliver
On Apr 13, 2006, at 3:24 AM, Oliver Hagmann wrote:
On 12.04.2006, at 21:02, Brad Miller wrote:
- I have problems using german umlauts like ä, ö, ü, etc. when
converting a Markdown document to PDF or HTML. All I get is some strange character sequences where the umlauts should be. And yes, I use UTF8 for my documents.
Are you talking about the HTML source or what appears in the browser or preview window?? I can see that htmldoc gets confused and generates some weird pdf but html seems fine in the tests I've tried.
I'm sorry. I must have had a glitch in my mind. HTML output is fine. Only the PDF output is creating wrong characters. Thanks for the update on using Multimarkdown.
The htmldoc FAQ says that utf-8 is not currently supported, but will be in the future. So, if you want a pdf with the characters correctly displayed you will need to convert to LaTeX first and then generate the pdf from LaTeX.
Brad
Oliver ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 13/4/2006, at 17:13, Brad Miller wrote:
The htmldoc FAQ says that utf-8 is not currently supported, but will be in the future. So, if you want a pdf with the characters correctly displayed you will need to convert to LaTeX first and then generate the pdf from LaTeX.
I think the version of htmldoc on cvs/svn does have the utf-8 support. So if one does a custom build, it should work.
On Apr 14, 2006, at 5:14 AM, Allan Odgaard wrote:
On 13/4/2006, at 17:13, Brad Miller wrote:
The htmldoc FAQ says that utf-8 is not currently supported, but will be in the future. So, if you want a pdf with the characters correctly displayed you will need to convert to LaTeX first and then generate the pdf from LaTeX.
I think the version of htmldoc on cvs/svn does have the utf-8 support. So if one does a custom build, it should work.
I checked out the latest from their subversion repository. The first thing I noticed is that this project does not appear to be moving very fast, if at all. I built the r1474 snapshot from last november. The svn repo is only at 1482. Anyway after I built it still doesn't look like utf8 is supported. After digging around to make sure I had the right options enabled I discovered that UTF-8 support still has a Pending status.
Brad
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 14/4/2006, at 14:41, Brad Miller wrote:
[...] After digging around to make sure I had the right options enabled I discovered that UTF-8 support still has a Pending status.
So you did specify --charset utf-8?
I no longer have the build which I did, so I can’t test -- but I do recall it wasn’t straight forward to get it working. And I won’t rule out, that I actually ended up converting all non-ASCII characters to numeric entities (which would make it unicode support, not UTF-8.)
I do however recall that I did make it work for all but the Apple modifier key glyphs and the right arrow -- but these limitations where because the font htmldoc used for the output didn’t have the glyphs, and I was unable to make htmldoc use another font.
On Apr 14, 2006, at 10:27 AM, Allan Odgaard wrote:
On 14/4/2006, at 14:41, Brad Miller wrote:
[...] After digging around to make sure I had the right options enabled I discovered that UTF-8 support still has a Pending status.
So you did specify --charset utf-8?
I did not try that. When I did try, configure said --charset was an unrecognized option. I have done much grepping for utf/utf-8/utf8 and other related terms to see what options I might enable but I don't have any good leads...
Brad
I no longer have the build which I did, so I can’t test -- but I do recall it wasn’t straight forward to get it working. And I won’t rule out, that I actually ended up converting all non-ASCII characters to numeric entities (which would make it unicode support, not UTF-8.)
I do however recall that I did make it work for all but the Apple modifier key glyphs and the right arrow -- but these limitations where because the font htmldoc used for the output didn’t have the glyphs, and I was unable to make htmldoc use another font.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
WRT UTF-8 support for "↓↓ Convert Document / Selection to PDF" I modified the command by piping it through iconv like this:
MultiMarkdown.pl "$NAME" |SmartyPants.pl|iconv -f UTF-8 -t ISO-8859-15 >"$DST.html"
The PDF output had the relevant characters: ä, ö, ü, etc, though the html preview was messed up. (But why is that there anyway?)
Best, Mark
On 17/4/2006, at 16:04, Mark Eli Kalderon wrote:
WRT UTF-8 support for "↓↓ Convert Document / Selection to PDF" I modified the command by piping it through iconv like this:
MultiMarkdown.pl "$NAME" |SmartyPants.pl|iconv -f UTF-8 -t ISO-8859-15 >"$DST.html"
Here’s an alternative version, which instead encode non-ASCII as numeric entities (so it will still show properly in the HTML output, and will not bark with characters not supported by Latin 9):
MultiMarkdown.pl|SmartyPants.pl|"${TM_RUBY:-ruby}" >"$DST.html" - KU -pe '$_.gsub!(/[^\x00-\x7F]/) { |ch| "&##{ch.unpack("U")[0]};" }'
Brad, can you test if this works e.g. with ‘…’ using your custom build of htmldoc (I seem to have deleted my own.)
On Apr 17, 2006, at 2:39 PM, Allan Odgaard wrote:
On 17/4/2006, at 16:04, Mark Eli Kalderon wrote:
WRT UTF-8 support for "↓↓ Convert Document / Selection to PDF" I modified the command by piping it through iconv like this:
MultiMarkdown.pl "$NAME" |SmartyPants.pl|iconv -f UTF-8 -t ISO-8859-15 >"$DST.html"
Here’s an alternative version, which instead encode non-ASCII as numeric entities (so it will still show properly in the HTML output, and will not bark with characters not supported by Latin 9):
MultiMarkdown.pl|SmartyPants.pl|"${TM_RUBY:-ruby}" >"$DST.html" - KU -pe '$_.gsub!(/[^\x00-\x7F]/) { |ch| "&##{ch.unpack("U")[0]};" }'
Brad, can you test if this works e.g. with ‘…’ using your custom build of htmldoc (I seem to have deleted my own.)
Yes, ü ø ö all work as well as … with my build. Do they also work with the darwinports build? The characters come out fine on in the html window as well as in the pdf.
Brad
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 17 Apr 2006, at 20:49, Brad Miller wrote:
Here’s an alternative version, which instead encode non-ASCII as numeric entities (so it will still show properly in the HTML output, and will not bark with characters not supported by Latin 9):
MultiMarkdown.pl|SmartyPants.pl|"${TM_RUBY:-ruby}" >"$DST.html" -KU -pe '$_.gsub!(/[^\x00-\x7F]/) { |ch| "&##{ch.unpack("U")[0]};" }'
Brad, can you test if this works e.g. with ‘…’ using your custom build of htmldoc (I seem to have deleted my own.)
Yes, ü ø ö all work as well as … with my build. Do they also work with the darwinports build? The characters come out fine on in the html window as well as in the pdf.
Hmm. I am getting no love here. I get the following error message:
/bin/bash: line 7: /tmp/test.html: cannot overwrite existing file ERR002: Error: no pages generated! (did you remember to use webpage mode? 2006-04-17 21:52:49.873 open[12628] No such file: /tmp/test.pdf
Any ideas?
Best, Mark
On 17/4/2006, at 22:55, Mark Eli Kalderon wrote:
/bin/bash: line 7: /tmp/test.html: cannot overwrite existing file [...]
Try opening Terminal and execute:
rm -f /tmp/test.html
Then re-run the command.
We should change the command(s) to use mktemp instead (and likely some delayed cleanup then.)