Cantor-SAGE: Display image
alexanderrieder at gmail.com
Thu Jun 9 21:16:39 CEST 2011
On Wed, Jun 8, 2011 at 8:29 PM, Uwe Fechner <u.fechner at tudelft.nl> wrote:
> my current idea:
> Modify Cantor in such a way, that it also monitors the "current
> directory" for new graphic
> files, and displays them.
I don't really like the idea, as I can see it lead to very unexpected
behaviour, for example if you start cantor from your home,
and are downloading some files at the same time. Every image you save
while cantor is running popping up in your worksheet
is not something an average user(or anybody else) would expect.
I basically see three possibilities to fix your problem:
- add a new type of worksheet entry that lets you insert any image
files you want/modify the Richtext Entry
- add some regexp magic that detects if the command you run is saving
an image, and insert it as a result to that command (possibly hard to
- add a custom command e.g. cantor_display("imagefile"), that adds the
image as a result
> But then I have some more questions:
> - what is the best graphic format for the integration in Cantor documents?
I don't think there is a "best" image format. Cantor suports every
image format supported by your Qt install. From a personal experience
png works everywhere, and is better suited for plots than jpeg.
Additionally Cantor supports to display Vector graphics in .eps
format. If it is supported by the backend to generate it, I
personally like that solution most, as it will allow arbitrary
resizing, and works well together with LaTeX.
> - should pictures be re-sized? If yes, which is the best resolution?
I don't know about resizing. Cantor inserts the images in their
original size, so just use whatever looks good.
More information about the kde-edu