I have an existing LaTeX style which defines a \solution command (printing a box that also contains a solution as text, if showSolution is set).

I now created a LyX Style for this:

Style Solution
    Category Exam
    LatexName solution
    LatexType Command

The LaTeX code of the solution should look like \solution{...}, which works so far. But for complex solutions, I need the command to contain other paragraph types, such as Enumerations. Usually you can nest paragraphs in Lyx by changing the Environment type and press Tab (e.g. a Verse in an Enumataion), but this approach does not work for my solution command. How do I fix it?

Further Detaisl: I use Lyx to generate LaTeX code which I copy paste into a bigger project, so changing the LaTeX solution command is no option here. Lyx has to generate Code like:

    \item Something
    \item On more thing

Your Answer

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

Browse other questions tagged or ask your own question.