ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: float/figure and wrapping text
       [not found] <20060104110003.AB756127DC@ronja.ntg.nl>
@ 2006-01-04 14:54 ` Randolph Bertin
  2006-01-04 16:12   ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Randolph Bertin @ 2006-01-04 14:54 UTC (permalink / raw)



On Wednesday, January 4, 2006, at 05:00  AM, ntg-context-request@ntg.nl 
wrote:

> you can move the graphic with:
>
> \starttext
>
> \hangsidefloat[3] \placefigure[left]{}{} \input zapf \input zapf 
> \input zapf
>
> \movesidefloat[3*line] \placefigure[left]{}{} \input zapf \input zapf
> \input zapf
>
> \stoptext
>
> this is still page bound
>
> \movesidefloat[x=10pt,y=-30pt]
>
> also works, as does:
>
> \placefigure[left,3*line]{}{} \input zapf \input zapf \input zapf
>
> and in the next version:
>
> \placefigure[left,3*hang]{}{} \input zapf \input zapf \input zapf
>
> will work as well (i cannot post a patch because i first need to upload
> the version with the french interface)
>
> Hans
>
>



I tried all of the above examples, but all end up with the same result 
I already have, namely, if there is not enough room to fit the figure 
(in my project, this is an image) on the current page, a page break is 
issued (leaving the bottom portion of the page blank). What I would 
like to happen, is to go ahead and begin the next paragraph to fill the 
current page, and then place the graphic on the subsequent page (with 
text to the side).

Again, the issue only arises when there is not enough room on the 
current page to fit the figure. In my project, the figures are about 
1/2 the height of the main body text, so anytime the paragraph breaks 
below the midpoint of a page, any image placed there will cause a page 
break leaving the rest of the page blank.

Also, in the examples given, the ones using 3*line also set the image 
down three lines from the beginning of the paragraph. And while I might 
think that those first three lines should print across the full width 
of the main body text (directly above the image area), they only appear 
to the side of the image area, leaving three partially blank lines just 
above the image. Is that what is supposed to happen?

Regards,
Randolph

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

* Re: float/figure and wrapping text
  2006-01-04 14:54 ` float/figure and wrapping text Randolph Bertin
@ 2006-01-04 16:12   ` Hans Hagen
  2006-01-04 19:22     ` Randolph Bertin
  2006-01-05  1:13     ` float/figure and wrapping text (An Example) Randolph Bertin
  0 siblings, 2 replies; 8+ messages in thread
From: Hans Hagen @ 2006-01-04 16:12 UTC (permalink / raw)


Randolph Bertin wrote:

>
> On Wednesday, January 4, 2006, at 05:00  AM, 
> ntg-context-request@ntg.nl wrote:
>
>> you can move the graphic with:
>>
>> \starttext
>>
>> \hangsidefloat[3] \placefigure[left]{}{} \input zapf \input zapf 
>> \input zapf
>>
>> \movesidefloat[3*line] \placefigure[left]{}{} \input zapf \input zapf
>> \input zapf
>>
>> \stoptext
>>
>> this is still page bound
>>
>> \movesidefloat[x=10pt,y=-30pt]
>>
>> also works, as does:
>>
>> \placefigure[left,3*line]{}{} \input zapf \input zapf \input zapf
>>
>> and in the next version:
>>
>> \placefigure[left,3*hang]{}{} \input zapf \input zapf \input zapf
>>
>> will work as well (i cannot post a patch because i first need to upload
>> the version with the french interface)
>>
>> Hans
>>
>>
>
>
>
> I tried all of the above examples, but all end up with the same result 
> I already have, namely, 


that's intended (ok, you can play with the hang to force a graphic to a 
next page but then you hav esemi automated makeup)

> if there is not enough room to fit the figure (in my project, this is 
> an image) on the current page, a page break is issued (leaving the 
> bottom portion of the page blank). What I would like to happen, is to 
> go ahead and begin the next paragraph to fill the current page, and 
> then place the graphic on the subsequent page (with text to the side).
>
that's what the attached file was doing ... keep in mind that this 
really stretches tex to the limits

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

* Re: float/figure and wrapping text
  2006-01-04 16:12   ` Hans Hagen
@ 2006-01-04 19:22     ` Randolph Bertin
  2006-01-05  1:13     ` float/figure and wrapping text (An Example) Randolph Bertin
  1 sibling, 0 replies; 8+ messages in thread
From: Randolph Bertin @ 2006-01-04 19:22 UTC (permalink / raw)



On Wednesday, January 4, 2006, at 10:12  AM, Hans Hagen wrote:

> Randolph Bertin wrote:
>
>>
>> On Wednesday, January 4, 2006, at 05:00  AM, Hans wrote:
>>
>>> you can move the graphic with:
>>>
>>> \starttext
>>>
>>> \hangsidefloat[3] \placefigure[left]{}{} \input zapf \input zapf 
>>> \input zapf
>>>
>>> \movesidefloat[3*line] \placefigure[left]{}{} \input zapf \input zapf
>>> \input zapf
>>>
>>> \stoptext
>>>
>>> this is still page bound
>>>
>>> \movesidefloat[x=10pt,y=-30pt]
>>>
>>> also works, as does:
>>>
>>> \placefigure[left,3*line]{}{} \input zapf \input zapf \input zapf
>>>
>>> and in the next version:
>>>
>>> \placefigure[left,3*hang]{}{} \input zapf \input zapf \input zapf
>>>
>>> will work as well (i cannot post a patch because i first need to 
>>> upload
>>> the version with the french interface)
>>>
>>> Hans
>>>
>>>
>>
>>
>>
>> I tried all of the above examples, but all end up with the same 
>> result I already have, namely,
>
>
> that's intended (ok, you can play with the hang to force a graphic to 
> a next page but then you hav esemi automated makeup)
>
>> if there is not enough room to fit the figure (in my project, this is 
>> an image) on the current page, a page break is issued (leaving the 
>> bottom portion of the page blank). What I would like to happen, is to 
>> go ahead and begin the next paragraph to fill the current page, and 
>> then place the graphic on the subsequent page (with text to the >> side).
>>
> that's what the attached file was doing ... keep in mind that this 
> really stretches tex to the limits



Hans, I'm not sure what you mean by attached file. Are you referring to 
the examples above?

Maybe I am asking the question in the wrong way.

First, I want to make sure that the behavior I am observing is what one 
would expect:
Namely, if there is not enough room on a page, \placefloat will 
*continue setting text on that page* and then put the float at the 
beginning of the next page. But, for \placefigure if there is not 
enough room on a page it will *issue a page break* and begin a new page 
with with figure, leaving the remainder of the previous page blank.

Is there a way to get wrapped around a figure placed using \placefloat?

Randolph

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

* Re: float/figure and wrapping text (An Example)
  2006-01-04 16:12   ` Hans Hagen
  2006-01-04 19:22     ` Randolph Bertin
@ 2006-01-05  1:13     ` Randolph Bertin
  1 sibling, 0 replies; 8+ messages in thread
From: Randolph Bertin @ 2006-01-05  1:13 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1815 bytes --]

Here is an example illustrating the situation (and perhaps a problem or 
two):

---------------------------------------
\setuppapersize[letter]
\starttext

\input zapf

\input zapf

\input zapf

\input zapf

If using placefigure without enough space left on the page, this will 
be the last paragraph, but if we use placefloat, part of the knuth text 
will appear before the break.

\hangsidefloat[2] \placeFLOGURE [left] {}{} \input knuth

\input zapf

\input zapf

\stoptext



------------------------------------

Where the example reads \placeFLOGURE just edit to read either 
\placefigure or \placefloat and then typeset the text. Afterwards, 
change it to the other, typeset, and note the difference in where the 
page breaks, and what happens on the subsequent page.

I have a couple of questions concerning the example.

(1) If you comment out one (or two) of the first set of "\input zapf" 
commands, then the \hangsidefloat[2]\placefigure works *beautifully*, 
with two lines of text above the figure, the next lines to the side, 
and then again, underneath the figure.

However, when the example is run as originally specified (with all the 
'\input zapf' text), and the figure is pushed to the next page, for 
some reason the 2 lines that appeared above the figure now appear 
aligned with the lines to the side of the figure, with blank space 
above. Is this the correct behavior, or a bug, or am I just failing to 
understand the subtleties of hanging side floats?

(2) Even though I specify "left" when using \placefloat, it appears 
*centered* on the page. Again, is that the correct behavior, or a bug 
or am I just failing to understand the mechanism for float placement.

(3) Is there a way to have text wrap around a \placefloat or is that 
only a feature of \placefigure ?


Regards,
Randolph

[-- Attachment #1.2: Type: text/enriched, Size: 1825 bytes --]

Here is an example illustrating the situation (and perhaps a problem
or two):


---------------------------------------

\setuppapersize[letter]

\starttext


\input zapf 


\input zapf 


\input zapf 


\input zapf


If using placefigure without enough space left on the page, this will
be the last paragraph, but if we use placefloat, part of the knuth
text will appear before the break.


\hangsidefloat[2] \placeFLOGURE [left] {}{} \input knuth


\input zapf 


\input zapf


\stoptext




------------------------------------


Where the example reads \placeFLOGURE just edit to read either
\placefigure or \placefloat and then typeset the text. Afterwards,
change it to the other, typeset, and note the difference in where the
page breaks, and what happens on the subsequent page.


I have a couple of questions concerning the example.


(1) If you comment out one (or two) of the first set of "\input zapf"
commands, then the \hangsidefloat[2]\placefigure works *beautifully*,
with two lines of text above the figure, the next lines to the side,
and then again, underneath the figure. 


However, when the example is run as originally specified (with all the
'\input zapf' text), and the figure is pushed to the next page, for
some reason the 2 lines that appeared above the figure now appear
aligned with the lines to the side of the figure, with blank space
above. Is this the correct behavior, or a bug, or am I just failing to
understand the subtleties of hanging side floats?


(2) Even though I specify "left" when using \placefloat, it appears
*centered* on the page. Again, is that the correct behavior, or a bug
or am I just failing to understand the mechanism for float placement.


(3) Is there a way to have text wrap around a \placefloat or is that
only a feature of \placefigure ?



Regards,

Randolph


[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

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

* Re: float/figure and wrapping text
  2006-01-04  4:01 Randolph Bertin
  2006-01-04  4:07 ` David Arnold
@ 2006-01-04 10:44 ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2006-01-04 10:44 UTC (permalink / raw)


Randolph Bertin wrote:

> I am typesetting books, primarily text and images. My original 
> background is Quark/InDesign, but quite recently, I decided to look 
> into TeX/LaTeX (LaTeX because that is just what most of the TeX 
> references refer to). I first spent some time trying to learn LaTeX 
> and although I was able to accomplish a number of my desired goals, I 
> began to run into some problems related to maintaining text on a 
> baseline grid. When searching for solutions, I came across a reference 
> to ConTeXt. My first impressions are that ConTeXt looks great, and 
> would handle most of what I would like to accomplish with a nice 
> uniform approach. I haven't explored many of the features I will need 
> to use, but am trying to read the manuals and listserv archives and 
> basically trying things out to see how things function.
>
> So, I am sure I will have a number of questions that will later turn 
> out to seem obvious (often the case, I guess for the uninitiated). 
> Eventually, I might even be able to answer a couple of questions....
>
> But, to begin, one thing I would like to do for a project I am working 
> on is to wrap continuous text around an image (placed on one side of 
> the main text body), and I am encountering a little difficulty.
>
> The basic situation in my document is that the figure can float, to be 
> inserted at the next available spot, placed at the left or right 
> margin, with text above (if there is space), to the side, and below 
> (if there is space).
>
> First, it appears that TeX, LaTeX and ConTeXt can only place a figure 
> next to text at the beginning of a paragraph. Is this correct?
>
> Second, using ConText, when I use \placefigure, if there is enough 
> space on a page, it appears to place it, and wrap text around the 
> side. Everything looks fine. But, if there is not enough space 
> remaining on the page, the remainder of the page is left blank, and 
> then the figure is placed at the beginning of the next page, with text 
> wrapped around it. (That is both what I observed, and also I read in 
> the "Details" document as the expected behavior). If I use 
> \placefloat, if there is not enough space remaining on the page, the 
> text will continue printing on the page and the float will be placed 
> on the next page, BUT without any text to the side of it.
>
> What I would like is to be able to combine these two behaviors when 
> placing a floating figure: If there is enough space on the page, it 
> would place the figure there and wrap text around it (as it currently 
> does for \placefigure). If there is not enough space, it will 'float' 
> the figure and continue with the text on the current page (as it does 
> with \placefloat, but not with \placefigure) and insert the figure on 
> a subsequent page when there is space, wrapping the text around the 
> figure at that point (again as it does with \placefigure, but does not 
> seem to do with \placefloat).
>
> Is it possible to do this using a current set of ConTeXt control 
> sequences and maybe I am just missing something? If not, is this 
> something that can be implemented? (I don't have any experience with 
> lower level TeX macro programming). All of what I am looking for is 
> already there, but not all in one control sequence.

you can move the graphic with:

\starttext

\hangsidefloat[3] \placefigure[left]{}{} \input zapf \input zapf \input zapf

\movesidefloat[3*line] \placefigure[left]{}{} \input zapf \input zapf 
\input zapf

\stoptext

this is still page bound

\movesidefloat[x=10pt,y=-30pt]

also works, as does:

\placefigure[left,3*line]{}{} \input zapf \input zapf \input zapf

and in the next version:

\placefigure[left,3*hang]{}{} \input zapf \input zapf \input zapf

will work as well (i cannot post a patch because i first need to upload 
the version with the french interface)

Hans

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

* Re: float/figure and wrapping text
@ 2006-01-04  5:20 Randolph Bertin
  0 siblings, 0 replies; 8+ messages in thread
From: Randolph Bertin @ 2006-01-04  5:20 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1020 bytes --]


David Arnold wrote:

> Have you seen this document?
>
> http://pragma-ade.com/general/manuals/details.pdf
>
> Look in the section "Fine Tuning Graphics" and see if there is
> anything there that will help.
>
>

Yes, I had looked through that document, which is where I found the 
statement (on p. 25):

	When the figure does not fit on the page, a page break is issued.

This, as I mentioned, is a result of \placefigure I would like to get 
around (and, in fact, \placefloat DOES seem to get around, but with the 
drawback of not having text wrapped to the side). While I don't 
understand all the "details" of that manual, (which I am sure will be 
very helpful for me in fine tuning the placement of a graphic relative 
to the surrounding text, if I can overcome my current placement 
difficulty), the remaining "details" do not appear to address the 
matter. I feel like I am missing something pretty basic, here, but just 
can't seem to come up with the right combination.

Any other thoughts?


Regards,
Randolph

[-- Attachment #1.2: Type: text/enriched, Size: 1127 bytes --]



David Arnold wrote:


<excerpt><fontfamily><param>Courier</param>Have you seen this
document? 


<color><param>110F,110F,FFFD</param>http://pragma-ade.com/general/manuals/details.pdf </color>


Look in the section "Fine Tuning Graphics" and see if there is 

anything there that will help. 



</fontfamily></excerpt>

Yes, I had looked through that document, which is where I found the
statement (on p. 25):


	When the figure does not fit on the page, a page break is issued. 


This, as I mentioned, is a result of \placefigure I would like to get
around (and, in fact, \placefloat DOES seem to get around, but with
the drawback of not having text wrapped to the side). While I don't
understand all the "details" of that manual, (which I am sure will be
very helpful for me in fine tuning the placement of a graphic relative
to the surrounding text, if I can overcome my current placement
difficulty), the remaining "details" do not appear to address the
matter. I feel like I am missing something pretty basic, here, but
just can't seem to come up with the right combination.


Any other thoughts?



Regards,

Randolph


[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

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

* Re: float/figure and wrapping text
  2006-01-04  4:01 Randolph Bertin
@ 2006-01-04  4:07 ` David Arnold
  2006-01-04 10:44 ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: David Arnold @ 2006-01-04  4:07 UTC (permalink / raw)


Have you seen this document?

http://pragma-ade.com/general/manuals/details.pdf

Look in the section "Fine Tuning Graphics" and see if there is  
anything there that will help.

On Jan 3, 2006, at 8:01 PM, Randolph Bertin wrote:

> I am typesetting books, primarily text and images. My original  
> background is Quark/InDesign, but quite recently, I decided to look  
> into TeX/LaTeX (LaTeX because that is just what most of the TeX  
> references refer to). I first spent some time trying to learn LaTeX  
> and although I was able to accomplish a number of my desired goals,  
> I began to run into some problems related to maintaining text on a  
> baseline grid. When searching for solutions, I came across a  
> reference to ConTeXt. My first impressions are that ConTeXt looks  
> great, and would handle most of what I would like to accomplish  
> with a nice uniform approach. I haven't explored many of the  
> features I will need to use, but am trying to read the manuals and  
> listserv archives and basically trying things out to see how things  
> function.
>
> So, I am sure I will have a number of questions that will later  
> turn out to seem obvious (often the case, I guess for the  
> uninitiated). Eventually, I might even be able to answer a couple  
> of questions....
>
> But, to begin, one thing I would like to do for a project I am  
> working on is to wrap continuous text around an image (placed on  
> one side of the main text body), and I am encountering a little  
> difficulty.
>
> The basic situation in my document is that the figure can float, to  
> be inserted at the next available spot, placed at the left or right  
> margin, with text above (if there is space), to the side, and below  
> (if there is space).
>
> First, it appears that TeX, LaTeX and ConTeXt can only place a  
> figure next to text at the beginning of a paragraph. Is this correct?
>
> Second, using ConText, when I use \placefigure, if there is enough  
> space on a page, it appears to place it, and wrap text around the  
> side. Everything looks fine. But, if there is not enough space  
> remaining on the page, the remainder of the page is left blank, and  
> then the figure is placed at the beginning of the next page, with  
> text wrapped around it. (That is both what I observed, and also I  
> read in the "Details" document as the expected behavior). If I use  
> \placefloat, if there is not enough space remaining on the page,  
> the text will continue printing on the page and the float will be  
> placed on the next page, BUT without any text to the side of it.
>
> What I would like is to be able to combine these two behaviors when  
> placing a floating figure: If there is enough space on the page, it  
> would place the figure there and wrap text around it (as it  
> currently does for \placefigure). If there is not enough space, it  
> will 'float' the figure and continue with the text on the current  
> page (as it does with \placefloat, but not with \placefigure) and  
> insert the figure on a subsequent page when there is space,  
> wrapping the text around the figure at that point (again as it does  
> with \placefigure, but does not seem to do with \placefloat).
>
> Is it possible to do this using a current set of ConTeXt control  
> sequences and maybe I am just missing something? If not, is this  
> something that can be implemented? (I don't have any experience  
> with lower level TeX macro programming). All of what I am looking  
> for is already there, but not all in one control sequence.
>
> Thank you very much for any help,
> Randolph
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

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

* float/figure and wrapping text
@ 2006-01-04  4:01 Randolph Bertin
  2006-01-04  4:07 ` David Arnold
  2006-01-04 10:44 ` Hans Hagen
  0 siblings, 2 replies; 8+ messages in thread
From: Randolph Bertin @ 2006-01-04  4:01 UTC (permalink / raw)


I am typesetting books, primarily text and images. My original 
background is Quark/InDesign, but quite recently, I decided to look 
into TeX/LaTeX (LaTeX because that is just what most of the TeX 
references refer to). I first spent some time trying to learn LaTeX and 
although I was able to accomplish a number of my desired goals, I began 
to run into some problems related to maintaining text on a baseline 
grid. When searching for solutions, I came across a reference to 
ConTeXt. My first impressions are that ConTeXt looks great, and would 
handle most of what I would like to accomplish with a nice uniform 
approach. I haven't explored many of the features I will need to use, 
but am trying to read the manuals and listserv archives and basically 
trying things out to see how things function.

So, I am sure I will have a number of questions that will later turn 
out to seem obvious (often the case, I guess for the uninitiated). 
Eventually, I might even be able to answer a couple of questions....

But, to begin, one thing I would like to do for a project I am working 
on is to wrap continuous text around an image (placed on one side of 
the main text body), and I am encountering a little difficulty.

The basic situation in my document is that the figure can float, to be 
inserted at the next available spot, placed at the left or right 
margin, with text above (if there is space), to the side, and below (if 
there is space).

First, it appears that TeX, LaTeX and ConTeXt can only place a figure 
next to text at the beginning of a paragraph. Is this correct?

Second, using ConText, when I use \placefigure, if there is enough 
space on a page, it appears to place it, and wrap text around the side. 
Everything looks fine. But, if there is not enough space remaining on 
the page, the remainder of the page is left blank, and then the figure 
is placed at the beginning of the next page, with text wrapped around 
it. (That is both what I observed, and also I read in the "Details" 
document as the expected behavior). If I use \placefloat, if there is 
not enough space remaining on the page, the text will continue printing 
on the page and the float will be placed on the next page, BUT without 
any text to the side of it.

What I would like is to be able to combine these two behaviors when 
placing a floating figure: If there is enough space on the page, it 
would place the figure there and wrap text around it (as it currently 
does for \placefigure). If there is not enough space, it will 'float' 
the figure and continue with the text on the current page (as it does 
with \placefloat, but not with \placefigure) and insert the figure on a 
subsequent page when there is space, wrapping the text around the 
figure at that point (again as it does with \placefigure, but does not 
seem to do with \placefloat).

Is it possible to do this using a current set of ConTeXt control 
sequences and maybe I am just missing something? If not, is this 
something that can be implemented? (I don't have any experience with 
lower level TeX macro programming). All of what I am looking for is 
already there, but not all in one control sequence.

Thank you very much for any help,
Randolph

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

end of thread, other threads:[~2006-01-05  1:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20060104110003.AB756127DC@ronja.ntg.nl>
2006-01-04 14:54 ` float/figure and wrapping text Randolph Bertin
2006-01-04 16:12   ` Hans Hagen
2006-01-04 19:22     ` Randolph Bertin
2006-01-05  1:13     ` float/figure and wrapping text (An Example) Randolph Bertin
2006-01-04  5:20 float/figure and wrapping text Randolph Bertin
  -- strict thread matches above, loose matches on Subject: below --
2006-01-04  4:01 Randolph Bertin
2006-01-04  4:07 ` David Arnold
2006-01-04 10:44 ` Hans Hagen

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).