[TxMt] MultiMarkdown Preview
Mark Eli Kalderon
m.kalderon at ucl.ac.uk
Tue Sep 19 02:32:32 UTC 2006
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
> 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
London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy
Personal wepage: http://www.kalderon.demon.co.uk
More information about the textmate