Re: How to avoid breaking an item of enumerate?

2017-06-27 Thread Guenter Milde
On 2017-06-25, Paul Smith wrote:
...

> How to automatically avoid breaking the page in the middle of the
> inner items? For instance:

> Page 1

> 1. blablabla
>a) blablabla

> Page 2

>b) blablabla
> 2. blablabla
>a) blablabla
>b) blablabla

> In this example, the page break should be like the following:

> Page 1

> 1. blablabla
>a) blablabla
>b) blablabla

> Page 2

> 2. blablabla
>a) blablabla
>b) blablabla

> Thanks in advance,

It works here when I include the second sub-list in a minipage
(Insert>Box>Minipage).

Günter



#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass scrartcl
\use_default_options false
\maintain_unincluded_children false
\language ngerman
\language_package default
\inputencoding utf8
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "lmss" "default"
\font_typewriter "txtt" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref true
\pdf_bookmarks false
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder true
\pdf_colorlinks true
\pdf_backref section
\pdf_pdfusetitle true
\papersize a4paper
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\index Stichwortverzeichnis
\shortcut idx
\color #008000
\end_index
\topmargin 11.5cm
\bottommargin 15cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language german
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Enumerate
foo
\end_layout

\begin_deeper
\begin_layout Enumerate
bar
\end_layout

\begin_layout Enumerate
baf
\end_layout

\end_deeper
\begin_layout Enumerate
blallas
\begin_inset Box Frameless
position "t"
hor_pos "c"
has_inner_box 1
inner_pos "t"
use_parbox 0
use_makebox 0
width "100col%"
special "none"
height "1in"
height_special "totalheight"
thickness "0.4pt"
separation "3pt"
shadowsize "4pt"
framecolor "black"
backgroundcolor "none"
status open

\begin_layout Enumerate
bar
\end_layout

\begin_layout Enumerate
baf
\end_layout

\end_inset


\end_layout

\begin_layout Enumerate
blallas
\end_layout

\begin_deeper
\begin_layout Enumerate
bar
\end_layout

\begin_layout Enumerate
baf
\end_layout

\end_deeper
\end_body
\end_document




Re: How to avoid breaking an item of enumerate?

2017-06-26 Thread Paul Smith
On Sun, Jun 25, 2017 at 8:43 PM, Paul A. Rubin  wrote:
> On 06/25/2017 03:25 PM, Paul Smith wrote:
>>
>> On Sun, Jun 25, 2017 at 7:09 PM, Paul A. Rubin 
>> wrote:
>>>
>>> You can manually force page breaks (after the document is "finalized") by
>>> inserting formatting instructions. See section 3.5.5 of the LyX User
>>> Guide.
>>> You might also try the enumitem module (see section 3.6 of the PDF
>>> documentation for the enumitem package), but I've struggled to get that
>>> to
>>> work.
>>
>> I am looking for a simple and automatic way. But thanks, Paul!
>>
>> Paul
>
> Fully automatic (not to mention simple) may not be feasible. What if you
> have a zillion subitems under one main item (or a few really long subitems)?
> Theoretically, you could put LaTeX in a position where your subitem list
> exceeds a page length but it's not allowed to break up the list. So, while
> I'm not a LaTeX guru, my guess is that the best you'll be able to do with an
> "automatic" approach is to encourage, rather than force, LaTeX to break
> after a sublist rather than during (or at the start) of one.
>
> I believe that's what the penalty options in the enumitem package are
> intended to do, and I believe that you can set global values for those
> penalties. So, if I'm right, you should just need to make two tweaks to the
> document. Add the enumitem module in the document modules list, and add a
> line of LaTeX code in the preamble setting your penalties. IF I'm right (and
> IF you can get it to work).

Thanks again, Paul. I have tried playing with

midpenalty

but with no success. Other people have reported the same on several
forums on the Internet.

Anyway, I can resort to the manual way! :-)

Paul


Re: How to avoid breaking an item of enumerate?

2017-06-25 Thread Paul A. Rubin

On 06/25/2017 03:25 PM, Paul Smith wrote:

On Sun, Jun 25, 2017 at 7:09 PM, Paul A. Rubin  wrote:

You can manually force page breaks (after the document is "finalized") by
inserting formatting instructions. See section 3.5.5 of the LyX User Guide.
You might also try the enumitem module (see section 3.6 of the PDF
documentation for the enumitem package), but I've struggled to get that to
work.

I am looking for a simple and automatic way. But thanks, Paul!

Paul
Fully automatic (not to mention simple) may not be feasible. What if you 
have a zillion subitems under one main item (or a few really long 
subitems)? Theoretically, you could put LaTeX in a position where your 
subitem list exceeds a page length but it's not allowed to break up the 
list. So, while I'm not a LaTeX guru, my guess is that the best you'll 
be able to do with an "automatic" approach is to encourage, rather than 
force, LaTeX to break after a sublist rather than during (or at the 
start) of one.


I believe that's what the penalty options in the enumitem package are 
intended to do, and I believe that you can set global values for those 
penalties. So, if I'm right, you should just need to make two tweaks to 
the document. Add the enumitem module in the document modules list, and 
add a line of LaTeX code in the preamble setting your penalties. IF I'm 
right (and IF you can get it to work).


Good luck with it,
Paul



Re: How to avoid breaking an item of enumerate?

2017-06-25 Thread Paul Smith
On Sun, Jun 25, 2017 at 7:09 PM, Paul A. Rubin  wrote:
>>
>> Dear All,
>>
>> Suppose one has the following:
>>
>> 1. blablabla
>> a) blablabla
>> b) blablabla
>> 2. blablabla
>> a) blablabla
>> b) blablabla
>>
>> How to automatically avoid breaking the page in the middle of the
>> inner items? For instance:
>>
>> Page 1
>>
>> 1. blablabla
>> a) blablabla
>>
>> Page 2
>>
>> b) blablabla
>> 2. blablabla
>> a) blablabla
>> b) blablabla
>>
>> In this example, the page break should be like the following:
>>
>> Page 1
>>
>> 1. blablabla
>> a) blablabla
>> b) blablabla
>>
>> Page 2
>>
>> 2. blablabla
>> a) blablabla
>> b) blablabla
>>
>> Thanks in advance,
>>
>> Paul
>
> You can manually force page breaks (after the document is "finalized") by
> inserting formatting instructions. See section 3.5.5 of the LyX User Guide.
> You might also try the enumitem module (see section 3.6 of the PDF
> documentation for the enumitem package), but I've struggled to get that to
> work.

I am looking for a simple and automatic way. But thanks, Paul!

Paul


Re: How to avoid breaking an item of enumerate?

2017-06-25 Thread Paul A. Rubin

On 06/25/2017 06:36 AM, Paul Smith wrote:

Dear All,

Suppose one has the following:

1. blablabla
a) blablabla
b) blablabla
2. blablabla
a) blablabla
b) blablabla

How to automatically avoid breaking the page in the middle of the
inner items? For instance:

Page 1

1. blablabla
a) blablabla

Page 2

b) blablabla
2. blablabla
a) blablabla
b) blablabla

In this example, the page break should be like the following:

Page 1

1. blablabla
a) blablabla
b) blablabla

Page 2

2. blablabla
a) blablabla
b) blablabla

Thanks in advance,

Paul
You can manually force page breaks (after the document is "finalized") 
by inserting formatting instructions. See section 3.5.5 of the LyX User 
Guide. You might also try the enumitem module (see section 3.6 of the 
PDF documentation for the enumitem package), but I've struggled to get 
that to work.


Paul (the original one)