[] !!

2002-07-06 Thread

:::¶óº§ Àü¹® ȸ»ç ¿ÀÇǽºÇÁ¶óÀÚ:::  
:   ±ÍÇÏ(±Í»ç)ÀÇÀ̸ÞÀÏ  ÁÖ¼Ò´Â ÀÎÅͳݻóÀÇ °Ô½ÃÆǵ¼­ 
:¼öÁýÇÏ¿´À¸¸ç,
 À̸ÞÀÏ ÁÖ¼Ò ¿Ü¿¡´Â ¾î¶°ÇÑ Á¤º¸µµ °¡Áö°í ÀÖÁö ¾Ê½À´Ï´Ù.
 º» ¸ÞÀÏÀº ¹ß½ÅÀü¿ëÀÔ´Ï´Ù. ´õÀÌ»ó ¸ÞÀÏÀ» ¿øÄ¡ ¾ÊÀ¸½Ã¸é ¾Æ·¡ÀÇ ¼ö ½Å °Å ºÎ¸¦ Ŭ¸¯ 
ÇØÁÖ¼¼¿ä.
 ÁÁÀº ÇÏ·ç  º¸³»¼¼¿ä.
 
 [¼ö ½Å °Å ºÎ(Do not send me  again)]
  



Re: Generating previewed snippets yourselves...

2002-07-06 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Friday 05 July 2002 23:08, Angus Leeming wrote:
 I've just submitted my workings on the preview code to CVS. Attached is a
 screen shot of what you can now expect. As you can see, I've just about
 resolved the positioning of the preview on the screen. There may be an
 off-by-one problem.

WOW!!!

[snip]

   follow the instructions in README-preview

Opposed to the instruction in README-preview to reconstruct preview.ins, it was 
sufficient to

tex bootstrap.ins
tex preview-mk.ins

to get the required files.

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPSbMCbewfbDGmeqhAQGV/wP+KQ9r/RUsjMk8JnuWatfNXuZSGsGIbtha
s1JEa3p+i95tPVosV+4hXZxjZgAkN4/hO0WQHVIeA2lBxOU6AHYD1hwtDKzRU6b4
rr0kFhwhYZygWUMj0Rd4Jz4jUyjFc9u+axTYi7a0PhHyydQmXkq5Nfe7IafyGR6S
PVFHaiTb6qA=
=ssrr
-END PGP SIGNATURE-




Re: Generating previewed snippets yourselves...

2002-07-06 Thread Angus Leeming

On Saturday 06 July 2002 11:52 am, Kornel Benko wrote:
 On Friday 05 July 2002 23:08, Angus Leeming wrote:
  I've just submitted my workings on the preview code to CVS. Attached is a
  screen shot of what you can now expect. As you can see, I've just about
  resolved the positioning of the preview on the screen. There may be an
  off-by-one problem.

 WOW!!!

I've just committed a fix; I was applying the right metrics info to the wrong 
image!

regards,

Angus



Re: Generating previewed snippets yourselves...

2002-07-06 Thread Angus Leeming

On Friday 05 July 2002 10:47 pm, David Kastrup wrote:
  Incidentally, if you load a document with LOTS of equations, don't expect
  to see anything soon. We only load the images into LyX once gs has
  finished generating ALL the bitmap files.
 
  I've just tried with a Thesis containing 617 equations. It took gs
  about 5 mins to do the work. Thereafter LyX freezes until all these
  images are loaded up into memory.

 That's not good.

  I think we'll have to do something about that. Presumably the
  elegant solution of loading an image file as it is created might
  aleviate this problem somewhat.

 That's not a good solution.  The good solution would be to load only
 those images that actually appear on-screen.  Often in a single
 editing session, you will not even be looking at most of the
 document.  No need to be loading the stuff into memory in the first
 place, then.

Agreed. Currently I just do:

void Previews::generateBufferPreviews(Buffer * buffer)
{
if (!buffer || !lyxrc.preview)
return;

PreviewLoader  ploader = loader(buffer);

Buffer::inset_iterator it  = buffer-inset_const_iterator_begin();
Buffer::inset_iterator end = buffer-inset_const_iterator_end();

for (; it != end; ++it) {
if ((*it)-lyxCode() == Inset::MATH_CODE) {
(*it)-generatePreview(ploader);
}
}

ploader.startLoading();
}

I'm sure that the wizards will be able to help here. Wizards, are you reading 
this? I'd like to generate small batches of these previews, say for the first 
three or four screen heights. Thereafter, if I arrive at an inset for which a 
preview hasn't been generated, I'd like to generate previews for three or 
four screen heights around it. Any thoughts on an interface?

Anyway, the current implementation is certainly Ok for 30 or 40 equations.

Angus



Re: Generating previewed snippets yourselves...

2002-07-06 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Saturday 06 July 2002 13:20, Angus Leeming wrote:
 I've just committed a fix; I was applying the right metrics info to the
 wrong image!

I didn't notice it before ...
The background of the created previes is little different to the
screen-background. See attached.
Besides this, very impressing.

Kornel
- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPSbliLewfbDGmeqhAQFLGQP7B2gsbG+pkWAWKBcvJQrSEreIvEdu0xkH
w1DUovG3C5KmRPMlqvsJLXrtVuqGVwHzt/iu7iiW6urN/Wt5QkBTXBiWC5fFeWSf
wGkQ3fMhEIKYnfiZgVHY/wv0Q/A60kwefuHTTDanX51SRs6GUaLeI5rVYW25iQQl
wVjDWh3BW8o=
=sORg
-END PGP SIGNATURE-

attachment: test.jpg

Re: Generating previewed snippets yourselves...

2002-07-06 Thread Angus Leeming

On Saturday 06 July 2002 1:41 pm, Kornel Benko wrote:
 On Saturday 06 July 2002 13:20, Angus Leeming wrote:
  I've just committed a fix; I was applying the right metrics info to the
  wrong image!

 I didn't notice it before ...
 The background of the created previes is little different to the
 screen-background. See attached.

Odd indeed.

 Besides this, very impressing.

;-)



Re: Generating previewed snippets yourselves...

2002-07-06 Thread Herbert Voss

Angus Leeming wrote:

whith the geometry-package loaded I got something like 

the attached gif. The equationnumber is outside of the
workarea - the (for the preview wrong) textwidth
from geometry was taken for the image width.

\usepackage{geometry}
\geometry{blah ... blah}

should be ignored in the preamble.


Herbert



-- 
http://www.lyx.org/help/




label of equation with preview

2002-07-06 Thread geof

Hi, the preview is a very nice feature!

It is possible to put the label of the equation instead of his number : 
Replace
\begin{equation}  bal bla bla \label{eq:blabla} \end{equation}
by
\[  bal bla bla \eqno{ \rm{ (eq:blabla) }} \]

It can be nice, no?
Regards,

geoffroy
-- 
~
   'v'mailto: gpiroux_at_mac_dot_com
  // \\   Powered by GNU/Linux-ppc
 /(   )\  http://lfs.linux-provider.net/  #112
   ^'^



Re: label of equation with preview

2002-07-06 Thread geof

an other solution is to replace the command \label by \tag. If you put a 
label, it must be put after the tag command.
This solution need amsmath.

\begin{equation}
\int x \ dx 
\tag{ \rm{eq:1} }  
\end{equation}

geoffroy
-- 
~
   'v'mailto: gpiroux_at_mac_dot_com
  // \\   Powered by GNU/Linux-ppc
 /(   )\  http://lfs.linux-provider.net/  #112
   ^'^



Re: Generating previewed snippets yourselves...

2002-07-06 Thread Lars Gullik Bjønnes

Angus Leeming [EMAIL PROTECTED] writes:

| I'm sure that the wizards will be able to help here. Wizards, are
| you reading this? I'd like to generate small batches of these
| previews, say for the first three or four screen heights.
| Thereafter, if I arrive at an inset for which a preview hasn't been
| generated, I'd like to generate previews for three or four screen
| heights around it. Any thoughts on an interface? 
| 
| Anyway, the current implementation is certainly Ok for 30 or 40 equations.

[Your lines are awfully long...]

IMHO this is perfect for either a separate process or a thread..., we
would then push conversion requests onto a queue, and the queue would
pop requests off this queue, handle it, and put the result back on a
result queue, and notify the main event handler that something
should be done with it.

If we could make it so that the thread do not actually use any of the
lyx data structures, then we would have no concurrency problems
either.

Have a look at boost::thread, I already have code for thread queues
etc.

-- 
Lgb




Re: Generating previewed snippets yourselves...

2002-07-06 Thread Herbert Voss

Herbert Voss wrote:

  Angus Leeming wrote:
 
  whith the geometry-package loaded I got something like
  the attached gif. The equationnumber is outside of the
  workarea - the (for the preview wrong) textwidth
  from geometry was taken for the image width.
 
  \usepackage{geometry}
  \geometry{blah ... blah}
 
  should be ignored in the preamble.


and cropping the image on the left side gives a
better result, too. I do not understand the sense
of %03d in the lyxpreview2ppm.sh. the patch is
only for demo


Herbert



-- 
http://www.lyx.org/help/



Index: lyxpreview2ppm.sh
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/scripts/lyxpreview2ppm.sh,v
retrieving revision 1.1
diff -u -r1.1 lyxpreview2ppm.sh
--- lyxpreview2ppm.sh   5 Jul 2002 21:24:11 -   1.1
+++ lyxpreview2ppm.sh   7 Jul 2002 05:46:13 -
 -65,9 +65,11 
ALPHA=2
 fi
 
-gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pnm -sOutputFile=${BASE}%03d.ppm \
+gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pnm -sOutputFile=${BASE}001.pnm \
 -dGraphicsAlphaBit=${ALPHA} -dTextAlphaBits=${ALPHA} -r${RESOLUTION} \
 ${PSFILE}
+
+pnmcrop -left ${BASE}001.pnm  ${BASE}001.ppm
 
 STATUS=$?
 EXECUTABLE=gs ${PSFILE}; CHECK_STATUS




[광고] 다다익선 여름축제!!

2002-07-06 Thread 오피스프라자

:::¶óº§ Àü¹® ȸ»ç ¿ÀÇǽºÇÁ¶óÀÚ:::  
:   ±ÍÇÏ(±Í»ç)ÀÇÀ̸ÞÀÏ  ÁÖ¼Ò´Â ÀÎÅͳݻóÀÇ °Ô½ÃÆǵ¼­ 
:¼öÁýÇÏ¿´À¸¸ç,
 À̸ÞÀÏ ÁÖ¼Ò ¿Ü¿¡´Â ¾î¶°ÇÑ Á¤º¸µµ °¡Áö°í ÀÖÁö ¾Ê½À´Ï´Ù.
 º» ¸ÞÀÏÀº ¹ß½ÅÀü¿ëÀÔ´Ï´Ù. ´õÀÌ»ó ¸ÞÀÏÀ» ¿øÄ¡ ¾ÊÀ¸½Ã¸é ¾Æ·¡ÀÇ ¼ö ½Å °Å ºÎ¸¦ Ŭ¸¯ 
ÇØÁÖ¼¼¿ä.
 ÁÁÀº ÇÏ·ç  º¸³»¼¼¿ä.
 
 [¼ö ½Å °Å ºÎ(Do not send me  again)]
  



Re: Generating previewed snippets yourselves...

2002-07-06 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Friday 05 July 2002 23:08, Angus Leeming wrote:
> I've just submitted my workings on the preview code to CVS. Attached is a
> screen shot of what you can now expect. As you can see, I've just about
> resolved the positioning of the preview on the screen. There may be an
> off-by-one problem.

WOW!!!

[snip]

>   follow the instructions in README-preview

Opposed to the instruction in "README-preview" to reconstruct preview.ins, it was 
sufficient to

tex bootstrap.ins
tex preview-mk.ins

to get the required files.

Kornel

- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPSbMCbewfbDGmeqhAQGV/wP+KQ9r/RUsjMk8JnuWatfNXuZSGsGIbtha
s1JEa3p+i95tPVosV+4hXZxjZgAkN4/hO0WQHVIeA2lBxOU6AHYD1hwtDKzRU6b4
rr0kFhwhYZygWUMj0Rd4Jz4jUyjFc9u+axTYi7a0PhHyydQmXkq5Nfe7IafyGR6S
PVFHaiTb6qA=
=ssrr
-END PGP SIGNATURE-




Re: Generating previewed snippets yourselves...

2002-07-06 Thread Angus Leeming

On Saturday 06 July 2002 11:52 am, Kornel Benko wrote:
> On Friday 05 July 2002 23:08, Angus Leeming wrote:
> > I've just submitted my workings on the preview code to CVS. Attached is a
> > screen shot of what you can now expect. As you can see, I've just about
> > resolved the positioning of the preview on the screen. There may be an
> > off-by-one problem.
>
> WOW!!!

I've just committed a fix; I was applying the right metrics info to the wrong 
image!

regards,

Angus



Re: Generating previewed snippets yourselves...

2002-07-06 Thread Angus Leeming

On Friday 05 July 2002 10:47 pm, David Kastrup wrote:
> > Incidentally, if you load a document with LOTS of equations, don't expect
> > to see anything soon. We only load the images into LyX once gs has
> > finished generating ALL the bitmap files.
> >
> > I've just tried with a Thesis containing 617 equations. It took gs
> > about 5 mins to do the work. Thereafter LyX freezes until all these
> > images are loaded up into memory.
>
> That's not good.
>
> > I think we'll have to do something about that. Presumably the
> > elegant solution of loading an image file as it is created might
> > aleviate this problem somewhat.
>
> That's not a good solution.  The good solution would be to load only
> those images that actually appear on-screen.  Often in a single
> editing session, you will not even be looking at most of the
> document.  No need to be loading the stuff into memory in the first
> place, then.

Agreed. Currently I just do:

void Previews::generateBufferPreviews(Buffer * buffer)
{
if (!buffer || !lyxrc.preview)
return;

PreviewLoader & ploader = loader(buffer);

Buffer::inset_iterator it  = buffer->inset_const_iterator_begin();
Buffer::inset_iterator end = buffer->inset_const_iterator_end();

for (; it != end; ++it) {
if ((*it)->lyxCode() == Inset::MATH_CODE) {
(*it)->generatePreview(ploader);
}
}

ploader.startLoading();
}

I'm sure that the wizards will be able to help here. Wizards, are you reading 
this? I'd like to generate small batches of these previews, say for the first 
three or four screen heights. Thereafter, if I arrive at an inset for which a 
preview hasn't been generated, I'd like to generate previews for three or 
four screen heights around it. Any thoughts on an interface?

Anyway, the current implementation is certainly Ok for 30 or 40 equations.

Angus



Re: Generating previewed snippets yourselves...

2002-07-06 Thread Kornel Benko

-BEGIN PGP SIGNED MESSAGE-

On Saturday 06 July 2002 13:20, Angus Leeming wrote:
> I've just committed a fix; I was applying the right metrics info to the
> wrong image!

I didn't notice it before ...
The background of the created previes is little different to the
screen-background. See attached.
Besides this, very impressing.

Kornel
- -- 
Kornel Benko
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: PGP 6.5.8

iQCVAwUBPSbliLewfbDGmeqhAQFLGQP7B2gsbG+pkWAWKBcvJQrSEreIvEdu0xkH
w1DUovG3C5KmRPMlqvsJLXrtVuqGVwHzt/iu7iiW6urN/Wt5QkBTXBiWC5fFeWSf
wGkQ3fMhEIKYnfiZgVHY/wv0Q/A60kwefuHTTDanX51SRs6GUaLeI5rVYW25iQQl
wVjDWh3BW8o=
=sORg
-END PGP SIGNATURE-

<>

Re: Generating previewed snippets yourselves...

2002-07-06 Thread Angus Leeming

On Saturday 06 July 2002 1:41 pm, Kornel Benko wrote:
> On Saturday 06 July 2002 13:20, Angus Leeming wrote:
> > I've just committed a fix; I was applying the right metrics info to the
> > wrong image!
>
> I didn't notice it before ...
> The background of the created previes is little different to the
> screen-background. See attached.

Odd indeed.

> Besides this, very impressing.

;-)



Re: Generating previewed snippets yourselves...

2002-07-06 Thread Herbert Voss

Angus Leeming wrote:

whith the geometry-package loaded I got something like 

the attached gif. The equationnumber is outside of the
workarea -> the (for the preview wrong) textwidth
from geometry was taken for the image width.

\usepackage{geometry}
\geometry{blah ... blah}

should be ignored in the preamble.


Herbert



-- 
http://www.lyx.org/help/




label of equation with preview

2002-07-06 Thread geof

Hi, the preview is a very nice feature!

It is possible to put the label of the equation instead of his number : 
Replace
\begin{equation}  bal bla bla \label{eq:blabla} \end{equation}
by
\[  bal bla bla \eqno{ \rm{ (eq:blabla) }} \]

It can be nice, no?
Regards,

geoffroy
-- 
~
   'v'mailto: gpiroux_at_mac_dot_com
  // \\   Powered by GNU/Linux-ppc
 /(   )\  http://lfs.linux-provider.net/  #112
   ^'^



Re: label of equation with preview

2002-07-06 Thread geof

an other solution is to replace the command \label by \tag. If you put a 
label, it must be put after the tag command.
This solution need amsmath.

\begin{equation}
\int x \ dx 
\tag{ \rm{eq:1} }  
\end{equation}

geoffroy
-- 
~
   'v'mailto: gpiroux_at_mac_dot_com
  // \\   Powered by GNU/Linux-ppc
 /(   )\  http://lfs.linux-provider.net/  #112
   ^'^



Re: Generating previewed snippets yourselves...

2002-07-06 Thread Lars Gullik Bjønnes

Angus Leeming <[EMAIL PROTECTED]> writes:

| I'm sure that the wizards will be able to help here. Wizards, are
| you reading this? I'd like to generate small batches of these
| previews, say for the first three or four screen heights.
| Thereafter, if I arrive at an inset for which a preview hasn't been
| generated, I'd like to generate previews for three or four screen
| heights around it. Any thoughts on an interface? 
| 
| Anyway, the current implementation is certainly Ok for 30 or 40 equations.

[Your lines are awfully long...]

IMHO this is perfect for either a separate process or a thread..., we
would then push conversion requests onto a queue, and the queue would
pop requests off this queue, handle it, and put the result back on a
"result queue", and notify the main event handler that something
should be done with it.

If we could make it so that the thread do not actually use any of the
lyx data structures, then we would have no concurrency problems
either.

Have a look at boost::thread, I already have code for thread queues
etc.

-- 
Lgb




Re: Generating previewed snippets yourselves...

2002-07-06 Thread Herbert Voss

Herbert Voss wrote:

 > Angus Leeming wrote:
 >
 > whith the geometry-package loaded I got something like
 > the attached gif. The equationnumber is outside of the
 > workarea -> the (for the preview wrong) textwidth
 > from geometry was taken for the image width.
 >
 > \usepackage{geometry}
 > \geometry{blah ... blah}
 >
 > should be ignored in the preamble.


and cropping the image on the left side gives a
better result, too. I do not understand the sense
of "%03d" in the lyxpreview2ppm.sh. the patch is
only for demo


Herbert



-- 
http://www.lyx.org/help/



Index: lyxpreview2ppm.sh
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/scripts/lyxpreview2ppm.sh,v
retrieving revision 1.1
diff -u -r1.1 lyxpreview2ppm.sh
--- lyxpreview2ppm.sh   5 Jul 2002 21:24:11 -   1.1
+++ lyxpreview2ppm.sh   7 Jul 2002 05:46:13 -
@@ -65,9 +65,11 @@
ALPHA=2
 fi
 
-gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pnm -sOutputFile=${BASE}%03d.ppm \
+gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pnm -sOutputFile=${BASE}001.pnm \
 -dGraphicsAlphaBit=${ALPHA} -dTextAlphaBits=${ALPHA} -r${RESOLUTION} \
 ${PSFILE}
+
+pnmcrop -left ${BASE}001.pnm > ${BASE}001.ppm
 
 STATUS=$?
 EXECUTABLE="gs ${PSFILE}"; CHECK_STATUS