Over on the Markdown discussion list Jacob Rus writes:
Incidentally, I recommend every Mac user on this list take a look at recent TextMate markdown support. The Markdown preview is now styled to look quite handsome IMO, and when using a theme which colors scopes such as lists, raw text, separators, etc. it is now quite easy to see syntax errors, etc. Michael Sheets and Allan Odgaard have worked together to make highlighting work for complex nested markup. If the official markdown spec were a bit more formalized and explicit, with coverage of edge cases, we make it just about perfect, I think.
I hadn't even noticed since I mostly work with MultiMarkdown documents. Would it be possible to apply the CSS to the MultiMarkdwon preview?
Thanks. 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
I hadn't even noticed since I mostly work with MultiMarkdown documents. Would it be possible to apply the CSS to the MultiMarkdwon preview?
Hey Mark,
I didn't commit the Styling to the MultiMarkdown Preview because I often use “Format: complete“ and ”Stylesheet” Meta Data in my MultiMarkdown Documents, at least those for publishing on the web. For all day files I use the original Markdown, because I don't need Footnotes and References there. Using of said Meta Tags will produce a full blown XHTML document and wrapping another HTML Header/Body/Stylesheet thing around this might just destroy the whole preview (I tested it once now and it looked ok, but the thing is damn invalid).
For that case I did the “Generate Preview and Open in Browser” command, though. So we'd just have to educate the people to use the Preview for simple things and the Generate… command for more serious documents.
That said, I'm committing the styled Preview now. If anyone cannot follow my reasoning, feel free to roll it back. Maybe we could do some detection of the Meta Tags and switch our behaviour based on that. Should be pretty easy even for they are at the very beginning of the file. I will give it a shot later, gotta hit the bed now.
Have a nice day, Soryu.
On 19 Sep 2006, at 01:23, Soryu wrote:
I hadn't even noticed since I mostly work with MultiMarkdown documents. Would it be possible to apply the CSS to the MultiMarkdwon preview?
Hey Mark,
I didn't commit the Styling to the MultiMarkdown Preview because I often use “Format: complete“ and ”Stylesheet” Meta Data in my MultiMarkdown Documents, at least those for publishing on the web. For all day files I use the original Markdown, because I don't need Footnotes and References there.
My CSS sucks which is why I wanted to take advantage of TextMate's default stylesheet and I use the footnotes, references, tables all the time.
Using of said Meta Tags will produce a full blown XHTML document and wrapping another HTML Header/Body/Stylesheet thing around this might just destroy the whole preview (I tested it once now and it looked ok, but the thing is damn invalid).
I know nothing about the html internals of TextMate. Is the idea that the only way to call the stylesheet is by wrapping the output in html tags? Why not prepend the MultiMarkdown document with the appropriate stylesheet metadata before processing the output?
For that case I did the “Generate Preview and Open in Browser” command, though. So we'd just have to educate the people to use the Preview for simple things and the Generate… command for more serious documents.
I just tried that out. Two things.
First, the “Generate Preview and Open in Browser” command produces a document called output.html in the directory of the MultiMarkdown document. If you have another MultiMarkdown document in the same directory and use the “Generate Preview and Open in Browser” command, the browser will display the html output from the first document. If I use “Generate Preview and Open in Browser” command on document foo, shouldn't the output be foo.html? (And shouldn't this be a temp file or am I missing the rationale of the command?)
Second, I think this depends on the use case. If engaged in web development, then you probably want the output displayed in a proper browser, but if you are just producing documents (that might ultimately be distributed as pdfs, say) then previewing them in a browser seems overkill and not as convenient.
That said, I'm committing the styled Preview now. If anyone cannot follow my reasoning, feel free to roll it back. Maybe we could do some detection of the Meta Tags and switch our behaviour based on that. Should be pretty easy even for they are at the very beginning of the file. I will give it a shot later, gotta hit the bed now.
Switching the behavior based on the metadata is a great idea.
Thanks Soryu. I hope you sleep well.
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
On 19/9/2006, at 4:32, Mark Eli Kalderon wrote:
[...] the “Generate Preview and Open in Browser” command produces a document called output.html [...] I think this depends on the use case. If engaged in web development, then you probably want the output displayed in a proper browser, but if you are just producing documents (that might ultimately be distributed as pdfs, say) then previewing them in a browser seems overkill and not as convenient.
Is anyone using the Generate Preview and Open in Browser? I suspect it was initially created to mimic the similar command for Markdown, which I have since removed.
If there is no good use-case for this command, I would like to remove it.
We can improve the current preview to a) spot if format is complete, and b) add a CSS header to its meta data when previewing inside TextMate.
Is anyone using the Generate Preview and Open in Browser? I suspect it was initially created to mimic the similar command for Markdown, which I have since removed.
If there is no good use-case for this command, I would like to remove it.
We can improve the current preview to a) spot if format is complete, and b) add a CSS header to its meta data when previewing inside TextMate.
I use that command. The file is saved in the current directory instead of some temp location so that included Stylesheets and Images can be referenced using a relative path. If we can make the Preview smart enough then we don't really need that command anymore, I guess.
I'll give it some thoughts.
Why not prepend the MultiMarkdown document with the appropriate stylesheet metadata before processing the output?
That would mean to alter the MultiMarkdown Script or at least the XSLT used. I wouldn't want to touch/alter this as we then cannot easily update it. Maybe we can inject the Stylesheet in the generated XHTML document. But that also gives a different output from what plain MultiMarkdown produces, so I'm not sure about it.
Soryu.
Thanks for your thoughts! Best, Mark
On 19 Sep 2006, at 18:59, Soryu wrote:
Is anyone using the Generate Preview and Open in Browser? I suspect it was initially created to mimic the similar command for Markdown, which I have since removed.
If there is no good use-case for this command, I would like to remove it.
We can improve the current preview to a) spot if format is complete, and b) add a CSS header to its meta data when previewing inside TextMate.
I use that command. The file is saved in the current directory instead of some temp location so that included Stylesheets and Images can be referenced using a relative path. If we can make the Preview smart enough then we don't really need that command anymore, I guess.
I'll give it some thoughts.
Why not prepend the MultiMarkdown document with the appropriate stylesheet metadata before processing the output?
That would mean to alter the MultiMarkdown Script or at least the XSLT used. I wouldn't want to touch/alter this as we then cannot easily update it. Maybe we can inject the Stylesheet in the generated XHTML document. But that also gives a different output from what plain MultiMarkdown produces, so I'm not sure about it.
Soryu.
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