Dear LyX-Developers,

So, after working on the Side Caption style, I got excited and thought that I 
would try and make an "epigraph" style for memoir and my custom class.

The epigraph command allows the enterprising author to add a quotation to their 
document prior to the start of the chapter (see page 249 of the memoir manual). 
It takes arguments:

\epigraph{text}{source}

Here is my layout definition that would enable this for the memoir class:

Style Epigraph
        Category                                Special_Commands
        Margin                                  Static
        LatexType                               command
        LatexName                               lyxepigraph
        RequiredArgs                            1
        NextNoIndent                            1
        LeftMargin                              MMM
        RightMargin                             MMM
        TopSep                                  0.5
        ParSep                                  0.5
        BottomSep                               0.5
        Align                                   Block
        AlignPossible                   Block, Left, Right, Center
        LabelType                               No_Label
        HTMLTag                                 epigraph
        HTMLItem                                p
        Font
                Family                          Roman
                Shape                           Italic
        EndFont
        Preamble
                \newcommand{\lyxepigraph}[2]{\epigraph{#2}{#1}}
        End Preamble
End

The preamble line is necessary because LyX places required arguments added 
through the "opt" inset before paragraph text. The memoir epigraph command 
takes first the paragraph text and then the source.

Like in the case of the last example, is there a way to create a custom "opt" 
inset that could have "Epigraph Source" for the label and could be added from 
"Insert > Custom > Epgraph Source". I wasn't able to find a readily obvious 
answer.

Cheers,

Rob

Reply via email to