Re: M$ Word - LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-05 Thread miyata

"Arnd Hanses" [EMAIL PROTECTED] wrote:

 #ifndef strcasecmp
 #define strcasecmp stricmp  // emx uses M$ fn name instead of posix
 name??!
 #define _strcasecmp stricmp
 #endif

Better to use AC_CHECK_FUNCS(strcasecmp strncasecmp stricmp strnicmp) and

#if !defined(HAVE_STRCASECMP)  defined(HAVE_STRICMP)
#define strcasecmp stricmp
#endif
#if !defined(HAVE_STRNCASECMP)  defined(HAVE_STRNICMP)
#define strncasecmp strnicmp
#endif

, that is, in case you have to use autoconf...

FYI non of strcasecmp, strncasecmp, stricmp nor strnicmp is in ANSI nor
in POSIX.  GNU libc is not always comforming to ANSI/POSIX standard.
In quite a few aspects, EMX is much more comforming to ANSI/POSIX.
However, strcasecmp and strncasecmp are in UNIX95 and UNIX98.

Regards,
SMiyata
^



Re: M$ Word -> LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-05 Thread miyata

"Arnd Hanses" <[EMAIL PROTECTED]> wrote:

> #ifndef strcasecmp
> #define strcasecmp stricmp  // emx uses M$ fn name instead of posix
> name??!
> #define _strcasecmp stricmp
> #endif

Better to use AC_CHECK_FUNCS(strcasecmp strncasecmp stricmp strnicmp) and

#if !defined(HAVE_STRCASECMP) && defined(HAVE_STRICMP)
#define strcasecmp stricmp
#endif
#if !defined(HAVE_STRNCASECMP) && defined(HAVE_STRNICMP)
#define strncasecmp strnicmp
#endif

, that is, in case you have to use autoconf...

FYI non of strcasecmp, strncasecmp, stricmp nor strnicmp is in ANSI nor
in POSIX.  GNU libc is not always comforming to ANSI/POSIX standard.
In quite a few aspects, EMX is much more comforming to ANSI/POSIX.
However, strcasecmp and strncasecmp are in UNIX95 and UNIX98.

Regards,
SMiyata
^



Re: M$ Word - LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-03 Thread Duncan Simpson


RTF is an excellent solution to the word to something else, inclyding LyX, 
problem. Not only does it support practically everything bar macro virii but 
it is also documented and reasonably sensible (quite a contrast with Word 
binary format, which is subject to NDAs and baroque to put it mildly).

One would imagine the purpose of word binary format is to defeat reverse 
engineering, even if it induces masses of bugs in word and trebles the code 
size. Given the only way to fix bugs in word is to upgrade, which costs money, 
conspiracy theorists would say I was right :-) IMHO they might not be entirely 
wrong. Word 98 is avuabale without a NDA but the file format itself is just as 
dire (not worse than word 6, primarly because doing wose is virtually 
impossible).

Unofrtunately 99% of the time people need to do this the only avialable format 
is word binary junk. Hence word2x, catdoc and MSWordview---you do not imagine 
the authors of these beasts actually like word format, do you? I can only 
speak for word2x's author myself, of course.
-- 
Duncan (-:
"software industry, the: unique industry where selling substandard goods is
legal and you can charge extra for fixing the problems."




Re: M$ Word - LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-03 Thread Richard E. Hawkins

duncan delivered,
 
 RTF is an excellent solution to the word to something else, inclyding LyX, 
 problem. Not only does it support practically everything bar macro virii but 
 it is also documented and reasonably sensible (quite a contrast with Word 
 binary format, which is subject to NDAs and baroque to put it mildly).

But isn't Word's implementation of RTF nonstandard and incompatible with real RTF 
(nah, not from them . . .)


-- 




Re: M$ Word - LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-03 Thread Arnd Hanses

On Thu, 02 Sep 1999 18:58:46 +0100, Duncan Simpson wrote:

 Given the only way to fix bugs in word is to upgrade, which costs money, 
conspiracy theorists would say I was right :-) IMHO they might not be entirely 
wrong. Word 98 is avuabale without a NDA but the file format itself is just as 
dire (not worse than word 6, primarly because doing wose is virtually 
impossible).


As it seems, Word 8 is now de facto the international standard for
document exchange, even in the internet and within specialized academic
contexts. LaTeX 'market share' is rapidly decreasing. Even Linux people
seem to adhere more and more (see the new xyzOffice suite efforts for
Linux). So LyX has to change gears and gain speed...

Unfortunately 99% of the time people need to do this the only avialable format 
is word binary junk. Hence word2x, catdoc and MSWordview---you do not imagine 
the authors of these beasts actually like word format, do you? I can only 
speak for word2x's author myself, of course.

Do you plan Word 8 support?

Some time ago I compiled an old version of word2x on emx. Compiling was
relatively easy, only minor quirks. Adding something like this; I think
not all were necessary:

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __EMX__

/* Compare S1 and S2, ignoring case.  */
int stricmp(__const__ char *, __const__ char *);

#ifndef strcasecmp
#define strcasecmp stricmp  // emx uses M$ fn name instead of posix
name??!
#define _strcasecmp stricmp 
#endif 

/* Compare S1 and S2, ignoring case.  */
int memicmp(__const__ void *, __const__ char *, size_t);

#ifndef memcasecmp 
#define memcasecmp memicmp  // emx uses M$ fn name
#endif

#if !defined(__STRICT_ANSI__)  !defined(_POSIX_SOURCE)

/* Compare no more than N chars of S1 and S2, ignoring case. */
int strnicmp(__const__ char *, __const__ char *, size_t);

#ifndef strncasecmp 
#define strncasecmp strnicmp  // emx uses M$ fn name
#define _strncasecmp strnicmp
#endif 

#endif /* !defined(__STRICT_ANSI__) */
#endif // __EMX__

#ifdef __cplusplus
}
#endif

Those funny fn names - despite emx' aim to facilitate Unix ports - is
always a reason for headache. 

BTW: Porting LyX we have the very same nuisance, recompiling the emx
Lib C with new aliases would help, but is non-standard.

Could you add this (as far as it is still necessary) to your code base
(to config.h or so?)?

I would like to release an updated emx version, perhaps a bit
synchronized with a LyX release for OS/2, if this hasn't already been
done (there was an old release from Russia, IIRC a bit idiosyncratic).
Would you agree?

A usability problem: Non ASCII-character handling was a major problem
for me; do you plan to add some support for the different M$-code pages
and LaTeX encodings (as used with Babel)?

Greets,

Arnd



Re: M$ Word - LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-03 Thread Garst R. Reese

Arnd Hanses wrote:
 
 As it seems, Word 8 is now de facto the international standard for
 document exchange, even in the internet and within specialized academic
 contexts. LaTeX 'market share' is rapidly decreasing. Even Linux people
 seem to adhere more and more (see the new xyzOffice suite efforts for
 Linux). So LyX has to change gears and gain speed...
 
Hmm, why are all those folks with Word 8 asking me to publish their
books using LyX/LaTeX?
Yes, I also have to deal those lazy nits in "specialized academic
contexts," but I sure won't encourage them.
Garst



Re: M$ Word - LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-03 Thread Alejandro Aguilar Sierra

On Sat, 4 Sep 1999, Arnd Hanses wrote:

 As it seems, Word 8 is now de facto the international standard for
 document exchange, even in the internet and within specialized academic
 contexts. LaTeX 'market share' is rapidly decreasing. Even Linux people
 seem to adhere more and more (see the new xyzOffice suite efforts for
 Linux). So LyX has to change gears and gain speed...

I don't think that people used to the wysiwym comfort of LyX will be happy
with a boring wysiwyg word processor. The only reason support for import/
export is suitable is precisely to be able to interchange documents with
those unfortunates that doesn't know the joy of LyX.

Greets,

Alejandro



Re: M$ Word -> LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-03 Thread Duncan Simpson


RTF is an excellent solution to the word to something else, inclyding LyX, 
problem. Not only does it support practically everything bar macro virii but 
it is also documented and reasonably sensible (quite a contrast with Word 
binary format, which is subject to NDAs and baroque to put it mildly).

One would imagine the purpose of word binary format is to defeat reverse 
engineering, even if it induces masses of bugs in word and trebles the code 
size. Given the only way to fix bugs in word is to upgrade, which costs money, 
conspiracy theorists would say I was right :-) IMHO they might not be entirely 
wrong. Word 98 is avuabale without a NDA but the file format itself is just as 
dire (not worse than word 6, primarly because doing wose is virtually 
impossible).

Unofrtunately 99% of the time people need to do this the only avialable format 
is word binary junk. Hence word2x, catdoc and MSWordview---you do not imagine 
the authors of these beasts actually like word format, do you? I can only 
speak for word2x's author myself, of course.
-- 
Duncan (-:
"software industry, the: unique industry where selling substandard goods is
legal and you can charge extra for fixing the problems."




Re: M$ Word -> LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-03 Thread Richard E. Hawkins

duncan delivered,
 
> RTF is an excellent solution to the word to something else, inclyding LyX, 
> problem. Not only does it support practically everything bar macro virii but 
> it is also documented and reasonably sensible (quite a contrast with Word 
> binary format, which is subject to NDAs and baroque to put it mildly).

But isn't Word's implementation of RTF nonstandard and incompatible with real RTF 
(nah, not from them . . .)


-- 




Re: M$ Word -> LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-03 Thread Arnd Hanses

On Thu, 02 Sep 1999 18:58:46 +0100, Duncan Simpson wrote:

> Given the only way to fix bugs in word is to upgrade, which costs money, 
>conspiracy theorists would say I was right :-) IMHO they might not be entirely 
>wrong. Word 98 is avuabale without a NDA but the file format itself is just as 
>dire (not worse than word 6, primarly because doing wose is virtually 
>impossible).
>

As it seems, Word 8 is now de facto the international standard for
document exchange, even in the internet and within specialized academic
contexts. LaTeX 'market share' is rapidly decreasing. Even Linux people
seem to adhere more and more (see the new xyzOffice suite efforts for
Linux). So LyX has to change gears and gain speed...

>Unfortunately 99% of the time people need to do this the only avialable format 
>is word binary junk. Hence word2x, catdoc and MSWordview---you do not imagine 
>the authors of these beasts actually like word format, do you? I can only 
>speak for word2x's author myself, of course.

Do you plan Word 8 support?

Some time ago I compiled an old version of word2x on emx. Compiling was
relatively easy, only minor quirks. Adding something like this; I think
not all were necessary:

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __EMX__

/* Compare S1 and S2, ignoring case.  */
int stricmp(__const__ char *, __const__ char *);

#ifndef strcasecmp
#define strcasecmp stricmp  // emx uses M$ fn name instead of posix
name??!
#define _strcasecmp stricmp 
#endif 

/* Compare S1 and S2, ignoring case.  */
int memicmp(__const__ void *, __const__ char *, size_t);

#ifndef memcasecmp 
#define memcasecmp memicmp  // emx uses M$ fn name
#endif

#if !defined(__STRICT_ANSI__) && !defined(_POSIX_SOURCE)

/* Compare no more than N chars of S1 and S2, ignoring case. */
int strnicmp(__const__ char *, __const__ char *, size_t);

#ifndef strncasecmp 
#define strncasecmp strnicmp  // emx uses M$ fn name
#define _strncasecmp strnicmp
#endif 

#endif /* !defined(__STRICT_ANSI__) */
#endif // __EMX__

#ifdef __cplusplus
}
#endif

Those funny fn names - despite emx' aim to facilitate Unix ports - is
always a reason for headache. 

BTW: Porting LyX we have the very same nuisance, recompiling the emx
Lib C with new aliases would help, but is non-standard.

Could you add this (as far as it is still necessary) to your code base
(to config.h or so?)?

I would like to release an updated emx version, perhaps a bit
synchronized with a LyX release for OS/2, if this hasn't already been
done (there was an old release from Russia, IIRC a bit idiosyncratic).
Would you agree?

A usability problem: Non ASCII-character handling was a major problem
for me; do you plan to add some support for the different M$-code pages
and LaTeX encodings (as used with Babel)?

Greets,

Arnd



Re: M$ Word -> LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-03 Thread Garst R. Reese

Arnd Hanses wrote:
> 
> As it seems, Word 8 is now de facto the international standard for
> document exchange, even in the internet and within specialized academic
> contexts. LaTeX 'market share' is rapidly decreasing. Even Linux people
> seem to adhere more and more (see the new xyzOffice suite efforts for
> Linux). So LyX has to change gears and gain speed...
> 
Hmm, why are all those folks with Word 8 asking me to publish their
books using LyX/LaTeX?
Yes, I also have to deal those lazy nits in "specialized academic
contexts," but I sure won't encourage them.
Garst



Re: M$ Word -> LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-03 Thread Alejandro Aguilar Sierra

On Sat, 4 Sep 1999, Arnd Hanses wrote:

> As it seems, Word 8 is now de facto the international standard for
> document exchange, even in the internet and within specialized academic
> contexts. LaTeX 'market share' is rapidly decreasing. Even Linux people
> seem to adhere more and more (see the new xyzOffice suite efforts for
> Linux). So LyX has to change gears and gain speed...

I don't think that people used to the wysiwym comfort of LyX will be happy
with a boring wysiwyg word processor. The only reason support for import/
export is suitable is precisely to be able to interchange documents with
those unfortunates that doesn't know the joy of LyX.

Greets,

Alejandro



M$ Word - LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-02 Thread Alejandro Aguilar Sierra

-- Forwarded message --
Date: Tue, 24 Aug 1999 13:48:30 -0700
From: Levente NOVÁK [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: M$ Word - LyX (was Re: Hi and small scroll wheel patch

Hello Alejandro,

There is a very good RTF to LaTeX converter, namely rtf2latex2e which
can not only convert text from RTF documents to LaTeX but tables also
and is furthermore able to extract figures and equations (these are then
in WMF format, so you have to convert them to EPS yourself). Word can
export in RTF format, and reLyX does the job of converting LaTeX to LyX.
I think it would only need to put a "hook" in LyX like it is the case
for reLyX, but unfortunately I can not do it myself as I do not speak C
nor C++.
When I tried catdoc and word2x some time ago, they did not have the
flexibility and power of rtf2latex2e. It changed maybe since then.

Levente

PS: I wrote you because I am not subscribed to the lyx lists. Could you
forward this mail to lyx-devel please?




M$ Word -> LyX (was Re: Hi and small scroll wheel patch (fwd)

1999-09-02 Thread Alejandro Aguilar Sierra

-- Forwarded message --
Date: Tue, 24 Aug 1999 13:48:30 -0700
From: Levente NOVÁK <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: M$ Word -> LyX (was Re: Hi and small scroll wheel patch

Hello Alejandro,

There is a very good RTF to LaTeX converter, namely rtf2latex2e which
can not only convert text from RTF documents to LaTeX but tables also
and is furthermore able to extract figures and equations (these are then
in WMF format, so you have to convert them to EPS yourself). Word can
export in RTF format, and reLyX does the job of converting LaTeX to LyX.
I think it would only need to put a "hook" in LyX like it is the case
for reLyX, but unfortunately I can not do it myself as I do not speak C
nor C++.
When I tried catdoc and word2x some time ago, they did not have the
flexibility and power of rtf2latex2e. It changed maybe since then.

Levente

PS: I wrote you because I am not subscribed to the lyx lists. Could you
forward this mail to lyx-devel please?




Re: Hi and small scroll wheel patch

1999-08-21 Thread Alejandro Aguilar Sierra

 Hi Lyxers!

Hi Robert!
 
 Back on the list again (after aprox. 3 years).

Yes, I remember those old days when you used to contribute something very
good then forgot it and later you contributed something else. ;-) 

Have you been using LyX since then?

 Downloaded lyx 1.0.3. I can see you've been quite busy.
 For the moment I don't have concrete developing plans with Lyx,
 I'll just watch this list for a while...

Welcome back!

Alejandro



M$ Word - LyX (was Re: Hi and small scroll wheel patch

1999-08-21 Thread Alejandro Aguilar Sierra

On Sat, 21 Aug 1999, Robert van der Kamp wrote:

 Hi Alejandro! Good to hear from you.

Likewise! :) 

 The company I work for didn't like it, because it didn't have
 import/export filters to MS Word (has this changed now?), so I looked
 for something else (but couldn't really find anything convincing. I'm
 back to LyX now.  The combination LyX/LaTeX is great, if only I could
 find those filters for the company. 

Well, AFAIK no, but recently I knew of something that could be useful. 
There is a library called MSWordView
(http://www.gnu.org/~caolan/docs/MSWordView.html) that can import binary
office97 word files. The Abi guys (http//www.abisource.com) use it to
import M$ Word into AbiWord so I think it should not be too complex to
adapt it for our purposes. 

As I see it, we have two ways:

* A word - lyx converter as currently relyx does latex - lyx.

* To use it as an importer plugin in the lyx 1.1.x branch, though
  this will have to wait until things get more stable in this branch.

So, Robert, if you are really interested (I'm certanly not cause I don't
use M$) I suggest you to check out mswordview and see how reLyX works.

Greets,

Alejandro



Re: M$ Word - LyX (was Re: Hi and small scroll wheel patch

1999-08-21 Thread Markus Mohr

 Well, AFAIK no, but recently I knew of something that could be useful.
 There is a library called MSWordView
 (http://www.gnu.org/~caolan/docs/MSWordView.html) that can import binary
 office97 word files. The Abi guys (http//www.abisource.com) use it to
 import M$ Word into AbiWord so I think it should not be too complex to
 adapt it for our purposes.
You could also take a look at word2x
http://word2x.alcom.co.uk/
which supports LaTeX output and catdoc
http://www.fe.msk.ru/~vitus/catdoc/
which supports (AFAIK) some limited TeX output.

One sidenote: IMHO would an import filter for Word for Lyx be a truly
'killer'-feature. I live in a students-hostel and all people around me
write their papers with Word. So we have people complain very often. :)
I always tell them: go use Lyx. The secondmost reply (after: 'I have no
Linux'), is, 'I have already written so much, its too much work to
convert'. Even if I had only small use for such a feature, I think it
would greatly help spreading the use of Lyx.

ciao
marksu



Re: Hi and small scroll wheel patch

1999-08-21 Thread Lars Gullik Bjønnes

Robert van der Kamp [EMAIL PROTECTED] writes:

| Hi Lyxers!
| 
| Back on the list again (after aprox. 3 years).
| Downloaded lyx 1.0.3. I can see you've been quite busy.
| For the moment I don't have concrete developing plans with Lyx,
| I'll just watch this list for a while...
| 
| Anyway, here's a small patch for BufferView.C, method
| BufferView::WorkAreaButtonPress(), line 986, where buttons
| 4 and 5 (the scroll wheel) are handled. Added acceleration support:
| the faster the wheel is turned, the faster the screen is scrolled.
| Something I also added to Xemacs, works really nice.

I used your patch and did it slightly different. My way seems much
more responsive.

// I am not quite sure if this is the correct place to put
this,
// but it will not cause any harm.
// Patch from Mark Huang ([EMAIL PROTECTED]) to make LyX
recognise
// button 4 and 5. This enables LyX use use the scrollwhell on
// certain mice for something useful. (Lgb)
// Added wheel acceleration detection code. (Rvdk)

static Time lastTime = 0;
if (ev-xbutton.button == 5){   
int diff = ev-xbutton.time - lastTime;
int scroll = int(1.0 + (4.0/(abs(diff)+1.0))*200.0);
ScrollUp(scroll);
lastTime = ev-xbutton.time;
return 0;
}

if (ev-xbutton.button == 4){
int diff = ev-xbutton.time - lastTime;
int scroll = int(1.0 + (4.0/(abs(diff)+1.0))*200.0);
ScrollDown(scroll);
lastTime = ev-xbutton.time;
return 0;
}

Note also that I reversed the scroll-wheel. Logically it was backwards.
(it is not a flight-stick you know ... )

I have no idea on how the "function" I use for scroll handles on other
systems. So comments are welcome.

Lgb



Re: M$ Word - LyX (was Re: Hi and small scroll wheel patch

1999-08-21 Thread Alejandro Aguilar Sierra

On Sun, 22 Aug 1999, Robert van der Kamp wrote:

 Ah, there is some new import/export(?) design? I will have to study
 that. I guess that relyx will be changed into a plugin too? In that case,
 the Word - LyX converter should become a plugin as well.

There is a new document structure that can make things like this easier
than before, but an exhaustive import/export design doesn't exist yet. 
 
 BTW, wouldn't an RTF to LyX converter (and back) do the job?
 AFAIK, M$Word *does* read/write RTF, and RTF is an open
 format, isn't it? Maybe the path Word - RTF - LaTeX - LyX
 is an option, but it sounds shaky, to say the least.

Not sure. MsWordView reads binary m$ word's doc which support things that
probably raw RTF doesn't. The best path (Word - LyX) is the shorter. 
Anyway a perfect importer is not possible because m$ word is wysiwyg and
LyX is not.

 Ah, my first assignment? ;-)

If you are interested. Some people would thank you for that.  :)

Greets,

Alejandro




Re: Hi and small scroll wheel patch

1999-08-21 Thread Alejandro Aguilar Sierra

> Hi Lyxers!

Hi Robert!
 
> Back on the list again (after aprox. 3 years).

Yes, I remember those old days when you used to contribute something very
good then forgot it and later you contributed something else. ;-) 

Have you been using LyX since then?

> Downloaded lyx 1.0.3. I can see you've been quite busy.
> For the moment I don't have concrete developing plans with Lyx,
> I'll just watch this list for a while...

Welcome back!

Alejandro



M$ Word -> LyX (was Re: Hi and small scroll wheel patch

1999-08-21 Thread Alejandro Aguilar Sierra

On Sat, 21 Aug 1999, Robert van der Kamp wrote:

> Hi Alejandro! Good to hear from you.

Likewise! :) 

> The company I work for didn't like it, because it didn't have
> import/export filters to MS Word (has this changed now?), so I looked
> for something else (but couldn't really find anything convincing. I'm
> back to LyX now.  The combination LyX/LaTeX is great, if only I could
> find those filters for the company. 

Well, AFAIK no, but recently I knew of something that could be useful. 
There is a library called MSWordView
(http://www.gnu.org/~caolan/docs/MSWordView.html) that can import binary
office97 word files. The Abi guys (http//www.abisource.com) use it to
import M$ Word into AbiWord so I think it should not be too complex to
adapt it for our purposes. 

As I see it, we have two ways:

* A word -> lyx converter as currently relyx does latex -> lyx.

* To use it as an importer plugin in the lyx 1.1.x branch, though
  this will have to wait until things get more stable in this branch.

So, Robert, if you are really interested (I'm certanly not cause I don't
use M$) I suggest you to check out mswordview and see how reLyX works.

Greets,

Alejandro



Re: M$ Word -> LyX (was Re: Hi and small scroll wheel patch

1999-08-21 Thread Markus Mohr

> Well, AFAIK no, but recently I knew of something that could be useful.
> There is a library called MSWordView
> (http://www.gnu.org/~caolan/docs/MSWordView.html) that can import binary
> office97 word files. The Abi guys (http//www.abisource.com) use it to
> import M$ Word into AbiWord so I think it should not be too complex to
> adapt it for our purposes.
You could also take a look at word2x
http://word2x.alcom.co.uk/
which supports LaTeX output and catdoc
http://www.fe.msk.ru/~vitus/catdoc/
which supports (AFAIK) some limited TeX output.

One sidenote: IMHO would an import filter for Word for Lyx be a truly
'killer'-feature. I live in a students-hostel and all people around me
write their papers with Word. So we have people complain very often. :)
I always tell them: go use Lyx. The secondmost reply (after: 'I have no
Linux'), is, 'I have already written so much, its too much work to
convert'. Even if I had only small use for such a feature, I think it
would greatly help spreading the use of Lyx.

ciao
marksu



Re: Hi and small scroll wheel patch

1999-08-21 Thread Lars Gullik Bjønnes

Robert van der Kamp <[EMAIL PROTECTED]> writes:

| Hi Lyxers!
| 
| Back on the list again (after aprox. 3 years).
| Downloaded lyx 1.0.3. I can see you've been quite busy.
| For the moment I don't have concrete developing plans with Lyx,
| I'll just watch this list for a while...
| 
| Anyway, here's a small patch for BufferView.C, method
| BufferView::WorkAreaButtonPress(), line 986, where buttons
| 4 and 5 (the scroll wheel) are handled. Added acceleration support:
| the faster the wheel is turned, the faster the screen is scrolled.
| Something I also added to Xemacs, works really nice.

I used your patch and did it slightly different. My way seems much
more responsive.

// I am not quite sure if this is the correct place to put
this,
// but it will not cause any harm.
// Patch from Mark Huang ([EMAIL PROTECTED]) to make LyX
recognise
// button 4 and 5. This enables LyX use use the scrollwhell on
// certain mice for something useful. (Lgb)
// Added wheel acceleration detection code. (Rvdk)

static Time lastTime = 0;
if (ev->xbutton.button == 5){   
int diff = ev->xbutton.time - lastTime;
int scroll = int(1.0 + (4.0/(abs(diff)+1.0))*200.0);
ScrollUp(scroll);
lastTime = ev->xbutton.time;
return 0;
}

if (ev->xbutton.button == 4){
int diff = ev->xbutton.time - lastTime;
int scroll = int(1.0 + (4.0/(abs(diff)+1.0))*200.0);
ScrollDown(scroll);
lastTime = ev->xbutton.time;
return 0;
}

Note also that I reversed the scroll-wheel. Logically it was backwards.
(it is not a flight-stick you know ... )

I have no idea on how the "function" I use for scroll handles on other
systems. So comments are welcome.

Lgb



Re: M$ Word -> LyX (was Re: Hi and small scroll wheel patch

1999-08-21 Thread Alejandro Aguilar Sierra

On Sun, 22 Aug 1999, Robert van der Kamp wrote:

> Ah, there is some new import/export(?) design? I will have to study
> that. I guess that relyx will be changed into a plugin too? In that case,
> the Word -> LyX converter should become a plugin as well.

There is a new document structure that can make things like this easier
than before, but an exhaustive import/export design doesn't exist yet. 
 
> BTW, wouldn't an RTF to LyX converter (and back) do the job?
> AFAIK, M$Word *does* read/write RTF, and RTF is an open
> format, isn't it? Maybe the path Word -> RTF -> LaTeX -> LyX
> is an option, but it sounds shaky, to say the least.

Not sure. MsWordView reads binary m$ word's doc which support things that
probably raw RTF doesn't. The best path (Word -> LyX) is the shorter. 
Anyway a perfect importer is not possible because m$ word is wysiwyg and
LyX is not.

> Ah, my first assignment? ;-)

If you are interested. Some people would thank you for that.  :)

Greets,

Alejandro