Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Rainer Hoffmann

Allan Rae schrieb:

 On Wed, 6 Dec 2000, Rainer Hoffmann wrote:

  I build a new lyx and start it with src/lyx. Then I go to the
  preferences menu and change something small (e.g. adding an option for
  dvips). Then I click on save and the appearance of the document on the
  screen changes: All the fonts look smaller, the title is the same size
  as standard text. All in all it's different than before, but I never
  wanted that! Did I do something wrong?

 Hmmm... Your screen font settings (probably zoom factor) appears to have
 changed however as you say you never altered this then something weird is
 happening.  What system are using?   OS, compiler, libraries etc.

SuSE Linux 7.0




  Now when I close lyx and start it again I get some messages in the terminal
  window I didn't have before:
  Lyx: Unknown tag '12' [around line 24 of file ~/.lyx/preferences]
  Lyx: Unknown tag '00' [around line 24 of file ~/.lyx/preferences]
   (8 more of those) ...
  What's that?

 I don't know.  Perhaps you could include your preferences file in the next
 reply.

 Allan.  (ARRae)

### This file is part of
### 
###  LyX, The Document Processor
###
###  Copyright 1995 Matthias Ettrich
###  Copyright 1995-2000 The LyX Team.
###
### 

# This file is written by LyX, if you want to make your own
# modifications you should do them from inside LyX and save

\bind_file menus.bind

#
# MISC SECTION ##
#


#
# SCREEN  FONTS SECTION 
#

\screen_dpi 74
\screen_font_sizes 5,00 7,00 8,00 9,00 10,00 12,00 0,00 0,00 0,00 0,00

#
# COLOR SECTION ###
#


#
# PRINTER SECTION ###
#

\print_extra_options "-h duplex"

#
# EXPORT SECTION 
#


#
# TEX SECTION ###
#


#
# FILE SECTION ##
#


#
# ASCII EXPORT SECTION ##
#


#
# SPELLCHECKER SECTION ##
#


#
# LANGUAGE SUPPORT SECTION ##
#


#
# 2nd MISC SUPPORT SECTION ##
#

\screen_font_encoding_menu "iso8859-1"

#
# FORMATS SECTION ##
#


#
# CONVERTERS SECTION ##
#






Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Jean-Marc Lasgouttes

 "Rainer" == Rainer Hoffmann [EMAIL PROTECTED] writes:

Rainer # # SCREEN  FONTS SECTION  #

Rainer \screen_dpi 74 \screen_font_sizes 5,00 7,00 8,00 9,00 10,00
Rainer 12,00 0,00 0,00 0,00 0,00

That's the point where things failed. Why are these numbers output
with german commas? I thought that we had set the LC_NUMERIC locale
correctly... Also, why do we use floats instead of ints there? Does
X11 support that?

JMarc



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Angus Leeming

On Wednesday 06 December 2000 09:30, Jean-Marc Lasgouttes wrote:
  "Rainer" == Rainer Hoffmann [EMAIL PROTECTED] writes:

 Rainer # # SCREEN  FONTS SECTION  #

 Rainer \screen_dpi 74 \screen_font_sizes 5,00 7,00 8,00 9,00 10,00
 Rainer 12,00 0,00 0,00 0,00 0,00

 That's the point where things failed. Why are these numbers output
 with german commas? I thought that we had set the LC_NUMERIC locale
 correctly... Also, why do we use floats instead of ints there? Does
 X11 support that?

Well, the only place that font_sizes[] are actually used:

src/lyxrc.h:222:float font_sizes[10]; 
FontLoader.C:232:  int fsize = int( (lyxrc.font_sizes[size] * lyxrc.dpi *
   (lyxrc.zoom/100.0) ) / 72.27 + 0.5 );

I'll change font_sizes[] to int. Whilst I'm at it, I'll change dpi too.
Angus




Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Jean-Marc Lasgouttes

 "Angus" == Angus Leeming [EMAIL PROTECTED] writes:

Angus Well, the only place that font_sizes[] are actually used:

Angus src/lyxrc.h:222: float font_sizes[10]; FontLoader.C:232: int
Angus fsize = int( (lyxrc.font_sizes[size] * lyxrc.dpi *
Angus (lyxrc.zoom/100.0) ) / 72.27 + 0.5 );

Angus I'll change font_sizes[] to int. Whilst I'm at it, I'll change
Angus dpi too. 

Maybe you'll have to make sure that older lyxrc are read correctly
(still read the value as a float, maybe).

Also, I found out that I forgot to add a setlocale(LC_NUMERIC, "C") to
gettext.h. I'll do that.

JMarc



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Angus Leeming

On Wednesday 06 December 2000 10:38, Jean-Marc Lasgouttes wrote:
  "Angus" == Angus Leeming [EMAIL PROTECTED] writes:

 Angus Well, the only place that font_sizes[] are actually used:

 Angus src/lyxrc.h:222: float font_sizes[10]; FontLoader.C:232: int
 Angus fsize = int( (lyxrc.font_sizes[size] * lyxrc.dpi *
 Angus (lyxrc.zoom/100.0) ) / 72.27 + 0.5 );

 Angus I'll change font_sizes[] to int. Whilst I'm at it, I'll change
 Angus dpi too.

 Maybe you'll have to make sure that older lyxrc are read correctly
 (still read the value as a float, maybe).

 Also, I found out that I forgot to add a setlocale(LC_NUMERIC, "C") to
 gettext.h. I'll do that.

Should I change from float to int actually? The default sizes are:
\screen_font_sizes 5.0 7.0 8.0 9.0 10.0 12.0 14.4 17.28 20.74 24.88

I think, therefore that I should leave things as they are. Your fix is the 
right one I think.

The real question is why Rainer's preferences file contains the sizes it does:
\screen_font_sizes 5,00 7,00 8,00 9,00 10,00 12,00 0,00 0,00 0,00 0,00

What environment variables do I need to set to reproduce Rainer's problem:

LANG=de
LC_NUMERIC=de

What else.
A.



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Jean-Marc Lasgouttes

 "Angus" == Angus Leeming [EMAIL PROTECTED] writes:

Angus I think, therefore that I should leave things as they are. Your
Angus fix is the right one I think.

Yes, we'll see that later.

Angus The real question is why Rainer's preferences file contains the
Angus sizes it does: \screen_font_sizes 5,00 7,00 8,00 9,00 10,00
Angus 12,00 0,00 0,00 0,00 0,00

Angus What environment variables do I need to set to reproduce
Angus Rainer's problem:

Angus LANG=de LC_NUMERIC=de

Something like that. However, it seems that Suse handling of locales
is different from what anybody else does. Most of the locale related
problems that we get come from suse users.

I'll commit soon my patch to LC_NUMERIC="C" soon.

JMarc



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Angus Leeming

I've just discovered a small inconsistency here. I wasn't allowing the user 
to input anything other than an unsigned int for the screen font sizes. Since 
the defaults (on display) are:

\screen_font_sizes 5.0 7.0 8.0 9.0 10.0 12.0 14.4 17.28 20.74 24.88

Then that was probably a little irritating.

I'm thinking of a new fl_unsigned_float_filter. For the time being it's very 
simple. It will accept a ".", but should it also allow users to input a "," 
if they're "foreign"? Or is this exactly what LC_NUMERIC=C forbids?

Angus

int fl_unsigned_float_filter(FL_OBJECT * ob,
 char const * not_used,
 char const * unused,
 int c)
{
if (c == 0 /* final test before handing contents to app */
|| strchr("0123456789.", c)) {
/* since we only accept numerals then it must be valid */
return FL_VALID;
}
return FL_INVALID|FL_RINGBELL;
}



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Jean-Marc Lasgouttes

 "Angus" == Angus Leeming [EMAIL PROTECTED] writes:

Angus I've just discovered a small inconsistency here. I wasn't
Angus allowing the user to input anything other than an unsigned int
Angus for the screen font sizes. Since the defaults (on display) are:

Angus \screen_font_sizes 5.0 7.0 8.0 9.0 10.0 12.0 14.4 17.28 20.74
Angus 24.88

Angus Then that was probably a little irritating.

Angus I'm thinking of a new fl_unsigned_float_filter. For the time
Angus being it's very simple. It will accept a ".", but should it
Angus also allow users to input a "," if they're "foreign"? Or is
Angus this exactly what LC_NUMERIC=C forbids?

Do not accept "," in floats. Concerning the filter, we have a
isStrDbl in lstring.C which may be useful.

JMarc



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Angus Leeming

On Wednesday 06 December 2000 11:29, Jean-Marc Lasgouttes wrote:
  "Angus" == Angus Leeming [EMAIL PROTECTED] writes:

 Angus I've just discovered a small inconsistency here. I wasn't
 Angus allowing the user to input anything other than an unsigned int
 Angus for the screen font sizes. Since the defaults (on display) are:

 Angus \screen_font_sizes 5.0 7.0 8.0 9.0 10.0 12.0 14.4 17.28 20.74
 Angus 24.88

 Angus Then that was probably a little irritating.

 Angus I'm thinking of a new fl_unsigned_float_filter. For the time
 Angus being it's very simple. It will accept a ".", but should it
 Angus also allow users to input a "," if they're "foreign"? Or is
 Angus this exactly what LC_NUMERIC=C forbids?

 Do not accept "," in floats. Concerning the filter, we have a
 isStrDbl in lstring.C which may be useful.

Perfect. Thanks, JMarc.



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Stephan Witt

Jean-Marc Lasgouttes wrote:
 
  "Angus" == Angus Leeming [EMAIL PROTECTED] writes:
 
 Angus I've just discovered a small inconsistency here. I wasn't
 Angus allowing the user to input anything other than an unsigned int
 Angus for the screen font sizes. Since the defaults (on display) are:
 
 Angus \screen_font_sizes 5.0 7.0 8.0 9.0 10.0 12.0 14.4 17.28 20.74
 Angus 24.88
 
 Angus Then that was probably a little irritating.
 
 Angus I'm thinking of a new fl_unsigned_float_filter. For the time
 Angus being it's very simple. It will accept a ".", but should it
 Angus also allow users to input a "," if they're "foreign"? Or is
 Angus this exactly what LC_NUMERIC=C forbids?
 
 Do not accept "," in floats. Concerning the filter, we have a
 isStrDbl in lstring.C which may be useful.
 

I think it's a better solution to read/write from external file
with non-locale functions to avoid the format problems when exchange
files with other users or other program versions. But the
user interface should honor the locale environment of the
current user session.

Whilst the read/write of the external representation isn't fixed,
the user interface is bound to accepting "." only. But that's
automatic behaviour with LC_NUMERIC=C.

But I'm no C++ programmer,
I don't know the correct call-interface to achieve that.
With standard C I whould use:
  - [sf]printf to show a numeric value via user interface
  - a self-written function to save that number to external file
  - strtol/strtod to read a numeric user inputvalue
  - and a self-written function to read from external file

The use of setlocale() is a possiblity for the self-written functions,
but this isn't multi thread safe and you have to save and restore the
current value.

Regards, Stephan

PS. Sorry for sending this. I'm reading this list, but haven't
any time to learn coding with C++ and contribute code.


[EMAIL PROTECTED] | beusen Solutions GmbH
fon: +49 30 549932-62| Landsberger Allee 366
fax: +49 30 549932-21| 12681 Berlin, Germany




Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Jean-Marc Lasgouttes

 "Stephan" == Stephan Witt [EMAIL PROTECTED] writes:

Stephan I think it's a better solution to read/write from external
Stephan file with non-locale functions to avoid the format problems
Stephan when exchange files with other users or other program
Stephan versions. But the user interface should honor the locale
Stephan environment of the current user session.

I agree that we should tend to that. Once we are sure that all C++
compilers have correct C++ locale support, we will be able to play
such games.

Stephan PS. Sorry for sending this. I'm reading this list, but
Stephan haven't any time to learn coding with C++ and contribute
Stephan code.

Why be sorry? Any input is appreciated...

JMarc



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Lars Gullik Bjønnes

Angus Leeming [EMAIL PROTECTED] writes:

| On Wednesday 06 December 2000 10:38, Jean-Marc Lasgouttes wrote:
|   "Angus" == Angus Leeming [EMAIL PROTECTED] writes:
| 
|  Angus Well, the only place that font_sizes[] are actually used:
| 
|  Angus src/lyxrc.h:222: float font_sizes[10]; FontLoader.C:232: int
|  Angus fsize = int( (lyxrc.font_sizes[size] * lyxrc.dpi *
|  Angus (lyxrc.zoom/100.0) ) / 72.27 + 0.5 );
| 
|  Angus I'll change font_sizes[] to int. Whilst I'm at it, I'll change
|  Angus dpi too.
| 
|  Maybe you'll have to make sure that older lyxrc are read correctly
|  (still read the value as a float, maybe).
| 
|  Also, I found out that I forgot to add a setlocale(LC_NUMERIC, "C") to
|  gettext.h. I'll do that.
| 
| Should I change from float to int actually? The default sizes are:
| \screen_font_sizes 5.0 7.0 8.0 9.0 10.0 12.0 14.4 17.28 20.74 24.88

I think that we should do as they do in latex use ints that are *100
the float: 500,700,900,1000,1200,1440,1728,2074,2488

but not now...

Lgb

| What else.

probably LANG=no_NO

Lgb



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Rainer Hoffmann

Allan Rae schrieb:

> On Wed, 6 Dec 2000, Rainer Hoffmann wrote:
>
> > I build a new lyx and start it with src/lyx. Then I go to the
> > preferences menu and change something small (e.g. adding an option for
> > dvips). Then I click on save and the appearance of the document on the
> > screen changes: All the fonts look smaller, the title is the same size
> > as standard text. All in all it's different than before, but I never
> > wanted that! Did I do something wrong?
>
> Hmmm... Your screen font settings (probably zoom factor) appears to have
> changed however as you say you never altered this then something weird is
> happening.  What system are using?   OS, compiler, libraries etc.

SuSE Linux 7.0


>
>
> > Now when I close lyx and start it again I get some messages in the terminal
> > window I didn't have before:
> > Lyx: Unknown tag '12' [around line 24 of file ~/.lyx/preferences]
> > Lyx: Unknown tag '00' [around line 24 of file ~/.lyx/preferences]
> >  (8 more of those) ...
> > What's that?
>
> I don't know.  Perhaps you could include your preferences file in the next
> reply.
>
> Allan.  (ARRae)

### This file is part of
### 
###  LyX, The Document Processor
###
###  Copyright 1995 Matthias Ettrich
###  Copyright 1995-2000 The LyX Team.
###
### 

# This file is written by LyX, if you want to make your own
# modifications you should do them from inside LyX and save

\bind_file menus.bind

#
# MISC SECTION ##
#


#
# SCREEN & FONTS SECTION 
#

\screen_dpi 74
\screen_font_sizes 5,00 7,00 8,00 9,00 10,00 12,00 0,00 0,00 0,00 0,00

#
# COLOR SECTION ###
#


#
# PRINTER SECTION ###
#

\print_extra_options "-h duplex"

#
# EXPORT SECTION 
#


#
# TEX SECTION ###
#


#
# FILE SECTION ##
#


#
# ASCII EXPORT SECTION ##
#


#
# SPELLCHECKER SECTION ##
#


#
# LANGUAGE SUPPORT SECTION ##
#


#
# 2nd MISC SUPPORT SECTION ##
#

\screen_font_encoding_menu "iso8859-1"

#
# FORMATS SECTION ##
#


#
# CONVERTERS SECTION ##
#






Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Jean-Marc Lasgouttes

> "Rainer" == Rainer Hoffmann <[EMAIL PROTECTED]> writes:

Rainer> # # SCREEN & FONTS SECTION  #

Rainer> \screen_dpi 74 \screen_font_sizes 5,00 7,00 8,00 9,00 10,00
Rainer> 12,00 0,00 0,00 0,00 0,00

That's the point where things failed. Why are these numbers output
with german commas? I thought that we had set the LC_NUMERIC locale
correctly... Also, why do we use floats instead of ints there? Does
X11 support that?

JMarc



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Angus Leeming

On Wednesday 06 December 2000 09:30, Jean-Marc Lasgouttes wrote:
> > "Rainer" == Rainer Hoffmann <[EMAIL PROTECTED]> writes:
>
> Rainer> # # SCREEN & FONTS SECTION  #
>
> Rainer> \screen_dpi 74 \screen_font_sizes 5,00 7,00 8,00 9,00 10,00
> Rainer> 12,00 0,00 0,00 0,00 0,00
>
> That's the point where things failed. Why are these numbers output
> with german commas? I thought that we had set the LC_NUMERIC locale
> correctly... Also, why do we use floats instead of ints there? Does
> X11 support that?

Well, the only place that font_sizes[] are actually used:

src/lyxrc.h:222:float font_sizes[10]; 
FontLoader.C:232:  int fsize = int( (lyxrc.font_sizes[size] * lyxrc.dpi *
   (lyxrc.zoom/100.0) ) / 72.27 + 0.5 );

I'll change font_sizes[] to int. Whilst I'm at it, I'll change dpi too.
Angus




Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Jean-Marc Lasgouttes

> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Well, the only place that font_sizes[] are actually used:

Angus> src/lyxrc.h:222: float font_sizes[10]; FontLoader.C:232: int
Angus> fsize = int( (lyxrc.font_sizes[size] * lyxrc.dpi *
Angus> (lyxrc.zoom/100.0) ) / 72.27 + 0.5 );

Angus> I'll change font_sizes[] to int. Whilst I'm at it, I'll change
Angus> dpi too. 

Maybe you'll have to make sure that older lyxrc are read correctly
(still read the value as a float, maybe).

Also, I found out that I forgot to add a setlocale(LC_NUMERIC, "C") to
gettext.h. I'll do that.

JMarc



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Angus Leeming

On Wednesday 06 December 2000 10:38, Jean-Marc Lasgouttes wrote:
> > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
>
> Angus> Well, the only place that font_sizes[] are actually used:
>
> Angus> src/lyxrc.h:222: float font_sizes[10]; FontLoader.C:232: int
> Angus> fsize = int( (lyxrc.font_sizes[size] * lyxrc.dpi *
> Angus> (lyxrc.zoom/100.0) ) / 72.27 + 0.5 );
>
> Angus> I'll change font_sizes[] to int. Whilst I'm at it, I'll change
> Angus> dpi too.
>
> Maybe you'll have to make sure that older lyxrc are read correctly
> (still read the value as a float, maybe).
>
> Also, I found out that I forgot to add a setlocale(LC_NUMERIC, "C") to
> gettext.h. I'll do that.

Should I change from float to int actually? The default sizes are:
\screen_font_sizes 5.0 7.0 8.0 9.0 10.0 12.0 14.4 17.28 20.74 24.88

I think, therefore that I should leave things as they are. Your fix is the 
right one I think.

The real question is why Rainer's preferences file contains the sizes it does:
\screen_font_sizes 5,00 7,00 8,00 9,00 10,00 12,00 0,00 0,00 0,00 0,00

What environment variables do I need to set to reproduce Rainer's problem:

LANG=de
LC_NUMERIC=de

What else.
A.



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Jean-Marc Lasgouttes

> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> I think, therefore that I should leave things as they are. Your
Angus> fix is the right one I think.

Yes, we'll see that later.

Angus> The real question is why Rainer's preferences file contains the
Angus> sizes it does: \screen_font_sizes 5,00 7,00 8,00 9,00 10,00
Angus> 12,00 0,00 0,00 0,00 0,00

Angus> What environment variables do I need to set to reproduce
Angus> Rainer's problem:

Angus> LANG=de LC_NUMERIC=de

Something like that. However, it seems that Suse handling of locales
is different from what anybody else does. Most of the locale related
problems that we get come from suse users.

I'll commit soon my patch to LC_NUMERIC="C" soon.

JMarc



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Angus Leeming

I've just discovered a small inconsistency here. I wasn't allowing the user 
to input anything other than an unsigned int for the screen font sizes. Since 
the defaults (on display) are:

\screen_font_sizes 5.0 7.0 8.0 9.0 10.0 12.0 14.4 17.28 20.74 24.88

Then that was probably a little irritating.

I'm thinking of a new fl_unsigned_float_filter. For the time being it's very 
simple. It will accept a ".", but should it also allow users to input a "," 
if they're "foreign"? Or is this exactly what LC_NUMERIC=C forbids?

Angus

int fl_unsigned_float_filter(FL_OBJECT * ob,
 char const * not_used,
 char const * unused,
 int c)
{
if (c == 0 /* final test before handing contents to app */
|| strchr("0123456789.", c)) {
/* since we only accept numerals then it must be valid */
return FL_VALID;
}
return FL_INVALID|FL_RINGBELL;
}



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Jean-Marc Lasgouttes

> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> I've just discovered a small inconsistency here. I wasn't
Angus> allowing the user to input anything other than an unsigned int
Angus> for the screen font sizes. Since the defaults (on display) are:

Angus> \screen_font_sizes 5.0 7.0 8.0 9.0 10.0 12.0 14.4 17.28 20.74
Angus> 24.88

Angus> Then that was probably a little irritating.

Angus> I'm thinking of a new fl_unsigned_float_filter. For the time
Angus> being it's very simple. It will accept a ".", but should it
Angus> also allow users to input a "," if they're "foreign"? Or is
Angus> this exactly what LC_NUMERIC=C forbids?

Do not accept "," in floats. Concerning the filter, we have a
isStrDbl in lstring.C which may be useful.

JMarc



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Angus Leeming

On Wednesday 06 December 2000 11:29, Jean-Marc Lasgouttes wrote:
> > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
>
> Angus> I've just discovered a small inconsistency here. I wasn't
> Angus> allowing the user to input anything other than an unsigned int
> Angus> for the screen font sizes. Since the defaults (on display) are:
>
> Angus> \screen_font_sizes 5.0 7.0 8.0 9.0 10.0 12.0 14.4 17.28 20.74
> Angus> 24.88
>
> Angus> Then that was probably a little irritating.
>
> Angus> I'm thinking of a new fl_unsigned_float_filter. For the time
> Angus> being it's very simple. It will accept a ".", but should it
> Angus> also allow users to input a "," if they're "foreign"? Or is
> Angus> this exactly what LC_NUMERIC=C forbids?
>
> Do not accept "," in floats. Concerning the filter, we have a
> isStrDbl in lstring.C which may be useful.

Perfect. Thanks, JMarc.



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Stephan Witt

Jean-Marc Lasgouttes wrote:
> 
> > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
> 
> Angus> I've just discovered a small inconsistency here. I wasn't
> Angus> allowing the user to input anything other than an unsigned int
> Angus> for the screen font sizes. Since the defaults (on display) are:
> 
> Angus> \screen_font_sizes 5.0 7.0 8.0 9.0 10.0 12.0 14.4 17.28 20.74
> Angus> 24.88
> 
> Angus> Then that was probably a little irritating.
> 
> Angus> I'm thinking of a new fl_unsigned_float_filter. For the time
> Angus> being it's very simple. It will accept a ".", but should it
> Angus> also allow users to input a "," if they're "foreign"? Or is
> Angus> this exactly what LC_NUMERIC=C forbids?
> 
> Do not accept "," in floats. Concerning the filter, we have a
> isStrDbl in lstring.C which may be useful.
> 

I think it's a better solution to read/write from external file
with non-locale functions to avoid the format problems when exchange
files with other users or other program versions. But the
user interface should honor the locale environment of the
current user session.

Whilst the read/write of the external representation isn't fixed,
the user interface is bound to accepting "." only. But that's
automatic behaviour with LC_NUMERIC=C.

But I'm no C++ programmer,
I don't know the correct call-interface to achieve that.
With standard C I whould use:
  - [sf]printf to show a numeric value via user interface
  - a self-written function to save that number to external file
  - strtol/strtod to read a numeric user inputvalue
  - and a self-written function to read from external file

The use of setlocale() is a possiblity for the self-written functions,
but this isn't multi thread safe and you have to save and restore the
current value.

Regards, Stephan

PS. Sorry for sending this. I'm reading this list, but haven't
any time to learn coding with C++ and contribute code.


<[EMAIL PROTECTED]> | beusen Solutions GmbH
fon: +49 30 549932-62| Landsberger Allee 366
fax: +49 30 549932-21| 12681 Berlin, Germany




Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Jean-Marc Lasgouttes

> "Stephan" == Stephan Witt <[EMAIL PROTECTED]> writes:

Stephan> I think it's a better solution to read/write from external
Stephan> file with non-locale functions to avoid the format problems
Stephan> when exchange files with other users or other program
Stephan> versions. But the user interface should honor the locale
Stephan> environment of the current user session.

I agree that we should tend to that. Once we are sure that all C++
compilers have correct C++ locale support, we will be able to play
such games.

Stephan> PS. Sorry for sending this. I'm reading this list, but
Stephan> haven't any time to learn coding with C++ and contribute
Stephan> code.

Why be sorry? Any input is appreciated...

JMarc



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-06 Thread Lars Gullik Bjønnes

Angus Leeming <[EMAIL PROTECTED]> writes:

| On Wednesday 06 December 2000 10:38, Jean-Marc Lasgouttes wrote:
| > > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
| >
| > Angus> Well, the only place that font_sizes[] are actually used:
| >
| > Angus> src/lyxrc.h:222: float font_sizes[10]; FontLoader.C:232: int
| > Angus> fsize = int( (lyxrc.font_sizes[size] * lyxrc.dpi *
| > Angus> (lyxrc.zoom/100.0) ) / 72.27 + 0.5 );
| >
| > Angus> I'll change font_sizes[] to int. Whilst I'm at it, I'll change
| > Angus> dpi too.
| >
| > Maybe you'll have to make sure that older lyxrc are read correctly
| > (still read the value as a float, maybe).
| >
| > Also, I found out that I forgot to add a setlocale(LC_NUMERIC, "C") to
| > gettext.h. I'll do that.
| 
| Should I change from float to int actually? The default sizes are:
| \screen_font_sizes 5.0 7.0 8.0 9.0 10.0 12.0 14.4 17.28 20.74 24.88

I think that we should do as they do in latex use ints that are *100
the float: 500,700,900,1000,1200,1440,1728,2074,2488

but not now...

Lgb

| What else.

probably LANG=no_NO

Lgb



Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-05 Thread Rainer Hoffmann

I build a new lyx and start it with src/lyx. Then I go to the preferences menu
and change something
small (e.g. adding an option for dvips). Then I click on save and the appearance
of the document on
the screen changes: All the fonts look smaller, the title is the same size as
standard text. All in all it's different than
before, but I never wanted that! Did I do something wrong?
Now when I close lyx and start it again I get some messages in the terminal
window I didn't have before:
Lyx: Unknown tag '12' [around line 24 of file ~/.lyx/preferences]
Lyx: Unknown tag '00' [around line 24 of file ~/.lyx/preferences]
 (8 more of those) ...
What's that?

Rainer

"Lars Gullik Bjønnes" schrieb:

 The second prerelease of 1.1.6 has been available for some days now,
 and this time it is also announced here and not just on the developers
 list.

 We'd like it a lot if people took the time to test this version, but
 let me come with a stern warning first: The LyX file format has
 changed, so you will have problems of going back to a earlier lyx
 release unless you BACKUP your files. You have been warned.

 We would especially like testing of:
 - the new tabular code
 - the new import/export code
 - the externalinset code

 Also general user views are appreciated.

 From NEWS:

 As with all of the 1.1.x versions of LyX, this release contains a lot
 of new code: in particular, half of the changes described in the
 ChangeLog (which dates back to the 1.1.0 release) describe changes in
 LyX 1.1.6!

 Besides the usual under-the-hood changes, LyX 1.1.6 has many
 new user-visible features. The main visible feature is that the
 GUI-independent branch of development has been merged, as well as code
 from the older development version:

 - many popups have been rewritten to use the new GUI-I scheme. In the
   process they have received a nice cleanup: the Document and Paragraph
   popups now contain in one single place what was previously scattered
   in many places. Similarly, the citation and cross reference popups
   have been overhauled.

 - LyX now has a Preference popup where you can change most of your
   lyxrc settings [Allan, details?]

 - the menus can now be defined in a text file, and they automatically
   display the keyboard bindings associated with commands.

 - it is now possible to provide your own icons for the toolbar.

 - last but not least, work has begun on a KDE and a Gnome frontend for
   LyX. They are not officially supported for this version, but this
   will give you an idea of what is happening.

 Other major changes in 1.1.6 include:

 - the table support has been completely rewritten. It is now a modular
   object (inset), each cell of which owns a (also) newly written text
   inset. This now permits automatic text-wrap inside a tabular
   cell (if you define a width), multiparagraph mode AND setting of
   layouts for the paragraphs (lists inside a tabular cell!). Last but
   not least, a wide tabular now scrolls automatically so that all of it
   is visible without the need to enlarge the window!

   While there are as yet no other new features, they will be now MUCH
   easier to add. It may be that because of being "young" code some
   features may not work right now, but at least it is much
   better than before.

 - new external material inset: this is a new kind of very powerful
   inset which will allow LyX to interface intelligently with external
   applications. Among other good things, it will finally allow you to
   include GIF, JPEG, TIF, PNG, or just about any other raster format
   images in your document. It will even do an approximate ascii
   rendering when you do Ascii export if you have gifscii installed.

 - The code which converts from LyX format to anything else (for
   viewing or exporting purposes) and from anything else to LyX has been
   rewritten. In particular, it is now possible to export to PDF, and to
   import from HTML/MSWord. In fact it's now possible to add new import/export
   formats without recompiling LyX by specifying external programs or scripts
   in lyxrc settings
   (note that the old import/export lyxrc settings no longer work).

 - LyX can do command line exports without opening any GUI components.

 - The multilingual support has been improved. It is now possible to use in a
   document languages with different encodings, e.g. German (iso8859-1) and
   Czech (iso8859-2). Such a document can be viewed on screen using an
   iso10646-1 (Unicode) font. However, it is (currently) not possible to
   have differently encoded languages in the same paragraph.
   The languages and the encodings are defined in text files.

 - Improved support for Hebrew and Arabic (also present in 1.1.5fix2).

 - included files work now with docbook and linuxdoc; new layout
   docbook-book.

 - PSpell library and Aspell spell checker support now included thanks
   largely to Kevin Atkinson (PSpell and Aspell maintainer).

 And finally, there have been 

Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-05 Thread Allan Rae

On Wed, 6 Dec 2000, Rainer Hoffmann wrote:

 I build a new lyx and start it with src/lyx. Then I go to the
 preferences menu and change something small (e.g. adding an option for
 dvips). Then I click on save and the appearance of the document on the
 screen changes: All the fonts look smaller, the title is the same size
 as standard text. All in all it's different than before, but I never
 wanted that! Did I do something wrong?

Hmmm... Your screen font settings (probably zoom factor) appears to have
changed however as you say you never altered this then something weird is
happening.  What system are using?   OS, compiler, libraries etc.

 Now when I close lyx and start it again I get some messages in the terminal
 window I didn't have before:
 Lyx: Unknown tag '12' [around line 24 of file ~/.lyx/preferences]
 Lyx: Unknown tag '00' [around line 24 of file ~/.lyx/preferences]
  (8 more of those) ...
 What's that?

I don't know.  Perhaps you could include your preferences file in the next
reply.

Allan.  (ARRae)




Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-05 Thread Rainer Hoffmann

I build a new lyx and start it with src/lyx. Then I go to the preferences menu
and change something
small (e.g. adding an option for dvips). Then I click on save and the appearance
of the document on
the screen changes: All the fonts look smaller, the title is the same size as
standard text. All in all it's different than
before, but I never wanted that! Did I do something wrong?
Now when I close lyx and start it again I get some messages in the terminal
window I didn't have before:
Lyx: Unknown tag '12' [around line 24 of file ~/.lyx/preferences]
Lyx: Unknown tag '00' [around line 24 of file ~/.lyx/preferences]
 (8 more of those) ...
What's that?

Rainer

"Lars Gullik Bjønnes" schrieb:

> The second prerelease of 1.1.6 has been available for some days now,
> and this time it is also announced here and not just on the developers
> list.
>
> We'd like it a lot if people took the time to test this version, but
> let me come with a stern warning first: The LyX file format has
> changed, so you will have problems of going back to a earlier lyx
> release unless you BACKUP your files. You have been warned.
>
> We would especially like testing of:
> - the new tabular code
> - the new import/export code
> - the externalinset code
>
> Also general user views are appreciated.
>
> >From NEWS:
>
> As with all of the 1.1.x versions of LyX, this release contains a lot
> of new code: in particular, half of the changes described in the
> ChangeLog (which dates back to the 1.1.0 release) describe changes in
> LyX 1.1.6!
>
> Besides the usual under-the-hood changes, LyX 1.1.6 has many
> new user-visible features. The main visible feature is that the
> GUI-independent branch of development has been merged, as well as code
> from the older development version:
>
> - many popups have been rewritten to use the new GUI-I scheme. In the
>   process they have received a nice cleanup: the Document and Paragraph
>   popups now contain in one single place what was previously scattered
>   in many places. Similarly, the citation and cross reference popups
>   have been overhauled.
>
> - LyX now has a Preference popup where you can change most of your
>   lyxrc settings [Allan, details?]
>
> - the menus can now be defined in a text file, and they automatically
>   display the keyboard bindings associated with commands.
>
> - it is now possible to provide your own icons for the toolbar.
>
> - last but not least, work has begun on a KDE and a Gnome frontend for
>   LyX. They are not officially supported for this version, but this
>   will give you an idea of what is happening.
>
> Other major changes in 1.1.6 include:
>
> - the table support has been completely rewritten. It is now a modular
>   object (inset), each cell of which owns a (also) newly written text
>   inset. This now permits automatic text-wrap inside a tabular
>   cell (if you define a width), multiparagraph mode AND setting of
>   layouts for the paragraphs (lists inside a tabular cell!). Last but
>   not least, a wide tabular now scrolls automatically so that all of it
>   is visible without the need to enlarge the window!
>
>   While there are as yet no other new features, they will be now MUCH
>   easier to add. It may be that because of being "young" code some
>   features may not work right now, but at least it is much
>   better than before.
>
> - new external material inset: this is a new kind of very powerful
>   inset which will allow LyX to interface intelligently with external
>   applications. Among other good things, it will finally allow you to
>   include GIF, JPEG, TIF, PNG, or just about any other raster format
>   images in your document. It will even do an approximate ascii
>   rendering when you do Ascii export if you have gifscii installed.
>
> - The code which converts from LyX format to anything else (for
>   viewing or exporting purposes) and from anything else to LyX has been
>   rewritten. In particular, it is now possible to export to PDF, and to
>   import from HTML/MSWord. In fact it's now possible to add new import/export
>   formats without recompiling LyX by specifying external programs or scripts
>   in lyxrc settings
>   (note that the old import/export lyxrc settings no longer work).
>
> - LyX can do command line exports without opening any GUI components.
>
> - The multilingual support has been improved. It is now possible to use in a
>   document languages with different encodings, e.g. German (iso8859-1) and
>   Czech (iso8859-2). Such a document can be viewed on screen using an
>   iso10646-1 (Unicode) font. However, it is (currently) not possible to
>   have differently encoded languages in the same paragraph.
>   The languages and the encodings are defined in text files.
>
> - Improved support for Hebrew and Arabic (also present in 1.1.5fix2).
>
> - included files work now with docbook and linuxdoc; new layout
>   docbook-book.
>
> - PSpell library and Aspell spell checker support now included thanks

Re: announce lyx-1.1.6pre2; Preferences menu

2000-12-05 Thread Allan Rae

On Wed, 6 Dec 2000, Rainer Hoffmann wrote:

> I build a new lyx and start it with src/lyx. Then I go to the
> preferences menu and change something small (e.g. adding an option for
> dvips). Then I click on save and the appearance of the document on the
> screen changes: All the fonts look smaller, the title is the same size
> as standard text. All in all it's different than before, but I never
> wanted that! Did I do something wrong?

Hmmm... Your screen font settings (probably zoom factor) appears to have
changed however as you say you never altered this then something weird is
happening.  What system are using?   OS, compiler, libraries etc.

> Now when I close lyx and start it again I get some messages in the terminal
> window I didn't have before:
> Lyx: Unknown tag '12' [around line 24 of file ~/.lyx/preferences]
> Lyx: Unknown tag '00' [around line 24 of file ~/.lyx/preferences]
>  (8 more of those) ...
> What's that?

I don't know.  Perhaps you could include your preferences file in the next
reply.

Allan.  (ARRae)