Subject: mailing-list for TeXmacs Users
List archive
From : Alex D <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] figures in Texmacs
- Date: Thu, 9 Jul 2009 13:50:32 -0500
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=h/u4R69N95BjMgLs+6TIgOuHCYpTEL2Dlh4EWYRB8LExYRLbSHTIM0Sa3SmzsGX41B Lz3L7d0SK++qREtQVnDSjwjDLUH7EqvTdInP6Dvf9c6beAZTZae1r0k/XgkU7KC0b0nA KYPHOGPPt3Msu9va2U5chcThr9q3BxfqM9Tao=
Hi,
OK, try this instead. I changed the selection routine. It's less intelligent now but it at least it should work.
What I'd really like to do is something like (select (buffer-tree) `(:* (:not inactive) ,elem)). That is, to select every elem element whose parent is not inactive. Perhaps, someone here knows how to do this...
I think this can be pretty useful for evaluation switches. You could write your document with some Maxima code where the results should go. Hit eval all and the code is replaced by the result.
(use-modules (utils library tree))
(define active-elems
(lambda (elem)
(append (select (buffer-tree) `(:* ,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))))))
Sincerely,
Aleksandr Dobkin
On Thu, Jul 9, 2009 at 10:29 AM, Werner Hug <address@hidden> wrote:
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,http://cs.wisc.edu/~aleksand/texmacs/figs-test.tar.gz<http://cs.wisc.edu/%7Ealeksand/texmacs/figs-test.tar.gz>
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
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 haveYou can try
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.
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
- Re: [TeXmacs] figures in Texmacs, (continued)
- Re: [TeXmacs] figures in Texmacs, Werner Hug, 07/05/2009
- Re: [TeXmacs] figures in Texmacs, Lukasz Stafiniak, 07/05/2009
- Re: [TeXmacs] figures in Texmacs, Werner Hug, 07/05/2009
- Re: [TeXmacs] figures in Texmacs, Alex D, 07/05/2009
- Re: [TeXmacs] figures in Texmacs, Werner Hug, 07/05/2009
- Re: [TeXmacs] figures in Texmacs, Lukasz Stafiniak, 07/05/2009
- Re: [TeXmacs] figures in Texmacs, Werner Hug, 07/05/2009
- Re: [TeXmacs] figures in Texmacs, Joris van der Hoeven, 07/06/2009
- Re: [TeXmacs] figures in Texmacs, Werner Hug, 07/07/2009
- Re: [TeXmacs] figures in Texmacs, Joris van der Hoeven, 07/07/2009
- Re: [TeXmacs] figures in Texmacs, Alex D, 07/07/2009
- Re: [TeXmacs] figures in Texmacs, Werner Hug, 07/09/2009
- Re: [TeXmacs] figures in Texmacs, Alex D, 07/09/2009
- Re: [TeXmacs] figures in Texmacs, Werner Hug, 07/10/2009
- Re: [TeXmacs] figures in Texmacs, Offray Vladimir Luna Cárdenas, 07/20/2009
- Re: [TeXmacs] figures in Texmacs, Joris van der Hoeven, 07/20/2009
- Re: [TeXmacs] figures in Texmacs, Alvaro Tejero Cantero, 07/21/2009
- Re: [TeXmacs] figures in Texmacs, Offray Vladimir Luna Cárdenas, 07/22/2009
Archive powered by MHonArc 2.6.19.