Additional layout question and tex2lyx problems

2011-04-19 Thread Marcus Kriele
I am trying to support a command with argument for run-in headings:  It 
produces a small vertical skip without indent and then writes the text 
in the argument in a bold font.  Is it possible to mimic this behavior 
in LyX?  I experimented with the LabelType Manual directive but could 
not get it to work as I also need to pass the label text as an argument. 
At this time I am simply using a static label to indicate the style but 
this is of course not a very good solution.


I also ran into various problems with tex2lyx when I tried to import 
tex-documents with  LaTeX-commands that use required or optional 
arguments and that are supported in the layout. Are such problems well 
known or should I file a bug report?


tex2lyx also failed to import an unsupported command with optional 
argument: in \sidecaption[t] the optional argument was imported as 
regular text.


(LyX 2.0.0 RC3 and OSX)

Marcus


Re: Additional layout question and tex2lyx problems

2011-04-19 Thread Georg Baum
Marcus Kriele wrote:

 I also ran into various problems with tex2lyx when I tried to import
 tex-documents with  LaTeX-commands that use required or optional
 arguments and that are supported in the layout. Are such problems well
 known or should I file a bug report?

Such problems are not known (assuming you really called the correct tex2lyx 
that has access to the .layout files, LyX itself sometimes chooses the wrong 
one). tex2lyx is supposed to import all LaTeX commands that are directly 
mapped to styles in the .layout file.

 tex2lyx also failed to import an unsupported command with optional
 argument: in \sidecaption[t] the optional argument was imported as
 regular text.

This is expected. tex2lyx cannot decide whether [xxx] is an optional 
argument or standard text if it does not know whether the command supports 
an optional argument. You need to add those commands to the 
lib/synlib/syntax.default file. Then they will be imported correctly by 
tex2lyx (as ERT).


Georg



Additional layout question and tex2lyx problems

2011-04-19 Thread Marcus Kriele
I am trying to support a command with argument for run-in headings: It 
produces a small vertical skip without indent and then writes the text 
in the argument in a bold font. Is it possible to mimic this behavior 
in LyX? I experimented with the LabelType Manual directive but could 
not get it to work as I also need to pass the label text as an 
argument. At this time I am simply using a static label to indicate 
the style but this is of course not a very good solution. 
Answering myself:  A better solution is implemented in the standard 
Style Author.  In LyX the argument appears on a line by itself (rather 
than running into the text).  This behavior is a little different from 
the output but probably more in line with wysiwym than a faithful 
representation.


Re: Additional layout question and tex2lyx problems

2011-04-19 Thread Marcus Kriele

Thanks!

I have filed a bug (#7468)  for those cases where there should be 
support from the layout file. I believe that the layout was known to 
tex2lyx since the created LyX document used  formatting that I had 
defined in the same layout file.


Marcus


Additional layout question and tex2lyx problems

2011-04-19 Thread Marcus Kriele
I am trying to support a command with argument for run-in headings:  It 
produces a small vertical skip without indent and then writes the text 
in the argument in a bold font.  Is it possible to mimic this behavior 
in LyX?  I experimented with the "LabelType Manual" directive but could 
not get it to work as I also need to pass the label text as an argument. 
At this time I am simply using a static label to indicate the style but 
this is of course not a very good solution.


I also ran into various problems with tex2lyx when I tried to import 
tex-documents with  LaTeX-commands that use required or optional 
arguments and that are supported in the layout. Are such problems well 
known or should I file a bug report?


tex2lyx also failed to import an unsupported command with optional 
argument: in \sidecaption[t] the optional argument was imported as 
regular text.


(LyX 2.0.0 RC3 and OSX)

Marcus


Re: Additional layout question and tex2lyx problems

2011-04-19 Thread Georg Baum
Marcus Kriele wrote:

> I also ran into various problems with tex2lyx when I tried to import
> tex-documents with  LaTeX-commands that use required or optional
> arguments and that are supported in the layout. Are such problems well
> known or should I file a bug report?

Such problems are not known (assuming you really called the correct tex2lyx 
that has access to the .layout files, LyX itself sometimes chooses the wrong 
one). tex2lyx is supposed to import all LaTeX commands that are directly 
mapped to styles in the .layout file.

> tex2lyx also failed to import an unsupported command with optional
> argument: in \sidecaption[t] the optional argument was imported as
> regular text.

This is expected. tex2lyx cannot decide whether "[xxx]" is an optional 
argument or standard text if it does not know whether the command supports 
an optional argument. You need to add those commands to the 
lib/synlib/syntax.default file. Then they will be imported correctly by 
tex2lyx (as ERT).


Georg



Additional layout question and tex2lyx problems

2011-04-19 Thread Marcus Kriele
I am trying to support a command with argument for run-in headings: It 
produces a small vertical skip without indent and then writes the text 
in the argument in a bold font. Is it possible to mimic this behavior 
in LyX? I experimented with the "LabelType Manual" directive but could 
not get it to work as I also need to pass the label text as an 
argument. At this time I am simply using a static label to indicate 
the style but this is of course not a very good solution. 
Answering myself:  A better solution is implemented in the standard 
Style "Author".  In LyX the argument appears on a line by itself (rather 
than running into the text).  This behavior is a little different from 
the output but probably more in line with wysiwym than a faithful 
representation.


Re: Additional layout question and tex2lyx problems

2011-04-19 Thread Marcus Kriele

Thanks!

I have filed a bug (#7468)  for those cases where there should be 
support from the layout file. I believe that the layout was known to 
tex2lyx since the created LyX document used  formatting that I had 
defined in the same layout file.


Marcus