Re: [julia-users] Markdown Strings as Messages
Maybe this was obvious for most, but for those who didn't realise it, stevengj mentioned in 1009 that `display` will correctly render a MD object. Christoph
Re: [julia-users] Markdown Strings as Messages
created issue [10009](https://github.com/JuliaLang/julia/issues/10009)
Re: [julia-users] Markdown Strings as Messages
Markdown.jl lives in base Julia now so it should probably go there. On 1 February 2015 at 15:18, Christoph Ortner wrote: > should this go in Docile, Lexicon, or Julialang? > Christoph >
Re: [julia-users] Markdown Strings as Messages
should this go in Docile, Lexicon, or Julialang? Christoph
Re: [julia-users] Markdown Strings as Messages
No, feel free to open one if you want (ping me too). On 1 February 2015 at 12:18, Christoph Ortner wrote: > Is this an existing issue somewhere? > > > On Sunday, 1 February 2015 12:18:42 UTC, Christoph Ortner wrote: >> >> >> Thanks for the clarification. It would be really great to have this >> functionality, especially, if it can be combined with MathJax! >> >> Thanks, >> Christoph >> >
Re: [julia-users] Markdown Strings as Messages
Thanks for the clarification. It would be really great to have this functionality, especially, if it can be combined with MathJax! Thanks, Christoph
Re: [julia-users] Markdown Strings as Messages
Is this an existing issue somewhere? On Sunday, 1 February 2015 12:18:42 UTC, Christoph Ortner wrote: > > > Thanks for the clarification. It would be really great to have this > functionality, especially, if it can be combined with MathJax! > > Thanks, > Christoph >
Re: [julia-users] Markdown Strings as Messages
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 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 > > >