On Thu, 02 Apr 2009 at 10:33PM +0200, Florent Hivert wrote:
> One thing which is very useful in algebraic combinatorics (or maybe
> more modestly in my team), is to have printed out formulas with
> pictures in it. By picture in include 2D arrays as well as trees,
> graphs... In MuPAD we had a way to get very handy uglyprint asciiarts:

I would love this too!

[...]
> It would be very useful to a way to get such outputs in sage. By such
> outputs I don't mean asciiart, but any formulas involving pictures. As
> show on the picture it seems that I can get this in emacs via latex /
> sage-view. So my question is: can anyone direct me to a start of a
> path to have these in the notebook ?

Along similar lines is something I've been thinking about, which is
support for producing TikZ code from Sage objects so that we can easily
produce lovely TeX graphics. TikZ is a bit like PSTricks, but with
much wider support and better syntax; see [1] and [2] for examples of
what TikZ can do.

I would like to see Sage objects be able to spit out a reasonable TikZ
representation. For example, the integer partition [4,4,2,1] might
produce:

  % part: 4
  \draw (0,0) rectangle (1,-1);
  \draw (1,0) rectangle (2,-1);
  \draw (2,0) rectangle (3,-1);
  \draw (3,0) rectangle (4,-1);
  % part: 4
  \draw (0,-1) rectangle (1,-2);
  \draw (1,-1) rectangle (2,-2);
  \draw (2,-1) rectangle (3,-2);
  \draw (3,-1) rectangle (4,-2);
  % part: 2
  \draw (0,-2) rectangle (1,-3);
  \draw (1,-2) rectangle (2,-3);
  % part: 1
  \draw (0,-3) rectangle (1,-4);

which would produce the typical (English convention) Ferrers diagram.
The above code can be put inside \begin{tikzpicture} ...
\end{tikzpicture}.

It would be nice to be able to output combinatorial objects as in
Florent's message above, and also plots and other graphical objects.
I've had these ideas for a while, but have never really done anything
with them, and they seem to be related to implementing ASCII graphics
for the command line.

Dan

  1. http://mathsci.kaist.ac.kr/~drake/pdf/lineary-sys-stability.pdf
  2. http://www.texample.net/tikz/
-- 
---  Dan Drake <dr...@kaist.edu>
-----  KAIST Department of Mathematical Sciences
-------  http://mathsci.kaist.ac.kr/~drake

Attachment: signature.asc
Description: Digital signature

Reply via email to