Re: [NTG-context] preventing page break

2019-07-19 Thread Henning Hraban Ramm

Zitat von Floris van Manen :


Hello List,

What is the preferred way in context to prevent a page break happening
between the heading(s) of a section and, for instance, the first 3 lines
of the following paragraph?

\section(one)
\subsection(one two}
%--- no page break here
One two three for ...
One two three for ...
One two three for ...
%- from here page breaks allowed


You can use \testpage{#} to tell ConTeXt there should be at least #  
lines following; I often use this with \setuphead.




Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] preventing page break

2019-07-10 Thread Floris van Manen
Hello List,

What is the preferred way in context to prevent a page break happening
between the heading(s) of a section and, for instance, the first 3 lines
of the following paragraph?

\section(one)
\subsection(one two}
%--- no page break here
One two three for ...
One two three for ...
One two three for ...
%- from here page breaks allowed




Thanks
.Floris


pEpkey.asc
Description: application/pgp-keys
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Preventing page break in register between reference and page number

2012-11-10 Thread Wolfgang Schuster

Am 09.11.2012 um 13:43 schrieb H. Özoguz :

> I don't find this macro in
> 
> strc-reg.mkiv
> 
> I am using
> 
> current version: 2012.05.30 11:26
> 
> What do I have to change?

You need the beta version but before you do this make a copy of your current 
version.

Even then don’t try to modify the macro in the file itself because the next 
update
changes this back to the old definition with the next update and you can never
say how long this would work because it’s a internal macro which could 
change/disappear.

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Preventing page break in register between reference and page number

2012-11-09 Thread luigi scarso
On Fri, Nov 9, 2012 at 1:43 PM, "H. Özoguz"  wrote:

> I don't find this macro in
>
> strc-reg.mkiv
>
> I am using
>
> current version: 2012.05.30 11:26
>
> What do I have to change?
>
> Grüße
> Huseyin
>
> strc-reg.mkiv
>
> update to the new release is an option ?

-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Preventing page break in register between reference and page number

2012-11-09 Thread H. Özoguz

Am 09.11.2012 11:05, schrieb Wolfgang Schuster:

Am 09.11.2012 um 10:19 schrieb Hans Hagen :


On 11/9/2012 9:08 AM, "H. Özoguz" wrote:

Hello there,

I am relatively new to ConTeXt, now typing a small book in it. I have a
problem with the register (index). This is an example:

[…]

|The page numer of the reference "Long Long Long" is set to the next page. How 
to prevent this?
Maybe the reference "Long Long Long" could break into two lnes or a rule like 
that?

play with

  \index{Long Long Long}blub

and

  blub\index{Long Long Long}

an index entry (currently) inserts a node in the list and that one should be 
bound to the word

The problem is not the \index command but the text in the register, as you can
see in the example below the text and the page number are in separate columns
(or in the long example on separate pages).


\setuppapersize[A6]

\starttext

\index{Too long entry}Long index entry.

\blank

\placeindex

\stoptext


This is caused by this macro in strc-reg.mkiv where you insert only a normal 
skip
between the the text and page number, changing \hskip to \nobreak\hskip moves
at least a part of the last word in the entry to the next column in the example 
above.

\unexpanded\def\registerpageseparator% todo: , configurable
   {\ifconditional\c_strc_registers_page_done
  \registerpageseparatorsymbol
\else
  \hskip\d_strc_registers_distance\relax
  \settrue\c_strc_registers_page_done
\fi}


Wolfgang

I don't find this macro in

strc-reg.mkiv

I am using

current version: 2012.05.30 11:26

What do I have to change?

Grüße
Huseyin

strc-reg.mkiv

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Preventing page break in register between reference and page number

2012-11-09 Thread Wolfgang Schuster

Am 09.11.2012 um 10:19 schrieb Hans Hagen :

> On 11/9/2012 9:08 AM, "H. Özoguz" wrote:
>> Hello there,
>> 
>> I am relatively new to ConTeXt, now typing a small book in it. I have a
>> problem with the register (index). This is an example:
>> 
>> […]
>> 
>> |The page numer of the reference "Long Long Long" is set to the next page. 
>> How to prevent this?
>> Maybe the reference "Long Long Long" could break into two lnes or a rule 
>> like that?
> 
> play with
> 
>  \index{Long Long Long}blub
> 
> and
> 
>  blub\index{Long Long Long}
> 
> an index entry (currently) inserts a node in the list and that one should be 
> bound to the word

The problem is not the \index command but the text in the register, as you can
see in the example below the text and the page number are in separate columns
(or in the long example on separate pages).


\setuppapersize[A6]

\starttext 

\index{Too long entry}Long index entry.

\blank

\placeindex

\stoptext


This is caused by this macro in strc-reg.mkiv where you insert only a normal 
skip
between the the text and page number, changing \hskip to \nobreak\hskip moves
at least a part of the last word in the entry to the next column in the example 
above.

\unexpanded\def\registerpageseparator% todo: , configurable
  {\ifconditional\c_strc_registers_page_done
 \registerpageseparatorsymbol
   \else
 \hskip\d_strc_registers_distance\relax
 \settrue\c_strc_registers_page_done
   \fi}


Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Preventing page break in register between reference and page number

2012-11-09 Thread Hans Hagen

On 11/9/2012 9:08 AM, "H. Özoguz" wrote:

Hello there,

I am relatively new to ConTeXt, now typing a small book in it. I have a
problem with the register (index). This is an example:

|\definepapersize[MyBook][A6]
\setuppapersize[MyBook][A6]  % Prints on paper the size of MyBook

\starttext
\index{A}  blub
\index{B}  blub
\index{C}  blub
\index{D}  blub
\index{E}  blub
\index{F}  blub
\index{G}  blub
\index{H}  blub
\index{I}  blub
\index{J}  blub
\index{K}  blub
\index{Long Long Long}  blub
\index{M}  blub
\index{N}  blub

\completeindex
\stoptext

|The page numer of the reference "Long Long Long" is set to the next page. How 
to prevent this?
Maybe the reference "Long Long Long" could break into two lnes or a rule like 
that?


play with

  \index{Long Long Long}blub

and

  blub\index{Long Long Long}

an index entry (currently) inserts a node in the list and that one 
should be bound to the word


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Preventing page break in register between reference and page number

2012-11-09 Thread H. Özoguz

Hello there,

I am relatively new to ConTeXt, now typing a small book in it. I have a 
problem with the register (index). This is an example:


|\definepapersize[MyBook][A6]
\setuppapersize[MyBook][A6]  % Prints on paper the size of MyBook

\starttext  
\index{A}  blub

\index{B}  blub
\index{C}  blub
\index{D}  blub
\index{E}  blub
\index{F}  blub
\index{G}  blub
\index{H}  blub
\index{I}  blub
\index{J}  blub
\index{K}  blub
\index{Long Long Long}  blub
\index{M}  blub
\index{N}  blub

\completeindex
\stoptext

|The page numer of the reference "Long Long Long" is set to the next page. How 
to prevent this?
Maybe the reference "Long Long Long" could break into two lnes or a rule like 
that?
 





___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Preventing page break in a paragraph

2007-11-27 Thread Maurí­cio
 >>> How do I prevent a paragraph to be broken
 >>> between pages (or columns)?

 >> Add a \vbox{} around the paragraph. (...)

 > a vbox messes up the spacing ...
 >
 > \starttext
 >
 > \input tufte \blank \input tufte \blank
 >
 > \setpenalties\widowpenalties{100}\maxdimen \dorecurse{3}{\input tufte}
 >
 > \blank \input tufte \blank \input tufte
 >
 > \stoptext
 >

Is it possible to do that with verbatim text? Like
\startC (a lot of text) \stopC?

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Preventing page break in a paragraph

2007-11-25 Thread Hans Hagen
Aditya Mahajan wrote:
> On Sun, 25 Nov 2007, Maurí­cio wrote:
> 
>> Hi,
>>
>> How do I prevent a paragraph to be broken between
>> pages (or columns)?
> 
> Add a \vbox{} around the paragraph. You can also use 
> \framed[align=normal], or \start-stop framed, which are fancier vboxes 
> and provide more control.

a vbox messes up the spacing ...


\starttext

\input tufte \blank \input tufte \blank

\setpenalties\widowpenalties{100}\maxdimen \dorecurse{3}{\input tufte }

\blank \input tufte \blank \input tufte

\stoptext


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Preventing page break in a paragraph

2007-11-25 Thread Maurí­cio
Aditya Mahajan escreveu:
> On Sun, 25 Nov 2007, Maurí­cio wrote:
> 
>> Hi,
>>
>> How do I prevent a paragraph to be broken between
>> pages (or columns)?
> 
> Add a \vbox{} around the paragraph. You can also use 
> \framed[align=normal], or \start-stop framed, which are fancier vboxes 
> and provide more control.
> 
> Aditya
> 


Are those supposed to work with verbatim code
(\startC etc.) inside?

Maurício

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Preventing page break in a paragraph

2007-11-24 Thread Aditya Mahajan

On Sun, 25 Nov 2007, Maurí­cio wrote:


Hi,

How do I prevent a paragraph to be broken between
pages (or columns)?


Add a \vbox{} around the paragraph. You can also use 
\framed[align=normal], or \start-stop framed, which are fancier vboxes and 
provide more control.


Aditya___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Preventing page break in a paragraph

2007-11-24 Thread Maurí­cio
Hi,

How do I prevent a paragraph to be broken between
pages (or columns)?

Thanks,
Maurício

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] preventing page break in verses

2007-06-26 Thread Hans Hagen
Wolfgang Schuster wrote:
> 2007/6/26, Vyatcheslav Yatskovsky <[EMAIL PROTECTED]>:
>> Hello,
>>
>> I have a simple question about verses. How can I prevent a verse to be 
>> breaked across pages?
>>
>> Now I use:
>>
>> \definestartstop[verse][before=\startlines,
>> after=\stoplines]
>>
>> --
>> Best,
>>  Vyatcheslav
> 
> \definestartstop
>   [verse]
>   [before=\vbox\bgroup\startlines,
>%before={\page[preference]\vbox\bgroup\startlines},
>after=\stoplines\egroup]

\testpage[4]


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] preventing page break in verses

2007-06-25 Thread Wolfgang Schuster
2007/6/26, Vyatcheslav Yatskovsky <[EMAIL PROTECTED]>:
> Hello,
>
> I have a simple question about verses. How can I prevent a verse to be 
> breaked across pages?
>
> Now I use:
>
> \definestartstop[verse][before=\startlines,
> after=\stoplines]
>
> --
> Best,
>  Vyatcheslav

\definestartstop
  [verse]
  [before=\vbox\bgroup\startlines,
   %before={\page[preference]\vbox\bgroup\startlines},
   after=\stoplines\egroup]

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] preventing page break in verses

2007-06-25 Thread Aditya Mahajan
On Tue, 26 Jun 2007, Vyatcheslav Yatskovsky wrote:

> Hello,
>
> I have a simple question about verses. How can I prevent a verse to be 
> breaked across pages?
>
> Now I use:
>
> \definestartstop[verse][before=\startlines,
> after=\stoplines]

My first reaction was to use

\defineframedtext[verse][width=broad,frame=off,before=\startlines,after=\stoplines]

but for some very strange reason this does not work. So, try the 
following:

\defineframedtext[verseframe][width=broad,frame=off]

\definestartstop[verse]
  [before={\startlines\startverseframe},
after={\stopverseframe\stoplines}]


Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] preventing page break in verses

2007-06-25 Thread Vyatcheslav Yatskovsky
Hello,

I have a simple question about verses. How can I prevent a verse to be breaked 
across pages?

Now I use:

\definestartstop[verse][before=\startlines,
after=\stoplines]  

-- 
Best,
 Vyatcheslav  

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Preventing page break

2007-01-24 Thread Elliot Clifton
Hi,

Thanks for the replies. You confirmed what I suspected -- that by
default there are no auto page-breaks after most sections. I have no
idea how I got into this mess but I think I'll start over with a fresh
setup. I guess, it's all part of the learning process.

Elliot

Date: Wed, 24 Jan 2007 20:52:51 +0100
From: Willi Egger <[EMAIL PROTECTED]>

> Hi Elliot,
>
> humble, I agree with Mike's statement.
> In general the \setuphead command is used to organize the behaviour of
> the section titles. By default only the \chapter and \part start on a
> right page in a doublesided layout.
> See also cont-enp.pdf (The manual) on page 148 (text elements) section
> 8.5 Alternative mechanisms.
>
>
> Willi
>
> Mike Bird wrote:
> > On Wednesday 24 January 2007 08:21, Elliot Clifton wrote:
> >
> >> Mike wrote:
> >>
> >>> Does "\setuphead[chapter][before={\page[yes]}]" do what you want?
> >>>
> >> No. I want to remove empty pages that are being auto generated at the
> >> end of a section.
> >>
> >
> > Hi Elliot,
> >
> > I think you'll need to post the relevant part of your setup, as
> > ConTeXt does not create empty pages after sections by default,
> > even in double-sided documents:
> >
> > \starttext
> > \setuppagenumbering[alternate=doublesided]
> > \section{A}
> > \section{B}
> > \stoptext
> >
> > --Mike Bird
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Preventing page break

2007-01-24 Thread Willi Egger
Hi Elliot,

humble, I agree with Mike's statement.
In general the \setuphead command is used to organize the behaviour of 
the section titles. By default only the \chapter and \part start on a 
right page in a doublesided layout.
See also cont-enp.pdf (The manual) on page 148 (text elements) section 
8.5 Alternative mechanisms.


Willi

Mike Bird wrote:
> On Wednesday 24 January 2007 08:21, Elliot Clifton wrote:
>   
>> Mike wrote:
>> 
>>> Does "\setuphead[chapter][before={\page[yes]}]" do what you want?
>>>   
>> No. I want to remove empty pages that are being auto generated at the
>> end of a section.
>> 
>
> Hi Elliot,
>
> I think you'll need to post the relevant part of your setup, as
> ConTeXt does not create empty pages after sections by default,
> even in double-sided documents:
>
> \starttext
> \setuppagenumbering[alternate=doublesided]
> \section{A}
> \section{B}
> \stoptext
>
> --Mike Bird
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>   
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Preventing page break

2007-01-24 Thread Mike Bird
On Wednesday 24 January 2007 08:21, Elliot Clifton wrote:
> Mike wrote:
> > Does "\setuphead[chapter][before={\page[yes]}]" do what you want?
>
> No. I want to remove empty pages that are being auto generated at the
> end of a section.

Hi Elliot,

I think you'll need to post the relevant part of your setup, as
ConTeXt does not create empty pages after sections by default,
even in double-sided documents:

\starttext
\setuppagenumbering[alternate=doublesided]
\section{A}
\section{B}
\stoptext

--Mike Bird
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Preventing page break

2007-01-24 Thread Elliot Clifton
Hi Mike

Thanks for the reply.

Mike wrote:

> Does "\setuphead[chapter][before={\page[yes]}]" do what you want?

No. I want to remove empty pages that are being auto generated at the
end of a section.

Elliot
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Preventing page break

2007-01-23 Thread Mike Bird
On Tuesday 23 January 2007 16:25, Elliot Clifton wrote:
> In my double sided layout how can  I stop ConTeXt from adding an empty
> page when a section ends.

Hi Elliot,

Does "\setuphead[chapter][before={\page[yes]}]" do what you want?

--Mike Bird
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Preventing page break

2007-01-23 Thread Elliot Clifton
Hi

In my double sided layout how can  I stop ConTeXt from adding an empty
page when a section ends.

Thanks,

Elliot
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context