3

I use the "Numbered Examples (multiline)" environment in a LyX document (class : Book (Standard Class)). The text is not fully justified (it is not right justified) in the examples. Is there a way to modify the environment ? I would prefer to not define a new environment and change all my examples into this new environment and I would prefer not to type ERT[\justify] in all the examples.

  • Welcome to TeX - LaTeX! You do not need to add your name or thanks to the question, your name is already associated with the question and thanks is expressed by upvoting and accepting answers – Andrew Swann Mar 11 '16 at 11:26
2

I had been looking for a few hours when I posted my question. I have just found out that one solution is to add the following in the preamble.

\usepackage{ragged2e}
    \let\oldexample\example
    \let\end\oldexample\endexample
    \renewenvironment{example}{\begin{oldexample} \justify}{\end{\oldexample}}

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.