This is something I've been thinking about as well, and overloading `print`
etc. to work with markdown is definitely doable. I'm not sure how it would
work in IJulia, but it would definitely be ok in the terminal.

Use md"" unless you're writing inline docs (you might have to do a using
Base.Markdown first). At the moment both are interchangeable but the idea
is that doc"" needs to treat e.g. relative image and link paths specially,
and may potentially also add things like reference syntax.

On 1 February 2015 at 11:22, Christoph Ortner <christophortn...@gmail.com>
wrote:

>
> I've tried (but failed), with Julia 0.4, to use Markdown strings doc" . .
> ." as messages, e.g., error messages or just to make some complex program
> output more readable.
>
> If, in a REPL or IJulia, I just write
>    doc"blah `code` bleh"
> in a single line, then this shows ok. But of course in a function or
> script, it will just generate an object of type `Base.Markdown.MD`,
> without output.
>
> [1] Question: how can I actually send it to the output, correctly
> formatted?
>
> [2] Suggestion: could `print`, `println`, `error` etc automatically
> interpret markdown strings and output them accordingly?
>
> [3] Question: why doc" . . ." and not md" . . ." ? Could these at least be
> used synonymously?
>
> Thanks,
> Christoph
>
>
>

Reply via email to