Hello,

We're going to recode the existing float support so that floats are
really insets (correct me if I'm wrong). Currently, we have a bunch of
hardcoded floats, like footnote, marginnote, table, wide table,
figure, wide figure, algorithms... And we will probably add others
(ERS killers, for example).

It occured to me that, since floats all share similar properties, they
could be defined in textclasses, so that adding new ones is easy. This
could be done with a FloatStyle...End construct similar to the
following:

FloatStyle Footnote
  LatexName     footnote
  LatexType     command
  AllowCaption  0
  LabelString   foot
# these are bogus values, but probably make sense
  LabelSep              xxx
  ParSkip               0.4
  TopSep                1.3
  BottomSep             0.7
  ParSep                0.7
  Align                 Block
  AlignPossible         Block, Left

  Font
    Size        Small
  EndFont
End

FloatStyle Table
  LatexName     table
  LatexType     environment
  AllowCaption  1
  CaptionLabelString    Table
  LabelString   table
# these are bogus values, but probably make sense
  LabelSep              xxx
  ParSkip               0.4
  TopSep                1.3
  BottomSep             0.7
  ParSep                0.7
  Align                 Block
  AlignPossible         Block, Left
End

The list of floats would of course be separate from the list of
layouts. The values for font and skips would be default values, that
layouts inside of the floats could of course override. The only
problem I see is to make sure that we can generate the float submenu
correctly (with i18n, shortcuts, etc.).

I think something like this could simplify greatly the code. Opinions?

JMarc

Reply via email to