On 07/18/2015 10:34 PM, C. Fuhrman wrote:
I posted quite a detailed question on the tex stack exchange here:

The short version is that I'm using LyX 2.1.3 on Windows with the
Exam.cls and a layout file I've customized.

In the context of a \begin{questions} environment (defined in a Flex
Inset), I'd like to know if it's possible for LyX to automatically
repeat a certain style within. For example, it's intuitive within this
environment to repeat the Question style (which is a LatexType Command
that maps to \question[]{}). LyX always gives me 'Plain Layout' within
the inset to start. When I set it to Question, type the question and
press return, I get again a 'Plain Layout'. I would like Question to be
the "style for next paragraph" within this inset.

I can *almost* do this with an LatexType Item_Environment which gives me
Enumerated (\item) styles. However, I'd like to state which LyX style to
repeat within my custom environment.

The exam.cls is a great example of where this would be useful. There are
repeating elements within various nestable environments. For example:

questions, question
parts, part
subparts, subpart
subsubparts, subsubpart
choices, choice (or CorrectChoice)
checkboxes, choice (or CorrectChoice)

Having this feature in LyX would allow easy creation of exams. It's
already possible to nest the style in the inset, but a manual change
from 'Plain Layout' to the respective equivalent of \item is required.
Furthermore, if LyX set the style by default, it would simplify the
choice. For now, users need to know which Style goes inside which Inset
(legally for LaTeX, that is).

A similar question was asked some time ago here: http://lyx-

Any ideas if this is possible in LyX 2.1.3? If not, should I suggest it
as a feature for the future?

This isn't possible at the moment, but it's a reasonable request, and probably not that hard to implement.

The reason you get PlainLayout is because new paragraphs are being set in the default style, which is PlainLayout in your case. Basically, what one would need is a way of changing the default style on a per-layout basis. This would correspond to "Next Style" in Libre Office.


Reply via email to