Le 12/04/2016 21:37, Guenter Milde a écrit :
Dear Guillaume,

On 2016-04-12, Guillaume Munch wrote:

I do not really like the current way of doing beamer presentations with
LyX so I have written an alternate layout that relies on flex insets for
frames and columns, which I find more convenient. Please anybody tell me
if they are interested or curious, as I might make the effort of
packaging it.

I've started a similar approach (based on experience with my
seminar.layout), so yes, I am interested in sharing.



Here's beamer-flex.layout, beamer-flex.module and an example document
(the original conference template).

The goal is to replace the various Frame, Block and Columns styles with
corresponding flex insets all the while inheriting the original layout
for all the rest. These are now found in Insert > Custom insets. I have
already used it successfully to prepare a few talks and found that flex
insets let me focus on the contents.

In addition, the module can be used on top of the original beamer.layout
to have both methods at the same time, for instance for converting a
beamer presentation into the new layout.

I have additional tweaks such as making the frame title automatically
match the subsection title, but I did not include it in the attached.

I am interested in any feedback that you may have.
#% Do not delete the line below; configure depends on this
#  
\DeclareLaTeXClass[beamer,amssymb.sty,hyperref.sty,pgf.sty,xcolor.sty,xxcolor.sty]{Beamer
 (flex insets)}
#  \DeclareCategory{Presentations}
# Author: Guillaume Munch <[email protected]>
# Modifies beamer.layout by Till Tantau, Jürgen Spitzmüller, Uwe Stöhr, Richard 
Heck, Martin Vermeer and probably others.
# To convert a file from beamer.layout, see beamer-flex.module. 


Format 60

Input beamer.layout

NoStyle Frame
NoStyle PlainFrame
NoStyle FragileFrame
NoStyle Columns
NoStyle ColumnsCenterAligned
NoStyle ColumnsTopAligned
NoStyle Block
NoStyle ExampleBlock
NoStyle AlertBlock

Input beamer-flex.inc
#\DeclareLyXModule{Beamer (flex)}
#DescriptionBegin
# Adds flex insets to replace the following styles: Frame, PlainFrame,
# FragileFrame, Columns, ColumnsTopAligned, ColumnsCenterAligned,
# Block, AlertBlock, ExampleBlock. This module can be used to convert
# a lyx document from the Beamer layout to the Beamer-flex layout
# (which must be done by hand).
#DescriptionEnd
#
# Author: Guillaume Munch <[email protected]>

Format 60

Input beamer-flex.inc
# Definition of flex insets for beamer-flex
# Author: Guillaume Munch <[email protected]>
# Based on beamer.layout by Till Tantau and others.

# This file is included by beamer-flex.layout and beamer-flex.module

Format 60

InsetLayout Flex:Frame
  LatexType        Environment
  LatexName        frame
  LabelString      "Frame"
  LyxType          custom
  Decoration       classic
  BgColor          white
  LabelFont
    Color          latex
    Family         Roman
    Size           Small
  EndFont
  MultiPar         true
  ResetsFont       true
  Argument 1
    LabelString     "Action"
    MenuString      "Overlay Specifications|v"
    Tooltip         "Overlay specifications for this frame"
    LeftDelim       <
    RightDelim      >
  EndArgument
  Argument 2
    LabelString     "Default Overlay Specifications"
    Tooltip         "Default overlay specifications within this frame"
    LeftDelim       [<
    RightDelim      >]
  EndArgument
  Argument 3
    MenuString      "Frame Options"
    LabelString     "Options"
    Tooltip         "Frame options (see beamer manual)"
  EndArgument
  Argument 4
    LabelString    "Frame Title"
    Tooltip        "Enter the frame title here"
    LeftDelim      {
    RightDelim     }
    Decoration     conglomerate
    Font
      Color        blue
      Size         largest
    EndFont
    AutoInsert     1
  EndArgument
End

InsetLayout Flex:Frame_(plain)
  CopyStyle Flex:Frame
  LabelString       "Frame (plain)"
  Argument 3
    MenuString      "Frame Options"
    LabelString     "Options"
    Tooltip         "Frame options (see beamer manual)"
    PresetArg       "plain"
  EndArgument
End

InsetLayout Flex:Frame_(fragile)
  CopyStyle Flex:Frame
  LabelString   "Frame (fragile)"
  Argument 3
    MenuString      "Frame Options"
    LabelString     "Options"
    Tooltip         "Frame options (see beamer manual)"
    PresetArg       "fragile"
  EndArgument
End

InsetLayout Flex:Columns
  LatexType        Environment
  LyxType          custom
  Decoration       classic
  BgColor          white
  LabelFont
    Color          latex
    Family         Roman
    Size           Small
  EndFont
  MultiPar         true
  ResetsFont       true
  LatexName        columns
  LabelString      "Columns"
  Argument 1
    LabelString    "Column Placement Options"
    Tooltip        "Column placement options (t, T, c, b)"
  EndArgument
End

# Remove "increase depth!" recommendation which is now bogus
Style Column
  LabelString      "Start column, width:"
  LeftMargin       "Start column, width:xx"
  PassThru         1
  Font
    Color          latex
    Family         typewriter
    Size           small
  EndFont
  KeepEmpty        1
End

InsetLayout Flex:Block
  LatexType        Environment
  LyxType          custom
  Decoration       classic
  BgColor          white
  LabelFont
    Color          latex
    Family         Roman
    Size           Small
  EndFont
  MultiPar         true
  ResetsFont       true
  LatexName        block
  LabelString      "Block"
  Argument 1
    LabelString    "Action"
    MenuString     "Action Specification|S"
    Tooltip        "Specify the overlay settings (see beamer manual)"
    LeftDelim      <
    RightDelim     >
  EndArgument
  Argument 2
    LabelString    "Block Title"
    Tooltip        "Enter the block title here"
    Mandatory      1
    Decoration     conglomerate
    Font
      Color        blue
      Size         large
    EndFont
    AutoInsert     1
  EndArgument
End

InsetLayout Flex:Example_Block
  CopyStyle        Flex:Block
  LatexName        exampleblock
  LabelString      "Example Block"
  Font
    Color          green
  EndFont
End

InsetLayout Flex:Alert_Block
  CopyStyle        Flex:Block
  LatexName        alertblock
  LabelString      "Alert Block"
  Font
    Color          red
  EndFont
End


Style Part
  NextNoIndent 0
End

Style Section
  NextNoIndent 0
End

Style Section*
  NextNoIndent 0
End

Style Subsection
  NextNoIndent 0
End

Style Subsection*
  NextNoIndent 0
End

Attachment: beamer-flex.lyx
Description: application/lyx

Reply via email to