1

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

Document screen shot

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

LyX Screenshot 1

but I would like it to show it like

LyX Screenshot 2

by adding (?)

  KeepEmpty 1
  Argument 1
    LabelString " "
    MenuString "Overarching Goal"
    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

enter image description here

and ignore the argument to the environment the

enter image description here

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?

  • 1
    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
1

The first problem can be fixed by

Mandatory   0

instead of 1 and the second problem by

Margin      First_Dynamic

Thanks for all help.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.