ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Elevated text blocks
@ 2006-12-27 21:25 Gerhard Kugler
  2006-12-28 12:58 ` Wolfgang Schuster
  2006-12-28 16:48 ` Aditya Mahajan
  0 siblings, 2 replies; 8+ messages in thread
From: Gerhard Kugler @ 2006-12-27 21:25 UTC (permalink / raw)


Hi,

in the book which I'm translating there are many exercises which
should be elevated. The original sets grey bars at the beginning and
the end. My solutions tends to light grey background over the whole
text block. Partially the exercises exceed a page. If possible they
should kept as wholes.

What is the suitable logical isolation of these blocks in context?
Framedtexts? Textblocks?

Gerhard

-- 
Gerhard Kugler
Psychotherapeut
http://www.psychotherapie-kugler.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Elevated text blocks
  2006-12-27 21:25 Elevated text blocks Gerhard Kugler
@ 2006-12-28 12:58 ` Wolfgang Schuster
  2006-12-28 19:34   ` Gerhard Kugler
  2006-12-28 16:48 ` Aditya Mahajan
  1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2006-12-28 12:58 UTC (permalink / raw)


On Wed, 27 Dec 2006 22:25:38 +0100
Gerhard Kugler <praxis@psychotherapie-kugler.de> wrote:

> Hi,
> 
> in the book which I'm translating there are many exercises which
> should be elevated. The original sets grey bars at the beginning and
> the end. My solutions tends to light grey background over the whole
> text block. Partially the exercises exceed a page. If possible they
> should kept as wholes.
> 
> What is the suitable logical isolation of these blocks in context?
> Framedtexts? Textblocks?
> 
> Gerhard
> 
> -- 
> Gerhard Kugler
> Psychotherapeut
> http://www.psychotherapie-kugler.de

Hi Gerhard,

you can keep text togehther by putting them into a vbox and it will
move to the next page if it will not fit on the current page.

There are to many ways how you defined your example, you can find one
way below. The important things are saved into the before and after
commands in the defintion.

<example>
\defineenumeration
  [Example]
  [before=\null\vbox\bgroup,
   after=\egroup]

\starttext

\input knuth

\startExample
\dorecurse{30}{This is a example\crlf}
\stopExample

\input knuth

\stoptext
</example>

Wolfgang

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Elevated text blocks
  2006-12-27 21:25 Elevated text blocks Gerhard Kugler
  2006-12-28 12:58 ` Wolfgang Schuster
@ 2006-12-28 16:48 ` Aditya Mahajan
  2006-12-28 19:26   ` Gerhard Kugler
  1 sibling, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2006-12-28 16:48 UTC (permalink / raw)


On Wed, 27 Dec 2006, Gerhard Kugler wrote:

> Hi,
> 
> in the book which I'm translating there are many exercises which
> should be elevated. The original sets grey bars at the beginning and
> the end. My solutions tends to light grey background over the whole
> text block. Partially the exercises exceed a page. If possible they
> should kept as wholes.
> 
> What is the suitable logical isolation of these blocks in context?
> Framedtexts? Textblocks?

He Gerhard,

Can you be more specific on what is the desired behaviour, that is 
what do you mean by "if possible they should be kept as wholes" What 
do you want in the following border cases?

1. The current page is half full, and your exercise is half-page plus 
two lines. Should TeX leave the rest of the page empty and start a new 
page, or fill the current page with exercise and put two lines in the 
next page.

2. The same case as above, but the text is one and a half page long.

3. Or a more drastic case, when the current page has only two lines 
and the text block is exactly one page long. Should the text split or 
not.

4. Can you allow the text block to float, or should it occur where you 
place it, even if it means a lot of empty space on the page.

Basically, the difficulty is specifying how much blankspace on a page 
are you willing to accept, and under what conditions.

Aditya

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Elevated text blocks
  2006-12-28 16:48 ` Aditya Mahajan
@ 2006-12-28 19:26   ` Gerhard Kugler
  2006-12-28 20:03     ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Gerhard Kugler @ 2006-12-28 19:26 UTC (permalink / raw)


Hi Aditya,

thank you for your detailed answer.

The exercises are so much providing the structure of the book, that it
may be that I will choose the format (size) of the page considering
the solutions of your questions:

On Thu, Dec 28, 2006 at 11:48:06AM -0500, Aditya Mahajan wrote:
 
> 1. The current page is half full, and your exercise is half-page plus 
> two lines. Should TeX leave the rest of the page empty and start a new 
> page, or fill the current page with exercise and put two lines in the 
> next page.

rather the second option. But it would be suboptimal.

> 
> 2. The same case as above, but the text is one and a half page long.

In this case it would be clear, that the exercise begins instantly.

> 
> 3. Or a more drastic case, when the current page has only two lines 
> and the text block is exactly one page long. Should the text split or 
> not.

No.

> 
> 4. Can you allow the text block to float, or should it occur where you 
> place it, even if it means a lot of empty space on the page.

The text block must not float because it is part of the ongoing text.
In some chapters there is more text in the exercises than outside.

> 
> Basically, the difficulty is specifying how much blankspace on a page 
> are you willing to accept, and under what conditions.

Perhaps I should fill blank parts of pages with elements of pure
decoration. The English (American) original is shorter than the German
text. Sometimes I have the impression that the authors have made
content and appearance simultaneously. This is not reproducible in a
translation.


-- 
Gerhard Kugler
Psychotherapeut
http://www.psychotherapie-kugler.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Elevated text blocks
  2006-12-28 12:58 ` Wolfgang Schuster
@ 2006-12-28 19:34   ` Gerhard Kugler
  2006-12-29  9:12     ` Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Gerhard Kugler @ 2006-12-28 19:34 UTC (permalink / raw)


On Thu, Dec 28, 2006 at 01:58:02PM +0100, Wolfgang Schuster wrote:
 
> you can keep text togehther by putting them into a vbox and it will
> move to the next page if it will not fit on the current page.
> 

Thank you Wolfgang,

this will be an important possibility. Where is the best documentation
about vbox?

> There are to many ways how you defined your example, you can find one
> way below. The important things are saved into the before and after
> commands in the defintion.
> 
> <example>
> \defineenumeration

Why "enumeration"? The exercises are not numbered.

Gerhard

-- 
Gerhard Kugler
Psychotherapeut
http://www.psychotherapie-kugler.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Elevated text blocks
  2006-12-28 19:26   ` Gerhard Kugler
@ 2006-12-28 20:03     ` Aditya Mahajan
  2006-12-28 20:25       ` Gerhard Kugler
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2006-12-28 20:03 UTC (permalink / raw)


On Thu, 28 Dec 2006, Gerhard Kugler wrote:

> Hi Aditya,
> 
> thank you for your detailed answer.
> 
> The exercises are so much providing the structure of the book, that it
> may be that I will choose the format (size) of the page considering
> the solutions of your questions:

If choosing page size is an option, and there are only a few that are 
larger than a page, things may be much easier. Keep all of them in one 
page, and typeset. Note the ones that are larger than a page, and mark 
them using a differnt environment. That is, you decide which exercises 
should break and which should not.

> On Thu, Dec 28, 2006 at 11:48:06AM -0500, Aditya Mahajan wrote:
> 
> > 1. The current page is half full, and your exercise is half-page plus 
> > two lines. Should TeX leave the rest of the page empty and start a new 
> > page, or fill the current page with exercise and put two lines in the 
> > next page.
> 
> rather the second option. But it would be suboptimal.
> 
> > 
> > 2. The same case as above, but the text is one and a half page long.
> 
> In this case it would be clear, that the exercise begins instantly.
> 
> > 
> > 3. Or a more drastic case, when the current page has only two lines 
> > and the text block is exactly one page long. Should the text split or 
> > not.
> 
> No.

This seems inconsistent with case 1. There the text was less than one 
page, but you want it to be split. In this case, the text is exactly 
one page, but you do not want it to be split?

> > 
> > 4. Can you allow the text block to float, or should it occur where you 
> > place it, even if it means a lot of empty space on the page.
> 
> The text block must not float because it is part of the ongoing text.
> In some chapters there is more text in the exercises than outside.

Is something like this acceptable:

if length < 1 page
  keep the whole thing together, even if it means ending the current 
page with lots of empty space.

if length > 1 page
  split whereever you want

That would means, do a trial typesetting to find the length of the 
block, if length is less than one page put in a framedtext (which is 
just a highly customizable vbox) if length > 1 page, don't do anything 
and let it break pages anywhere. Just one more bit of information is 
needed. Do your exercises contain display math?

> > Basically, the difficulty is specifying how much blankspace on a page 
> > are you willing to accept, and under what conditions.
> 
> Perhaps I should fill blank parts of pages with elements of pure
> decoration. The English (American) original is shorter than the German
> text. Sometimes I have the impression that the authors have made
> content and appearance simultaneously. This is not reproducible in a
> translation.

This is always hard to do, and TeX glue makes it harder. Things can be 
bizzare when you want to fit all you can in page limits imposed in 
conferences: removing material takes more space, adding material 
reduces space, and you end up beating your head ;)

Aditya

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Elevated text blocks
  2006-12-28 20:03     ` Aditya Mahajan
@ 2006-12-28 20:25       ` Gerhard Kugler
  0 siblings, 0 replies; 8+ messages in thread
From: Gerhard Kugler @ 2006-12-28 20:25 UTC (permalink / raw)


On Thu, Dec 28, 2006 at 03:03:35PM -0500, Aditya Mahajan wrote:
 
> If choosing page size is an option, and there are only a few that are 
> larger than a page, things may be much easier. Keep all of them in one 
> page, and typeset. Note the ones that are larger than a page, and mark 
> them using a differnt environment. That is, you decide which exercises 
> should break and which should not.

This seems a good clarification.


> > > 3. Or a more drastic case, when the current page has only two lines 
> > > and the text block is exactly one page long. Should the text split or 
> > > not.
> > 
> > No.
> 
> This seems inconsistent with case 1. There the text was less than one 
> page, but you want it to be split. In this case, the text is exactly 
> one page, but you do not want it to be split?

I'm no longer so sure.

> Is something like this acceptable:
> 
> if length < 1 page
>   keep the whole thing together, even if it means ending the current 
> page with lots of empty space.
> 
> if length > 1 page
>   split whereever you want
> 

o.k.

> That would means, do a trial typesetting to find the length of the 
> block, if length is less than one page put in a framedtext (which is 
> just a highly customizable vbox) if length > 1 page, don't do anything 
> and let it break pages anywhere. Just one more bit of information is 
> needed. Do your exercises contain display math?
> 

No.

Gerhard

-- 
Gerhard Kugler
Psychotherapeut
http://www.psychotherapie-kugler.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Elevated text blocks
  2006-12-28 19:34   ` Gerhard Kugler
@ 2006-12-29  9:12     ` Wolfgang Schuster
  0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2006-12-29  9:12 UTC (permalink / raw)


On Thu, 28 Dec 2006 20:34:03 +0100
Gerhard Kugler <praxis@psychotherapie-kugler.de> wrote:

Hi Gerhard,

> On Thu, Dec 28, 2006 at 01:58:02PM +0100, Wolfgang Schuster wrote:
>  
> > you can keep text togehther by putting them into a vbox and it will
> > move to the next page if it will not fit on the current page.
> > 
> 
> Thank you Wolfgang,
> 
> this will be an important possibility. Where is the best documentation
> about vbox?

Can can find the explanations from vboc in the TeXbook, there is also a
german book about plain TeX available. It is out of print and can be
downloaded from the following page:

http://www.ruhr-uni-bochum.de/www-rz/schwanbs/TeX/

> 
> > There are to many ways how you defined your example, you can find one
> > way below. The important things are saved into the before and after
> > commands in the defintion.
> > 
> > <example>
> > \defineenumeration
> 
> Why "enumeration"? The exercises are not numbered.
> 
> Gerhard
> 

It was only an example to show you the use of the before and after
parameters.

There are to many ways in ConTeXt to define an example environment, you
can do it in the following ways:

- \defineframedtext
- \defineenumeration
- \definedescription
- ...

You could also defined you own macros:

\def\startexample#1\stopexample{...}

or used only a header like

\subject{Example}


You can see, there are so many ways too achieve one thing and im
couldn't know which way you have choosen.


If you want unnumbered examples with enumeration you can disable the
number with \setupenumeration[number=no] .


Wolfgang

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-12-29  9:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-27 21:25 Elevated text blocks Gerhard Kugler
2006-12-28 12:58 ` Wolfgang Schuster
2006-12-28 19:34   ` Gerhard Kugler
2006-12-29  9:12     ` Wolfgang Schuster
2006-12-28 16:48 ` Aditya Mahajan
2006-12-28 19:26   ` Gerhard Kugler
2006-12-28 20:03     ` Aditya Mahajan
2006-12-28 20:25       ` Gerhard Kugler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).