Re: tex2lyx: round trip on a beamer presentation

2005-07-01 Thread G. Milde
On 30.06.05, Jean-Pierre Chrétien wrote:
 Georg Baum [EMAIL PROTECTED] writes:
 
  
  Jean-Pierre Chrétien wrote:
  
    one is about the optional arg to the \frame command
   \frame[plain]{\titlepage} - \frame{[}plain{]}{titlepage}
  
  You can fix this sort of errors easily yourself: Add
  
  \frame[]{} 
  to lib/reLyX/syntax.default (and then send a patch  ).
 
 This works, but I get all frames in ERT, not exactly what expected.

This is because beamer layout file doesnot have a Style with latexname
frame. 

Instead, it introduces the \lyxframe and \lyxframeend commands as an
substitution for nesting stuff inside a frame.

 In will test your patch on tex2lyx later.
 
 [..]
   I can downsize this to a minimal two-slide example if needed.
  
  Please do this, since I don't understand what happens apart from the \frame
  bug.
 
 Done on bugzilla, bug# 1910
 
 With the short example, \author{...} is lost in the lyx preamble, I guess
 it deserves a different bug report (sorry, I'm a freshman with bugzilla 
 usage).
 
 -- 
 Jean-Pierre
 
 

-- 
G.Milde web.de


Re: tex2lyx: round trip on a beamer presentation

2005-07-01 Thread Georg Baum
Jean-Pierre Chrétien wrote:

 OK, I understood also that I could copy the patch
 in a local syntax.personal file and call it
 with tex2lyx -s syntax.personal foo.tex foo.lyx

Yes.

 I know that the goal of tex2lyx is to produce error-free
 lyx code, but would this local syntax file allow to tell
 tex2lyx to translate e.g.
 \frame[plain]{
 by
 \layout BeginPlainFrame
 and
 }\frame{
 by
 layout BeginFrame

No. The syntax file does only tell how many arguments a LaTeX command has.
The commands that are translated to a LyX layout are read from the layout
files: If beamer.layout would contain a layout for \frame it would be
translated to that layout.
Maybe you can ask Till Tantau why he used \lyxframe and not \frame and tell
him about the consequences?
I don't want to hardcode \frame into tex2lyx unless it is really necessary.


Georg




Re: tex2lyx: round trip on a beamer presentation

2005-07-01 Thread Jean-Pierre Chrétien
G. Milde [EMAIL PROTECTED] writes:

 
 On 30.06.05, Jean-Pierre Chrétien wrote:
  Georg Baum Georg.Baum at ... writes:
  
   
   Jean-Pierre Chrétien wrote:

  This works, but I get all frames in ERT, not exactly what expected.
 
 This is because beamer layout file doesnot have a Style with latexname
 frame. 
 
 Instead, it introduces the \lyxframe and \lyxframeend commands as an
 substitution for nesting stuff inside a frame.

Georg patch translates 
\frame{ ... } 
as 
ert\frame{/ert...ert}/ert
which is all right from the point of view of tex2lyx current goal.
 
My previous follow-up raised the question of directly translating in the
required layout by associating a latex construct to the corresponding
layout equivalent, and using a (possibly user written) syntax file
to define these equivalences.

Postfiltering the lyx file is of course possible, replacing
current ERTs with the layout commands in LyX code, so this
is a really aesthetic question from the point of view of tex2lyx.

-- 
Jean-Pierre









Re: tex2lyx: round trip on a beamer presentation

2005-07-01 Thread G. Milde
On 30.06.05, Jean-Pierre Chrétien wrote:
> Georg Baum <[EMAIL PROTECTED]> writes:
> 
> > 
> > Jean-Pierre Chrétien wrote:
> > 
> > >  one is about the optional arg to the \frame command
> > > \frame[plain]{\titlepage} -> \frame{[}plain{]}{titlepage}
> > 
> > You can fix this sort of errors easily yourself: Add
> > 
> > \frame[]{}> 
> > to lib/reLyX/syntax.default (and then send a patch  ).
> 
> This works, but I get all frames in ERT, not exactly what expected.

This is because beamer layout file doesnot have a Style with latexname
"frame". 

Instead, it introduces the \lyxframe and \lyxframeend commands as an
substitution for nesting stuff inside a frame.

> In will test your patch on tex2lyx later.
> 
> [..]
> > > I can downsize this to a minimal two-slide example if needed.
> > 
> > Please do this, since I don't understand what happens apart from the \frame
> > bug.
> 
> Done on bugzilla, bug# 1910
> 
> With the short example, \author{...} is lost in the lyx preamble, I guess
> it deserves a different bug report (sorry, I'm a freshman with bugzilla 
> usage).
> 
> -- 
> Jean-Pierre
> 
> 

-- 
G.Milde web.de


Re: tex2lyx: round trip on a beamer presentation

2005-07-01 Thread Georg Baum
Jean-Pierre Chrétien wrote:

> OK, I understood also that I could copy the patch
> in a local syntax.personal file and call it
> with tex2lyx -s syntax.personal foo.tex >foo.lyx

Yes.

> I know that the goal of tex2lyx is to produce error-free
> lyx code, but would this local syntax file allow to tell
> tex2lyx to translate e.g.
> \frame[plain]{
> by
> \layout BeginPlainFrame
> and
> }\frame{
> by
> layout BeginFrame

No. The syntax file does only tell how many arguments a LaTeX command has.
The commands that are translated to a LyX layout are read from the layout
files: If beamer.layout would contain a layout for \frame it would be
translated to that layout.
Maybe you can ask Till Tantau why he used \lyxframe and not \frame and tell
him about the consequences?
I don't want to hardcode \frame into tex2lyx unless it is really necessary.


Georg




Re: tex2lyx: round trip on a beamer presentation

2005-07-01 Thread Jean-Pierre Chrétien
G. Milde <[EMAIL PROTECTED]> writes:

> 
> On 30.06.05, Jean-Pierre Chrétien wrote:
> > Georg Baum  ...> writes:
> > 
> > > 
> > > Jean-Pierre Chrétien wrote:

> > This works, but I get all frames in ERT, not exactly what expected.
> 
> This is because beamer layout file doesnot have a Style with latexname
> "frame". 
> 
> Instead, it introduces the \lyxframe and \lyxframeend commands as an
> substitution for nesting stuff inside a frame.

Georg patch translates 
\frame{ ... } 
as 
\frame{...}
which is all right from the point of view of tex2lyx current goal.
 
My previous follow-up raised the question of directly translating in the
required layout by associating a latex construct to the corresponding
layout equivalent, and using a (possibly user written) syntax file
to define these equivalences.

Postfiltering the lyx file is of course possible, replacing
current ERTs with the layout commands in LyX code, so this
is a really aesthetic question from the point of view of tex2lyx.

-- 
Jean-Pierre









Re: tex2lyx: round trip on a beamer presentation

2005-06-30 Thread Georg Baum
Jean-Pierre Chrétien wrote:

  one is about the optional arg to the \frame command
 \frame[plain]{\titlepage} - \frame{[}plain{]}{titlepage}

You can fix this sort of errors easily yourself: Add

\frame[]{}

to lib/reLyX/syntax.default (and then send a patch ;-) ). In this case
however the \frame command is already there (it is a standard LaTeX
command), so I changed it to recognize the optional argument.

 Sorry if this has been reported, is bugzilla appropriate for tex2lyx ?

Yes.

 I can downsize this to a minimal two-slide example if needed.

Please do this, since I don't understand what happens apart from the \frame
bug.


GeorgIndex: lib/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v
retrieving revision 1.712
diff -u -p -r1.712 ChangeLog
--- lib/ChangeLog	24 Jun 2005 10:14:33 -	1.712
+++ lib/ChangeLog	30 Jun 2005 07:09:18 -
@@ -1,3 +1,7 @@
+2005-06-30  Georg Baum  [EMAIL PROTECTED]
+
+	* reLyX/syntax.default: recognize optional argument of \frame
+
 2005-06-24  Jürgen Spitzmüller  [EMAIL PROTECTED]
 
 	* ui/stdmenus.ui:
Index: lib/reLyX/syntax.default
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/reLyX/syntax.default,v
retrieving revision 1.10
diff -u -p -r1.10 syntax.default
--- lib/reLyX/syntax.default	18 Mar 2005 14:22:10 -	1.10
+++ lib/reLyX/syntax.default	30 Jun 2005 07:09:18 -
@@ -434,7 +434,8 @@ $$
 \footnotemark[]
 \footnoterule
 \footnotetext[]{translate}
-\frame{translate}
+% LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
+\frame[]{translate}
 \framebox[][]{translate} % Two variants of this command
 %\framebox(,)[]{}%  picture variant
 \frenchspacing


Re: tex2lyx: round trip on a beamer presentation

2005-06-30 Thread Jean-Pierre Chrétien
Georg Baum [EMAIL PROTECTED] writes:

 
 Jean-Pierre Chrétien wrote:
 
   one is about the optional arg to the \frame command
  \frame[plain]{\titlepage} - \frame{[}plain{]}{titlepage}
 
 You can fix this sort of errors easily yourself: Add
 
 \frame[]{} 
 to lib/reLyX/syntax.default (and then send a patch  ).

This works, but I get all frames in ERT, not exactly what expected.
In will test your patch on tex2lyx later.

[..]
  I can downsize this to a minimal two-slide example if needed.
 
 Please do this, since I don't understand what happens apart from the \frame
 bug.

Done on bugzilla, bug# 1910

With the short example, \author{...} is lost in the lyx preamble, I guess
it deserves a different bug report (sorry, I'm a freshman with bugzilla usage).

-- 
Jean-Pierre



Re: tex2lyx: round trip on a beamer presentation

2005-06-30 Thread Jean-Pierre Chrétien

 This works, but I get all frames in ERT, not exactly what expected.
 In will test your patch on tex2lyx later.

Works fine, thanks.

-- 
Jean-Pierre




Re: tex2lyx: round trip on a beamer presentation

2005-06-30 Thread Georg Baum
Jean-Pierre Chrétien wrote:

 
 This works, but I get all frames in ERT, not exactly what expected.

The reason is the translate argument:

\foo{translate}

in syntax.default means that the argument of foo is normal LaTeX code that
gets translated into LyX constructs.

\foo{}

means that the argument of \foo may contain special things that can't be
translated to LyX in general.

 In will test your patch on tex2lyx later.
 
 Works fine, thanks.

Because I used the translate argument.


Georg



Re: tex2lyx: round trip on a beamer presentation

2005-06-30 Thread Jean-Pierre Chrétien

 
 Because I used the translate argument.

OK, I understood also that I could copy the patch
in a local syntax.personal file and call it
with tex2lyx -s syntax.personal foo.tex foo.lyx

I know that the goal of tex2lyx is to produce error-free
lyx code, but would this local syntax file allow to tell
tex2lyx to translate e.g.
\frame[plain]{
by
\layout BeginPlainFrame
and
}\frame{
by 
layout BeginFrame

As this would be documentclass dependent, I guess not...

-- 
Jean-Pierre







Re: tex2lyx: round trip on a beamer presentation

2005-06-30 Thread Georg Baum
Jean-Pierre Chrétien wrote:

>  one is about the optional arg to the \frame command
> \frame[plain]{\titlepage} -> \frame{[}plain{]}{titlepage}

You can fix this sort of errors easily yourself: Add

\frame[]{}

to lib/reLyX/syntax.default (and then send a patch ;-) ). In this case
however the \frame command is already there (it is a standard LaTeX
command), so I changed it to recognize the optional argument.

> Sorry if this has been reported, is bugzilla appropriate for tex2lyx ?

Yes.

> I can downsize this to a minimal two-slide example if needed.

Please do this, since I don't understand what happens apart from the \frame
bug.


GeorgIndex: lib/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v
retrieving revision 1.712
diff -u -p -r1.712 ChangeLog
--- lib/ChangeLog	24 Jun 2005 10:14:33 -	1.712
+++ lib/ChangeLog	30 Jun 2005 07:09:18 -
@@ -1,3 +1,7 @@
+2005-06-30  Georg Baum  <[EMAIL PROTECTED]>
+
+	* reLyX/syntax.default: recognize optional argument of \frame
+
 2005-06-24  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
 
 	* ui/stdmenus.ui:
Index: lib/reLyX/syntax.default
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/reLyX/syntax.default,v
retrieving revision 1.10
diff -u -p -r1.10 syntax.default
--- lib/reLyX/syntax.default	18 Mar 2005 14:22:10 -	1.10
+++ lib/reLyX/syntax.default	30 Jun 2005 07:09:18 -
@@ -434,7 +434,8 @@ $$
 \footnotemark[]
 \footnoterule
 \footnotetext[]{translate}
-\frame{translate}
+% LaTeX has \frame{}, but beamer has \frame[]{}, so use the latter
+\frame[]{translate}
 \framebox[][]{translate} % Two variants of this command
 %\framebox(,)[]{}%  picture variant
 \frenchspacing


Re: tex2lyx: round trip on a beamer presentation

2005-06-30 Thread Jean-Pierre Chrétien
Georg Baum <[EMAIL PROTECTED]> writes:

> 
> Jean-Pierre Chrétien wrote:
> 
> >  one is about the optional arg to the \frame command
> > \frame[plain]{\titlepage} -> \frame{[}plain{]}{titlepage}
> 
> You can fix this sort of errors easily yourself: Add
> 
> \frame[]{}> 
> to lib/reLyX/syntax.default (and then send a patch  ).

This works, but I get all frames in ERT, not exactly what expected.
In will test your patch on tex2lyx later.

[..]
> > I can downsize this to a minimal two-slide example if needed.
> 
> Please do this, since I don't understand what happens apart from the \frame
> bug.

Done on bugzilla, bug# 1910

With the short example, \author{...} is lost in the lyx preamble, I guess
it deserves a different bug report (sorry, I'm a freshman with bugzilla usage).

-- 
Jean-Pierre



Re: tex2lyx: round trip on a beamer presentation

2005-06-30 Thread Jean-Pierre Chrétien

> This works, but I get all frames in ERT, not exactly what expected.
> In will test your patch on tex2lyx later.

Works fine, thanks.

-- 
Jean-Pierre




Re: tex2lyx: round trip on a beamer presentation

2005-06-30 Thread Georg Baum
Jean-Pierre Chrétien wrote:

> 
>> This works, but I get all frames in ERT, not exactly what expected.

The reason is the "translate" argument:

\foo{translate}

in syntax.default means that the argument of foo is normal LaTeX code that
gets translated into LyX constructs.

\foo{}

means that the argument of \foo may contain special things that can't be
translated to LyX in general.

>> In will test your patch on tex2lyx later.
> 
> Works fine, thanks.

Because I used the translate argument.


Georg



Re: tex2lyx: round trip on a beamer presentation

2005-06-30 Thread Jean-Pierre Chrétien

> 
> Because I used the translate argument.

OK, I understood also that I could copy the patch
in a local syntax.personal file and call it
with tex2lyx -s syntax.personal foo.tex >foo.lyx

I know that the goal of tex2lyx is to produce error-free
lyx code, but would this local syntax file allow to tell
tex2lyx to translate e.g.
\frame[plain]{
by
\layout BeginPlainFrame
and
}\frame{
by 
layout BeginFrame

As this would be documentclass dependent, I guess not...

-- 
Jean-Pierre







tex2lyx: round trip on a beamer presentation

2005-06-29 Thread Jean-Pierre Chrétien
Hello developers,

I use lyx for technical reports for several years (with great success
and pleasure, thanks to you), but currently I still use Xemacs/pdflatex
for beamer presentations.

Here a few remarks after a round trip when trying to turn a foo.tex
file written in beamer class into foo.lyx:
 one is about the optional arg to the \frame command
\frame[plain]{\titlepage} - \frame{[}plain{]}{titlepage}
 The others all happen when closing a frame:
 \end{itemize}   \end{columns}} % end frame 
\end{columns}  -  
} % end frame\end{itemize}

\column{0.45\textwidth}
\end{columns}  -   \column{0.45\textwidth\end{columns}}}
}

In fact, the \column command (and the } closing the frame)
belong to the preceding environment in the lyx code, e.g. layout Itemize
remains open as no layout Standard appears before the ERT inset.
layout Itemize
[...]
\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
end{columns}
\end_inset 

It seems located inside the ERT, where it has no effect I guess.

Sorry if this has been reported, is bugzilla appropriate for tex2lyx ?
I can downsize this to a minimal two-slide example if needed.

HTH

-- 
Jean-Pierre





tex2lyx: round trip on a beamer presentation

2005-06-29 Thread Jean-Pierre Chrétien
Hello developers,

I use lyx for technical reports for several years (with great success
and pleasure, thanks to you), but currently I still use Xemacs/pdflatex
for beamer presentations.

Here a few remarks after a round trip when trying to turn a foo.tex
file written in beamer class into foo.lyx:
 one is about the optional arg to the \frame command
\frame[plain]{\titlepage} -> \frame{[}plain{]}{titlepage}
 The others all happen when closing a frame:
 \end{itemize}   \end{columns}} % end frame 
\end{columns}  ->  
} % end frame\end{itemize}

\column{0.45\textwidth}
\end{columns}  ->   \column{0.45\textwidth\end{columns}}}
}

In fact, the \column command (and the } closing the frame)
belong to the preceding environment in the lyx code, e.g. layout Itemize
remains open as no layout Standard appears before the ERT inset.
layout Itemize
[...]
\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
end{columns}
\end_inset 

It seems located inside the ERT, where it has no effect I guess.

Sorry if this has been reported, is bugzilla appropriate for tex2lyx ?
I can downsize this to a minimal two-slide example if needed.

HTH

-- 
Jean-Pierre