# Passing arguments to an environment in Lyx modules?

I have created a LyX module which generates an environment but has one necessary parameter Format 66

Style Goals
Category            "Goal Box"
LatexName           "goalbox"
LatexType           Environment

LabelType Above
Margin Static
LabelString "Goals of current chapter:"
LabelFont
Color blue
Series bold
EndFont

AutoNests
Itemize, Enumerate, Description
EndAutoNests

Preamble
\theoremstyle{ocrenumbox}
\newtheorem*{goalboxT}{Goals of Chapter~\thechapter}
\newenvironment{goalbox}[1][\unskip]{\begin{goalboxT}[#1]\begin{eBox}\ \begin{enumerate}}{\end{enumerate}\end{eBox}\end{goalboxT}}
EndPreamble
End

ModifyStyle Goals
Argument 1
LabelString   "Big goal"
Tooltip       "No-Optional Big Goal"
EndArgument
End


which allows me to do

which is great. But it shows on screen the somewhat less pleasant variant

but I would like it to show it like

  KeepEmpty 1
Argument 1
LabelString " "
Tooltip "Specify the big picture goal"
Mandatory 1
Decoration conglomerate
AutoInsert 1
EndArgument


but that requires changing to

LabelType Static
Margin Dynamic


which yields the wrong margins in LyX on screen

and ignore the argument to the environment the

Does any of you know how to fix these issue? Specifically:

1. How do I make sure that this argument gets passed along to LaTeX?
2. How can I align all following lines on screen in LyX such that it looks like in the first screenshot?

If this forum is not right for such questions, which is?

• This forum is acceptable to ask any LyX question here (see, e.g., tex.stackexchange.com/help/on-topic). However, there are only a few experienced users answering LyX questions here. If you don't get help, I suggest you send an email to the lyx-users email list. As always, you should cross-reference your questions if you post in multiple places. – scottkosty Dec 30 '18 at 20:47

Mandatory   0

Margin      First_Dynamic