# How do I create a custom layout module in LyX for a special itemized list?

How do I create a custom layout module in LyX for a special itemized list?

    \newenvironment{goalbox}[1][\unskip]
{\begin{goalboxT}[#1]\begin{eBox}\ \begin{enumerate}}
{\end{enumerate}\end{eBox}\end{goalboxT}}

\begin{goalbox}[Overview over my goals]
\item Get things done...
\item Get more things done...
\item Get even more things done...
\end{goalbox}


I would like to create a Lyx environment which allows me to

1. Enter the optional argument (Overview over my goals)
2. Use enumerate style

Ideally, I would like to have a different background color.

Any help would be highly appreciated!

• Welcome to TeX SX! Could you give more details or example, and an example code you've tried? – Bernard Dec 29 '18 at 12:38
• I would be simply happy if anyone could point me to an example? – Jenny Reininger Dec 29 '18 at 12:41
• Iwill be hard if you don post any precise specifications. Ypu can take a look at what can be done with the enumitem package. – Bernard Dec 29 '18 at 12:43
• Ok, I will add an example to make it fully clear... – Jenny Reininger Dec 29 '18 at 13:20
• I moved from Lyx to true latex editors, among other reasons, because I was to lazy to read the chapter 5 of "Customizing LyX: Features for the Advanced User" (menu Help > Customization) but presumably should contain what you need, at least to show here your wrong try (that someone could fix more easily that starting from scratch). – Fran Dec 30 '18 at 17:30

OK, here is the best answer to my own question that I could come up with:

Format 66

Input stdlyxlist.inc

Style Goals
LatexName     "goalbox"
LatexType           Environment

Margin        First_Dynamic
Align             Left

LabelType     Static
LabelString   "Goals of current chapter:"

EndLabelType  Static
EndLabelString      "End Goals"

Font
Color           blue
EndFont
LabelFont
Color       blue
Series      bold
EndFont

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

AutoNests
Itemize, Enumerate, Description
EndAutoNests

Preamble
\newenvironment{goalbox}[1][\unskip]
{\begin{goalboxT}[#1]\begin{eBox}\ \begin{enumerate}}
{\end{enumerate}\end{eBox}\end{goalboxT}}
EndPreamble

BottomSep        1
End


I hope it helps someone else as well.