On 01-Feb-2000 John D. Blair wrote:
> Hello,
> 

Hello Blair!

> Thanks much for all of your excellent work on LyX.  I'm really happy
> with what it can do now, and I'm looking forward to everything you're
> still working on.
> 

#:O)

> At any rate, I've attached a patch to implement a simple new command:
> date-insert.  I wrote this b/c I'm currently co-authoring a book, and I
> and my partner critique each other's work by writing margin notes into
> the text.  We enter the date at the top of each comment, which quickly
> became tedious.
> 
> This new command accepts a strftime formatting string as its argument. 
> For example, 'date-insert %Y' inserts the current year.  
> 'date-insert %a %b %e %H:%M:%S %Y' inserts the current date in typical
> date(1) format.  Creating the appropriate entry in lyxrc to make this
> convenient is left as an exercise to the reader ;)
> 

The patch is a quite nice idea and also secure (in a way that it won't
introduce bugs ;) and small. So I decided that it can go in now #:O)

I did change a few things:

1. I added a lyxrc setting for a default format string
2. I remember the last inputed format string so that every time thereafter
   in the same lyx-session you use the same format
3. I added a setlocale(TC_TIME,"") to set the TIME locale for the strftime
   call and so have dates output with locale-settings. I would like to be
   able to change this so the date/time is outputed in the actual document
   language (I'll add an idea to how realize this at the end)
4. Changed the command from date-insert to insert-date (could someone tell
   me if this is right I don't know in what direction the commands should be
   and a look at LyXAction reveals that there are insert_xxx and xxx_insert
   commands around, so what???)

So I hope you all enjoy this new feature :)

IDEA for setting locale on the document language:
-------------------------------------------------

We store the different babel-languages in tex-strings.C::tex_babel[].
Would it be possible to instead of having only the name a structure like this:

{"english babel name", "locale babel name", "locale string"}

for example:

{ "default", "default", "" },
...
{ "german", "deutsch", "de_DE" },
...
{ "italian", "italiano", "it_IT" },
...

If we would have that it would be REALLY easy to set the right
locales in function where they are needed on base of the document
language!!!

I could change this, but please let me know if you like the idea!
Obviously I would only have to know the according right locale setting
for the babel-language-setting. I would insert only the ones I know for
now and let the others be default. They can then be inserted from other
people knowing what they do.

Greets Jürgen

-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

Dr. Jürgen Vigna                      E-Mail: [EMAIL PROTECTED]
Italienallee 13/N                     Tel:    +39-0471-450260
I-39100 Bozen                         Fax:    +39-0471-450296
ITALY                                 Web:    http://www.sad.it/~jug

I feel like I am sharing a ``CORN-DOG'' with NIKITA KHRUSCHEV ...

-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

Reply via email to