On 06/04/2010 05:50 PM, rgh...@lyx.org wrote:
Author: rgheck
Date: Fri Jun  4 23:50:08 2010
New Revision: 34591
URL: http://www.lyx.org/trac/changeset/34591

Log:
Introduce a new "RequiredArgs" tag for layouts. This functions much as
the OptionalArgs tag does and is implemented by the now misnamed
InsetOptArgs, except that its content gets wrapped in "{}" rather than
"[]". Required arguments do not actually have to be provided, but they
are always output.

This will allow e.g. beamer's Block environment to be implemented
without ERT.

Users of Beamer will know what this means: In a Block environment, you have to enter the first argument as ERT, whereas this will allow you to enter it in a Short Title environment if we just add:
    RequiredArgs 1
to the Block style declaration in Beamer.

Unfortunately, doing so breaks old Beamer files, because RequiredArgs are output as empty arguments, {}, if they are not given. So you end up with:
    \begin{block}{}
        {This was ERT}Here is the content of the block
    \end{block}
Any ideas? One I had, though I don't know if it will work, is to do a dummy format change and use lyx2lyx to convert beamer files to the "new format", so something like:

\begin_layout Block
\begin_inset ERT
status collapsed

\begin_layout Plain Layout

{Crazy Thesis}
\end_layout

\end_inset

If reference is a binary relation between uttered expressions and things,
 then there is no such thing as reference.

\end_layout

would become:

\begin_layout Block
\begin_inset OptArg
status collapsed

\begin_layout Plain Layout

Crazy Thesis
\end_layout

\end_inset

If reference is a binary relation between uttered expressions and things,
 then there is no such thing as reference.

\end_layout

It would be fairly easy to write the lyx2lyx to do this.

The only worry is that someone might have a customized version of beamer.layout, and then these changes would break their file. Still, I think people who've customized layouts can deal with this sort of problem, and a note could be added to the release notes.

Thoughts?

Richard





Reply via email to