Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-11 Thread Jan-Åke Larsson
Angus Leeming wrote: Either/any. Something simple that doesn't make life difficult for you and allows us to parse your messages robustly. What about the following patch? a) Page numbers from dvipng always match \[[\d]+ b) Glyph numbers from mktexpk always match \[[\d]+\]. c) No other numbers

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-11 Thread Jan-Åke Larsson
Angus Leeming wrote: Either/any. Something simple that doesn't make life difficult for you and allows us to parse your messages robustly. What about the following patch? a) Page numbers from dvipng always match \[[\d]+ b) Glyph numbers from mktexpk always match \[[\d]+\]. c) No other numbers

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-11 Thread Jan-Åke Larsson
Jan-Åke Larsson wrote: What about the following patch? --- lyxpreview2bitmap.py.oldWed Jan 11 10:28:49 2006 +++ lyxpreview2bitmap.pyWed Jan 11 11:03:25 2006 @@ -78,11 +78,21 @@ def extract_metrics_info(dvipng_stdout, metrics_file): metrics = open(metrics_file, 'w') -

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-11 Thread Angus Leeming
Jan-Åke Larsson wrote: Jan-Åke Larsson wrote: What about the following patch? Whooo! I didn't expect you to do our work for us. Thanks! In answer: I like the idea. Enrico, could you try it out to see if it cures your problems? -- Angus

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-11 Thread Jan-Åke Larsson
Angus Leeming wrote: > Either/any. Something simple that doesn't make life difficult for you and > allows us to parse your messages robustly. What about the following patch? a) Page numbers from dvipng always match "\[[\d]+" b) Glyph numbers from mktexpk always match "\[[\d]+\]". c) No other

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-11 Thread Jan-Åke Larsson
Angus Leeming wrote: > Either/any. Something simple that doesn't make life difficult for you and > allows us to parse your messages robustly. What about the following patch? a) Page numbers from dvipng always match "\[[\d]+" b) Glyph numbers from mktexpk always match "\[[\d]+\]". c) No other

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-11 Thread Jan-Åke Larsson
Jan-Åke Larsson wrote: > What about the following patch? --- lyxpreview2bitmap.py.oldWed Jan 11 10:28:49 2006 +++ lyxpreview2bitmap.pyWed Jan 11 11:03:25 2006 @@ -78,11 +78,21 @@ def extract_metrics_info(dvipng_stdout, metrics_file): metrics = open(metrics_file, 'w') -

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-11 Thread Angus Leeming
Jan-Åke Larsson wrote: > Jan-Åke Larsson wrote: >> What about the following patch? Whooo! I didn't expect you to do our work for us. Thanks! In answer: I like the idea. Enrico, could you try it out to see if it cures your problems? -- Angus

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Jan-Åke Larsson
Angus Leeming wrote: However, in recent versions of preview-latex and dvipng the output devised for LyX's sake gets corrupted in the following way: $ dvipng ... This is dvipng 1.7 Copyright 2002-2005 Jan-Ake Larsson [1 (preview-latex version 11.81) depth=6 height=16] this output confuses the

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Angus Leeming
On Monday 09 January 2006 15:26, Jan-Åke Larsson wrote: Angus Leeming wrote: However, in recent versions of preview-latex and dvipng the output devised for LyX's sake gets corrupted in the following way: $ dvipng ... This is dvipng 1.7 Copyright 2002-2005 Jan-Ake Larsson [1 (preview-latex

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Jan-Åke Larsson
Jan-Åke Larsson wrote: \[([0-9]+) .*?depth=(-?[0-9]+) height=(-?[0-9]+) Okay, I haven't been as diligent as I should. There may be a starting paranthesis instead of a space after the page number. A working pattern is metrics_re = re.compile(\ \[([0-9]+)[ \[\(].*?depth=(-?[0-9]+)

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Angus Leeming
On Monday 09 January 2006 16:06, Jan-Åke Larsson wrote: Jan-Åke Larsson wrote: \[([0-9]+) .*?depth=(-?[0-9]+) height=(-?[0-9]+) Okay, I haven't been as diligent as I should. There may be a starting paranthesis instead of a space after the page number. A working pattern is metrics_re

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Jan-Åke Larsson
Angus Leeming wrote: Do you really mean [ \[\(].*?depth? Translates as a single space, [, ( or character followed by (zero or more any characters) zero or one times followed by depth. I don't think so... I do. What I meant was I havent (until now) made sure there is a space after the

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Jan-Åke Larsson
Jan-Åke Larsson wrote: Perhaps I should just output page= as soon as --depth or --height is in effect. Or preview= as soon as the preview package is detected? /JÅ

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Angus Leeming
On Monday 09 January 2006 16:59, Jan-Åke Larsson wrote: Jan-Åke Larsson wrote: Perhaps I should just output page= as soon as --depth or --height is in effect. Or preview= as soon as the preview package is detected? Either/any. Something simple that doesn't make life difficult for you and

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread David Kastrup
Jan-Åke Larsson [EMAIL PROTECTED] writes: The latter would actually be useful for preview-latex as well, only that it would be nice to direct the output completely elsewhere (Emacs does not capture stderr separately): I often have to run preview-latex several times when new fonts get generated,

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Jan-Åke Larsson
Angus Leeming wrote: >>>However, in recent versions of preview-latex and dvipng the output >>>devised for LyX's sake gets corrupted in the following way: >>> >>>$ dvipng ... >>>This is dvipng 1.7 Copyright 2002-2005 Jan-Ake Larsson >>>[1 (preview-latex version 11.81) depth=6 height=16] >>> >>>this

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Angus Leeming
On Monday 09 January 2006 15:26, Jan-Åke Larsson wrote: > Angus Leeming wrote: > >>>However, in recent versions of preview-latex and dvipng the output > >>>devised for LyX's sake gets corrupted in the following way: > >>> > >>>$ dvipng ... > >>>This is dvipng 1.7 Copyright 2002-2005 Jan-Ake

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Jan-Åke Larsson
Jan-Åke Larsson wrote: > "\[([0-9]+) .*?depth=(-?[0-9]+) height=(-?[0-9]+)" Okay, I haven't been as diligent as I should. There may be a starting paranthesis instead of a space after the page number. A working pattern is metrics_re = re.compile(\ "\[([0-9]+)[ \[\(<].*?depth=(-?[0-9]+)

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Angus Leeming
On Monday 09 January 2006 16:06, Jan-Åke Larsson wrote: > Jan-Åke Larsson wrote: > > "\[([0-9]+) .*?depth=(-?[0-9]+) height=(-?[0-9]+)" > > Okay, I haven't been as diligent as I should. There may be a starting > paranthesis instead of a space after the page number. A working pattern > is > >

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Jan-Åke Larsson
Angus Leeming wrote: > Do you really mean "[ \[\(<].*?depth"? Translates as > a single space, [, ( or < character followed by (zero or more "any > characters") zero or one times followed by "depth". > > I don't think so... I do. What I meant was I havent (until now) made sure there is a space

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Jan-Åke Larsson
Jan-Åke Larsson wrote: > Perhaps I should just output "page=" as soon as --depth or --height is > in effect. Or "preview=" as soon as the preview package is detected? /JÅ

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread Angus Leeming
On Monday 09 January 2006 16:59, Jan-Åke Larsson wrote: > Jan-Åke Larsson wrote: > > Perhaps I should just output "page=" as soon as --depth or --height is > > in effect. > > Or "preview=" as soon as the preview package is detected? Either/any. Something simple that doesn't make life difficult

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-09 Thread David Kastrup
Jan-Åke Larsson <[EMAIL PROTECTED]> writes: >>>The latter would actually be useful for preview-latex as well, only >>>that it would be nice to direct the output completely elsewhere >>>(Emacs does not capture stderr separately): I often have to run >>>preview-latex several times when new fonts

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-06 Thread David Kastrup
Enrico Forestieri [EMAIL PROTECTED] writes: sorry if this is not the right list. In this case, please, redirect me to the right one. The list is quite correct, though there might be a dvipng-specific list, too. As you know, LyX (http://www.lyx.org) uses both the preview-latex package and

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-06 Thread Angus Leeming
David Kastrup wrote: However, in recent versions of preview-latex and dvipng the output devised for LyX's sake gets corrupted in the following way: $ dvipng ... This is dvipng 1.7 Copyright 2002-2005 Jan-Ake Larsson [1 (preview-latex version 11.81) depth=6 height=16] this output confuses

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-06 Thread David Kastrup
Enrico Forestieri <[EMAIL PROTECTED]> writes: > sorry if this is not the right list. In this case, please, redirect me > to the right one. The list is quite correct, though there might be a dvipng-specific list, too. > As you know, LyX (http://www.lyx.org) uses both the preview-latex > package

Re: [AUCTeX-devel] preview-latex, dvipng, and LyX

2006-01-06 Thread Angus Leeming
David Kastrup wrote: >> However, in recent versions of preview-latex and dvipng the output >> devised for LyX's sake gets corrupted in the following way: >> >> $ dvipng ... >> This is dvipng 1.7 Copyright 2002-2005 Jan-Ake Larsson >> [1 (preview-latex version 11.81) depth=6 height=16] >> >> this