如何在 LyX 中为特殊的逐项列表创建自定义布局模块?
\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}
我想创建一个 Lyx 环境,以便我能够
- 输入可选参数(我的目标概述)
- 使用枚举样式
理想情况下,我希望有不同的背景颜色。
任何帮助都将不胜感激!
答案1
好的,这是我能想到的针对我自己的问题的最佳答案:
Format 66
Input stdlyxlist.inc
Style Goals
Category "Personal Add-Ons"
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"
MenuString "Overarching 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
我希望它也能帮助其他人。