What about using the verbatim environment of Latex ? class A(SageObject):
def _latex_(self): from sage.misc.latex import LatexExpr return '\\begin{verbatim}\n123\n 23\n\\end{verbatim}' sage: attach latex.sage sage: latex(A()) \begin{verbatim} 123 23 \end{verbatim} In the notebook, it works fine for me. Alex On 23 mai, 03:00, "Nathan O'Treally" <not.rea...@online.de> wrote: > On 23 Mai, 08:15, Rob Beezer <goo...@beezer.cotse.net> wrote: > > > Based on some limited testing - just editing the text version of a > > worksheet - would indicate that jsMath does not want to deal with > > \newline or \\ to break lines. With no better idea, I was able to use > > HTML paragraph tags to get two chunks of text on different lines, of > > course. Maybe a string could be chunked up based on the presence of > > \n, then each handled on its own, producing HTML (as currently), > > though deciding just when to wrap these with <p></p> sounds > > problematic (maybe just the presence of \n would be good enough?). > > I think the presence of \n indicates some ASCII art (_asciiart_()?, > _is_asciiart_()?), but I would use <br /> instead of <p>. > > -Leif > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group athttp://groups.google.com/group/sage-devel > URL:http://www.sagemath.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org