Re: lyx1.1.6fix1
On 06-Feb-2001 Jean-Marc Lasgouttes wrote: > > Lars> We use it to validate the format of the layout file, if the > Lars> validation fails we do not load the layout file. > > OK, that's one good reason. And think of something like a layout-wizard (if we find someone who would write such a thing ;) Jürgen -- -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._ Dr. Jürgen VignaE-Mail: [EMAIL PROTECTED] Italienallee 13/N Tel/Fax: +39-0471-450260 / +39-0471-450253 I-39100 Bozen Web: http://www.sad.it/~jug -._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._ It is not doing the thing we like to do, but liking the thing we have to do, that makes life blessed. -- Goethe
Re: lyx1.1.6fix1
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | > "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: | | Lars> Agree, we should be sober about what the xml format gives. What | Lars> it gives is a defined syntax + libraries for parsing/validation. | Lars> Easier interaction with external tools because of this. | | And are the said libraries light enough to justifiy their use? Or are | we going to have a lot of bloat due to that? There are beginning to come a lot of prorams that use xml libraries so if we use one of those we will not be bloating. If we are including our onw xml lib we can most likely use a stripped down version. Lgb
Re: lyx1.1.6fix1
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Agree, we should be sober about what the xml format gives. What Lars> it gives is a defined syntax + libraries for parsing/validation. Lars> Easier interaction with external tools because of this. And are the said libraries light enough to justifiy their use? Or are we going to have a lot of bloat due to that? JMarc
Re: lyx1.1.6fix1
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | Jose> The point is that by changing it to XML we can use lots of | Jose> software that work with it. The parser is one of them. | | What I do not like in this stance is that it looks so much like when | people told us we should switch to java. XML (for now) seems to me | more like hype than a _real_ gain. Agree, we should be sober about what the xml format gives. What it gives is a defined syntax + libraries for parsing/validation. Easier interaction with external tools because of this. Other than this the advantage is not huge. Lgb
Re: lyx1.1.6fix1
> "Jose" == Jose Abilio Oliveira Matos <[EMAIL PROTECTED]> writes: Jose> As Lars said with XML and a dtd it is possible to validate the Jose> layout files. Now as it is, LyX can load a faulty file that can Jose> crash it. This shouldn't happen. I'd be interested to see a layout file that would crash LyX, whereas an xml version would work. Jose> The point is that by changing it to XML we can use lots of Jose> software that work with it. The parser is one of them. What I do not like in this stance is that it looks so much like when people told us we should switch to java. XML (for now) seems to me more like hype than a _real_ gain. JMarc
Re: lyx1.1.6fix1
On Tue, Feb 06, 2001 at 12:32:28PM +, John Levon wrote: > which validating parser are you planning to use ? > > RXP ? There are several alternatives, another is libxml. There is some dicussion on the thread about the XML cvs branch. I suppose we want one to use directly in lyx. If that is from James Clark I guess there should be an API to call it from lyx. I am just guessing here. > john > -- > "Ou trouver les sources du lovely-fucky color-ls ?" > - Saintjoanis Emmanuel -- José
Re: lyx1.1.6fix1
On Tue, 6 Feb 2001, Jose Abilio Oliveira Matos wrote: > The point is that by changing it to XML we can use lots of software that > work with it. The parser is one of them. which validating parser are you planning to use ? RXP ? john -- "Ou trouver les sources du lovely-fucky color-ls ?" - Saintjoanis Emmanuel
Re: lyx1.1.6fix1
"Garst R. Reese" <[EMAIL PROTECTED]> writes: | Jose Abilio Oliveira Matos wrote: | > | > On Tue, Feb 06, 2001 at 10:27:02AM +0100, Lars Gullik Bjønnes wrote: | > > | | > > imho hte layout files are close to xml already, just bissing some <> | > > and change the name of some endtags. | > | > I totally agree. | > | > > Lgb | They seem to work, why fix them? Is there a potential gain in | functionality? Yes, validation of layout files When we support online generation of paragraph layouts/floats/theorems etc. an xml format (or any format that can ge fun through a validator) will be a boon. Aslo to have all files read by lyx use the same "engine" is good. I think we all agree that LyXLex is not perfect and that we misuse it in a lot of places. Lgb
Re: lyx1.1.6fix1
On Tue, Feb 06, 2001 at 08:20:36AM -0400, Garst R. Reese wrote: > They seem to work, why fix them? Is there a potential gain in > functionality? Yes. As Lars said with XML and a dtd it is possible to validate the layout files. Now as it is, LyX can load a faulty file that can crash it. This shouldn't happen. The point is that by changing it to XML we can use lots of software that work with it. The parser is one of them. > Garst -- José
Re: lyx1.1.6fix1
Jose Abilio Oliveira Matos wrote: > > On Tue, Feb 06, 2001 at 10:27:02AM +0100, Lars Gullik Bjønnes wrote: > > > > imho hte layout files are close to xml already, just bissing some <> > > and change the name of some endtags. > > I totally agree. > > > Lgb They seem to work, why fix them? Is there a potential gain in functionality? Garst
Re: lyx1.1.6fix1
On Tue, Feb 06, 2001 at 10:27:02AM +0100, Lars Gullik Bjønnes wrote: > > | > "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: > | > | Lars> Why not switch to an xml like format? > | > | Lars> This could also perhaps help the xml-format project a bit. > | > | I really do not see what we gain from that, actually... > > Primarily the same parser code for all the lyx files, the possibillity > of haveing a dtd for layout files, language files, bind files, > keyboard files. First, I know that I like XML, now LyX even outputs an XML version of docbook. :-) We talked before about changing the layout files to script files using python/perl/scheme/javascript or whatever language we choose to access the lyx kernel. Does this means that we are postponing this decision? One option that is simultaneously XML and a script language is xls, but that is to take with lots of salt, with the size of an ocean. :-) What I am raising is this, do we want the layout files to be scripts or data declarations (as the XML solution implies)? > | Whereas the > | gain is clear for the .lyx format which requires some structure, the > | layout format is fine as it is. Since layouts are edited by hand, I > | really feel the current format is much more intelligible. > > imho hte layout files are close to xml already, just bissing some <> > and change the name of some endtags. I totally agree. > Lgb -- José
Re: lyx1.1.6fix1
On Tue, Feb 06, 2001 at 10:13:43AM +0100, Jean-Marc Lasgouttes wrote: > I really do not see what we gain from that, actually... Whereas the > gain is clear for the .lyx format which requires some structure, the > layout format is fine as it is. Since layouts are edited by hand, I In the future, we may have a layout editor.
Re: lyx1.1.6fix1
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> We use it to validate the format of the layout file, if the Lars> validation fails we do not load the layout file. OK, that's one good reason. JMarc
Re: lyx1.1.6fix1
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | > "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: | | Lars> Primarily the same parser code for all the lyx files, the | Lars> possibillity of haveing a dtd for layout files, language files, | Lars> bind files, keyboard files. | | I have to admit that I still do not see what the wonderful advantages | of xml are... What will we do with a DTD? Print it out and frame it on | the wall? We use it to validate the format of the layout file, if the validation fails we do not load the layout file. Lgb
Re: lyx1.1.6fix1
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Primarily the same parser code for all the lyx files, the Lars> possibillity of haveing a dtd for layout files, language files, Lars> bind files, keyboard files. I have to admit that I still do not see what the wonderful advantages of xml are... What will we do with a DTD? Print it out and frame it on the wall? JMarc
Re: lyx1.1.6fix1
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | > "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: | | Lars> Why not switch to an xml like format? | | Lars> This could also perhaps help the xml-format project a bit. | | I really do not see what we gain from that, actually... Primarily the same parser code for all the lyx files, the possibillity of haveing a dtd for layout files, language files, bind files, keyboard files. | Whereas the | gain is clear for the .lyx format which requires some structure, the | layout format is fine as it is. Since layouts are edited by hand, I | really feel the current format is much more intelligible. imho hte layout files are close to xml already, just bissing some <> and change the name of some endtags. Lgb
Re: lyx1.1.6fix1
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Why not switch to an xml like format? Lars> This could also perhaps help the xml-format project a bit. I really do not see what we gain from that, actually... Whereas the gain is clear for the .lyx format which requires some structure, the layout format is fine as it is. Since layouts are edited by hand, I really feel the current format is much more intelligible. JMarc
Re: lyx1.1.6fix1
On Mon, 5 Feb 2001, Amir Karger wrote: [...] > Attached you'll find layout2xml.pl. The other attachment is the converted > stdlists.inc [...] Gee, you must be really enthusiastic about your thesis at the moment! Allan. (ARRae)
Re: lyx1.1.6fix1
On Mon, Feb 05, 2001 at 10:31:40PM +0200, Dekel Tsur wrote:
> On Mon, Feb 05, 2001 at 09:22:07PM +0100, Lars Gullik BjRnnes wrote:
> > Why not switch to an xml like format?
> >
> > This could also perhaps help the xml-format project a bit.
> >
> >
> > afrikaans
> > afrikaans
> > Afrikaans
> > iso8859-1
> >
>
> So the layouts files should also be stored in xml format.
> I will let others do these changes.
OK.
Attached you'll find layout2xml.pl. The other attachment is the converted
stdlists.inc
I don't actually know xml, so I've done a very rudimentary job. I'm hoping
someone will give me a bit more detail on exactly what you want. Right now:
- ... is placed
around the whole document (Since I only remove .layout, .inc remains, by
the way. Of course that could be changed.)
- each comment line turns into
- Style & other blocks that nest turn into ...
- Attributes become something like
- Preamble is copied verbatim until EndPreamble and put inside
a ... block.
- Some rudimentary formatting is done to make the xml human-readable
I've tried it so far on the files stdlists.inc and revtex4.layout, and it
seems to handle everything. I didn't do anything special with Input, and
an attribute like Columns, which applies to the whole textclass, is treated
the same way as a style sub-attribute like AlignPossible. So let me know
what needs to be changed.
You probably want to be more sophisticated than using 'value="whatever"' for
everything. For example, you may want to have some text not actually in the
<> blocks. But I've never written xml, so I wouldn't know. Try running it on
a couple files, and see what you get, and tell me what changes I should make.
-Amir
#!/usr/bin/perl -w
use strict;
my $Verbatim = 0;
my %BlockEnd = (
"Font" => "EndFont",
"LabelFont" => "EndFont",
"TextFont" => "EndFont",
"Style" => "End",
"ClassOptions" => "End",
);
my @ExpectedEnd = ();
my @Block = ();
my $name = $ARGV[0];
$name =~ s/\.layout$//;
print qq(\n\n);
while (<>) {
if ($Verbatim) {
if (/^\s*EndPreamble/) {
$Verbatim = 0;
print " " x @Block;
print "\n";
} else {
print;
}
# Empty line
} elsif (/^\s*$/) {
print;
# Comment
} elsif (/^\s*#/) {
s/#(.*)//;
print;
# End of current block
} elsif (@ExpectedEnd && /^\s*$ExpectedEnd[-1]\s*$/) {
pop @ExpectedEnd;
my $str = pop @Block;
print " " x @Block;
print qq(\n);
# Beginning of other block
} elsif (/^\s*(\w+)(\s+(\w+))?/i && exists $BlockEnd{$1}) {
my $blockname = $1;
my $val = $3;
my $valstr = $val ? qq( value="$val") : "";
# Indent before pushing onto @Block
print " " x @Block;
print qq(<$blockname$valstr>\n);
push @Block, $blockname;
push @ExpectedEnd, $BlockEnd{$blockname};
# Attribute
} elsif (/\s*(\w+)\s+(\S.*)/) {
my ($name, $val) = ($1, $2);
print " " x @Block;
print qq(<$name value="$val">\n);
} elsif (/\s*Preamble/) {
$Verbatim = 1;
print " " x @Block;
print "\n";
} else {
warn "unhandled line: $_, expect is @ExpectedEnd";
print;
}
}
print "\n";
Re: lyx1.1.6fix1
Dekel Tsur <[EMAIL PROTECTED]> writes: | On Mon, Feb 05, 2001 at 09:22:07PM +0100, Lars Gullik Bjønnes wrote: | > Why not switch to an xml like format? | > | > This could also perhaps help the xml-format project a bit. | > | > | > afrikaans | > afrikaans | > Afrikaans | > iso8859-1 | > | | So the layouts files should also be stored in xml format. Yes, I belive that is the way to go. | I will let others do these changes. Hmm da hmm. Lgb
Re: lyx1.1.6fix1
On Mon, Feb 05, 2001 at 09:22:07PM +0100, Lars Gullik Bjønnes wrote: > Why not switch to an xml like format? > > This could also perhaps help the xml-format project a bit. > > > afrikaans > afrikaans > Afrikaans > iso8859-1 > So the layouts files should also be stored in xml format. I will let others do these changes.
Re: lyx1.1.6fix1
Dekel Tsur <[EMAIL PROTECTED]> writes: | On Tue, Feb 06, 2001 at 01:04:57AM +0900, Miyata Shigeru wrote: | > Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote: | > etc. While it has been changed into | > | > # name babel name GUI nameRTL? encoding code latex options | > afrikaans afrikaans "Afrikaans" false iso8859-1 af_ZA "" | > americanamerican"American" false iso8859-1 en_US "" | > arabic arabic "Arabic"true iso8859-6 ar_SA "" | | I'm thinking of changing the format of the languages file to | Language afrikaans | Babel afrikaans | Name "Afrikaans" | Encoding iso8859-1 | etc. Why not switch to an xml like format? This could also perhaps help the xml-format project a bit. afrikaans afrikaans Afrikaans iso8859-1 Lgb
Re: lyx1.1.6fix1
On Tue, Feb 06, 2001 at 01:04:57AM +0900, Miyata Shigeru wrote: > Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote: > etc. While it has been changed into > > # name babel name GUI nameRTL? encoding code latex options > afrikaans afrikaans "Afrikaans" false iso8859-1 af_ZA "" > americanamerican"American" false iso8859-1 en_US "" > arabic arabic "Arabic"true iso8859-6 ar_SA "" I'm thinking of changing the format of the languages file to Language afrikaans Babel afrikaans Name "Afrikaans" Encoding iso8859-1 etc.
Re: lyx1.1.6fix1
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote: > Herbert, did you solve this problem?? It could maybe be a wrong > language description somewhere... Do you use greek? Do you have your > own language file? It is that lyxlex does not respect newlines. In 1.1.6 languages file looked like # name babel name GUI nameRTL? encoding code afrikaans afrikaans "Afrikaans" false iso8859-1 af_ZA americanamerican"American" false iso8859-1 en_US arabic arabic "Arabic"true iso8859-6 ar_SA etc. While it has been changed into # name babel name GUI nameRTL? encoding code latex options afrikaans afrikaans "Afrikaans" false iso8859-1 af_ZA "" americanamerican"American" false iso8859-1 en_US "" arabic arabic "Arabic"true iso8859-6 ar_SA "" etc. in 1.1.6fix1 Now LyX 1.1.6fix1 reads the old format languages file as # name babel name GUI nameRTL? encoding codelatex options afrikaans afrikaans "Afrikaans" false iso8859-1 af_ZA american american"American" false iso8859-1 en_US arabic arabic "Arabic"trueiso8859-6 ar_SA austrian austrian "Austrian" etc. After some thinking I come to the conclusion that it is not a bug but a feature of lyxlex. Since the default mode for lyxlex is escape == false (we have to deal with LaTeX commands), we cannot escape \n easily, which restricts the line length severely. So I won't submit a patch ;-) He had solved the problem by removing ~/.lyx/languages Probably running configure again could have fixed the problem, too. Regards, SMiyata
RE: LyX1.1.6fix1 - table
On 03-Feb-2001 Herbert Voss wrote:
> when i insert a table alignment for a cell, for example
>
>|>{\columncolor[gray]{.8}}c|
>
> and i want to edit this string, the cursor always jumps
> to the end of this string when i delete any of the characters
> inside this string. for example: delete "8" abd the cursor
> jumps to the right.
>
> this behaviour is only in the alignment-fields and not in
> the width-fields.
Because I removed the automatic update on the width fields, there you
have to press ENTER to be able to change them.
Now the question is should we do this for all of the input fields,
I opt for YES and will do the modifications if there are not votes
against this behaviour!
Jürgen
--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail: [EMAIL PROTECTED]
Italienallee 13/N Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen Web: http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
What's page one, a preemptive strike?
-- Professor Freund, Communication, Ramapo State College
Re: lyx1.1.6fix1
> "Herbert" == Herbert Voss <[EMAIL PROTECTED]> writes:
Herbert> some curious thing happens ... i can´t run any lyx-file
Herbert> without the error
Herbert> Package Babel error you haven't defined ...
Herbert> exporting to tex gives the following lyx-command:
Herbert> %% LyX specific LaTeX commands.
Herbert> \providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
Herbert> greek
Herbert> %% User specified LaTeX commands.
Herbert, did you solve this problem?? It could maybe be a wrong
language description somewhere... Do you use greek? Do you have your
own language file?
JMarc
Re: lyx1.1.6fix1
Herbert Voss <[EMAIL PROTECTED]> wrote:
> exporting to tex gives the following lyx-command:
>
> %% LyX specific LaTeX commands.
> \providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
> greek
>
> %% User specified LaTeX commands.
>
>
> maybe that i'm blinded by the light, but what's the word greek doing
> here?
Have you updated system global or your personal languages file?
It is probably in /usr/share/lyx directory on UNIX.
Regards,
SMiyata
