Re: Enumerate inside other environment

2016-10-05 Thread Mario D
>
> Empty TeX code works, too. Either is a hack to make LyX think the first
> line is not empty, since otherwise it will delete it.
>
> If you do this a lot, you can do something like:
>
> Format 60
>
> Style Theorem*
> KeepEmpty 1
> End
>
> in Local Layout. This tells LyX to allow empty lines in unnumbered
> theorems. Then you do not have to do anything special.
>
>
I was asking because I thought I could be missing something but I see that
out of the box I can obtain these only with workarounds or new environment,
as you suggest.
Knowing that, it is fine for me to just insert something to fool lyx when I
need it, every now and then.


> Moreover, how can I produce the following?
>
> -
> Theorem.
>1. First statement.
>2. Second statement.
> -
>
> For this I couldn't find a workaround.
>
>
> Put a "protected space" on the first line. (Insert> Formatting> Protected
> Space) This makes there by something on that line, but it's invisible.
>
> Richard
>
>
Many thanks to both of you (you and Paul)


Re: Enumerate inside other environment

2016-10-04 Thread Richard Heck
On 10/04/2016 03:18 PM, Mario D wrote:
> I know how to nest environments so that I can use enumerate inside
> another environment in order to produce something looking like:
>
> -
> Theorem. The following are equivalent:
>1. First statement.
>2. Second statement.
> -
>
> My question is: how can I produce
>  
> -
> Theorem.   1. First statement.
>2. Second statement.
> -
>
> The only way//I could get it was to insert an empty note after the
> "Theorem", then newline, start the enumerate and finally nest it.
> Is there a "cleaner" way?

Empty TeX code works, too. Either is a hack to make LyX think the first
line is not empty, since otherwise it will delete it.

If you do this a lot, you can do something like:

Format 60

Style Theorem*
KeepEmpty 1
End

in Local Layout. This tells LyX to allow empty lines in unnumbered
theorems. Then you do not have to do anything special.

> Moreover, how can I produce the following?
>
> -
> Theorem.
>1. First statement.
>2. Second statement.
> -
>
> For this I couldn't find a workaround.

Put a "protected space" on the first line. (Insert> Formatting>
Protected Space) This makes there by something on that line, but it's
invisible.

Richard



Re: Enumerate inside other environment

2016-10-04 Thread Paul A. Rubin

On 10/04/2016 03:18 PM, Mario D wrote:
I know how to nest environments so that I can use enumerate inside 
another environment in order to produce something looking like:


-
Theorem. The following are equivalent:
   1. First statement.
   2. Second statement.
-

My question is: how can I produce

-
Theorem.   1. First statement.
   2. Second statement.
-

The only way//I could get it was to insert an empty note after the 
"Theorem", then newline, start the enumerate and finally nest it.

Is there a "cleaner" way?

I couldn't find anything relevant on lyx manuals.
Moreover, how can I produce the following?

-
Theorem.
   1. First statement.
   2. Second statement.
-

For this I couldn't find a workaround.

Thank you

Not that I'm endorsing either layout, but you can do the first by 
putting a frameless box in the Theorem environment and the second by 
putting a nonbreakable space in the theorem environment, hitting return, 
switching to enumeration and nesting.


I've attached a sample file.

Paul



theorems.lyx
Description: application/lyx


Enumerate inside other environment

2016-10-04 Thread Mario D
I know how to nest environments so that I can use enumerate inside another
environment in order to produce something looking like:

-
Theorem. The following are equivalent:
   1. First statement.
   2. Second statement.
-

My question is: how can I produce

-
Theorem.   1. First statement.
   2. Second statement.
-

The only way I could get it was to insert an empty note after the
"Theorem", then newline, start the enumerate and finally nest it.
Is there a "cleaner" way?

I couldn't find anything relevant on lyx manuals.
Moreover, how can I produce the following?

-
Theorem.
   1. First statement.
   2. Second statement.
-

For this I couldn't find a workaround.

Thank you