On 2012-01-05, Rainer M Krug wrote:

> On 05/01/12 16:12, Jürgen Spitzmüller wrote:
>> Rainer M Krug wrote:
>>> One more question: how can I deal with a function which requires
>>> two paramerer, e.g. \textattachfile{FILENAME.EXT}{THE TEXT OF THE
>>> LINK} in a module? Is there anywhere an example on how an inset
>>> with two parametern looks?

>> In Paragraphy styles (not in layouts I think), you can specify
>> RequiredArgs. See Customization.lyx.

> I'll do so - thanks.


>> A workaround in layouts is to simply insert }{ as a separator. This
>> is a bad hack, though.

> Ugly hack - but an option.

Another one is an auxiliary command that is defined by a second style.
See dinbrief.layout for an example:


# dinbrief's \phone has 2 args, area and number. We define an empty
# command that can be set by the Area_Code style
Preamble
        \newcommand{\areacode}{}
EndPreamble

Style "Area code"
        CopyStyle       DinBrief
        LabelString     "Area Code:"
        LatexName       "renewcommand{\areacode}"
End

Style Telephone
        CopyStyle       DinBrief
        LabelString     "Telephone:"
        LatexName       phone
        LatexParam      {\areacode}
End

Günter

Reply via email to