Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] figures in Texmacs

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] figures in Texmacs


Chronological Thread 
  • From: Werner Hug <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] figures in Texmacs
  • Date: Thu, 09 Jul 2009 17:29:27 +0200

Dear Alex,

Warm thanks for the script.

Alex button works perfectly for documents I wrote, but only partly for a pupils thesis. I have so far not be able to find a sytematic difference between pictures where it works and where doesn't.

imagemagic: tried it earlier but not in the way you suggest. I will need time for this.

One problem, and this might not be so different elsewhere, is that collaborators who use Texmacs like me tend to limit themselves to the GUI, while those who use Latex anyhow sniff at Texmacs and tell me "I told you so, learn Latex"...



Dear Joris,

Many thanks for the offer. I will see if I manage to upload a thesis in Texmacs to a FTP server, I think that might be the only way to get you something typical with many figures. Again, it will take time, I have no experince with that.

I will recontact you.

Best regards,

Werner





Alex D schrieb:

Hi,

I think you're best bet might be to convert the images using the convert
utility from imagemagick like this

convert infile.jpg -compress jpeg ep3:outfile.eps
or
convert infile.png -compress zip ep3:outfile.eps

and then include them in the TeXmacs document like this:
<postscript|./file.eps|6.5in|||||>

This should be a bit faster. Look at the files fast.tm and slow.tm at
http://cs.wisc.edu/~aleksand/texmacs/figs-test.tar.gz<http://cs.wisc.edu/%7Ealeksand/texmacs/figs-test.tar.gz>

Also, add these lines to your my-init-texmacs.scm in ~/.TeXmacs/progs/

(use-modules (utils library tree))

(define active-elems
(lambda (elem)
(append (select (buffer-tree) `(:* (:and-not 0 inactive) ,elem))
(select (buffer-tree) `(:%0 ,elem))
(select (buffer-tree) `(:%1 ,elem)))))

(define inactive-elems
(lambda (elem)
(select (buffer-tree) `(:* inactive ,elem))))

(define activate-elem
(lambda (elem)
(let ((t (tree-ref elem :up)))
(tree-set! t elem))))

(define deactivate-elem
(lambda (elem)
(tree-set! elem (tree 'inactive elem))))


(menu-extend texmacs-extra-menu
(=> "Alex"
("activate all"
(begin (for-each activate-elem (inactive-elems 'postscript))))
("deactivate all"
(begin (for-each deactivate-elem (active-elems 'postscript))))))


This will add entries to the menu bar. You can use deactivate all when
working on the document, and then activate all just before printing.


Let me know how this works for you.


On Tue, Jul 7, 2009 at 7:09 AM, Werner Hug <address@hidden> wrote:


Dear Joris,

Kind thanks for your reply.

Scrolling: we re-tested it on a machine with 2 GB of memory (my X41 has
only 0.5 GB, though in principle that should be enough). Pictures do get
resized when a document is opened first, then when it is scrolled foreward,
and in general again when it is scrolled backward. This can be identified by
the warning messages in Konsole if Texmacs is opened via the command-line.
Sometimes, repeating scrolling over a set of a few pictures is faster, but
not in general if scrolling to a more distant part of the document is
required.

The garbage collection message sometimes does appear as a konsole messages.

It won't help to solve the present difficullties, but it is a consolation
to know that an upcoming Qt port might eliminate the problem.

Again, many thanks,

Werner Hug


Joris van der Hoeven schrieb:


On Sun, Jul 05, 2009 at 02:29:12PM +0200, Werner Hug wrote:


Possibly there is an option to get the text opened for editing and have
the figures linked without them being displayed, what is what you seem to
suggest, but we have not found it. Please let us know if such an option
exists.



You can try

Insert -> Specific -> Screen
Insert -> Specific -> Printer

Notice that I do not really understand the problem.
It is true that ghostscript is slow for displaying pictures
(in the upcoming Qt port, this problem will be solved for most image
formats).
Nevertheless, displayed images are cached, so there should be no problem
when scrolling, only some delay when viewing a picture for the first time.
Occasionally, pictures are also gc-ed, which sometimes requires them to be
reloaded,
but this should happen only one or two times.

Best wishes, Joris









Archive powered by MHonArc 2.6.19.

Top of Page