texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] raw-data? How do I use this? Also - what is the best image


From: Michael Lachmann
Subject: [Texmacs-dev] raw-data? How do I use this? Also - what is the best image format?
Date: Thu, 28 Jul 2011 14:57:37 +0200

Ok, another question, related to the R interface.

I'm trying to fix image rendering in the interface. Eps works now, as does pdf.

However, because pdf and eps is sometimes very big and renders amazingly slow 
in TeXmacs, I'd like to give the user the option to render images in png.

The way I render eps/pdf now is this:

I send TeXmacs:

DATA_BEGIN scheme:(image (tuple (raw-data "

[at this point I cat the pdf/eps file into the pipe, and then send]

") "eps") "" "" "" "") DATA_END

(or "pdf" for pdf). This is somewhat of a hack, but it works. Better than the 
DATA_BEGIN ps: DATA_END
interface. (because that interface seems to have broken some time ago...)

The problem is this:
I'm a bit afraid to just cat the file to TeXmacs. I actually don't quite 
understand why this works. The reason is that TeXmacs needs to identify when 
the raw data ends. How does TeXmacs do this? I've no idea. I open a quote, and 
close a quote after I printed the file. I think it works because by default 
pdf/eps files don't have any quotes in them. Actually I tested this. If, for 
example, the title of the plot has a quote in it all breaks... :)

So, I'd prefer to send the data to TeXmacs in hexadecimal. But I can't figure 
out what the format is.
I tried
(raw-data #EEEEEEEE)
(#EEEEEE)
#EEEEEE
EEEEE

(where EEEEE represents the hexdump of the file)

What is the right format?


--------
As an additional question - is there an optimal image format for TeXmacs. Is 
there a format that doesn't need any conversion?

I think eps is converted to png to display it. As far as I can tell, png is 
converted to eps and then that eps is converted to png to display it on screen. 
Is there any way so that the image will not be converted (maybe until I try to 
print the document)


Thanks a lot!

Michael





reply via email to

[Prev in Thread] Current Thread [Next in Thread]