ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [***SPAM***] placefigure adds break
@ 2012-04-05 10:36 Steffen Wolfrum
  2012-04-05 11:10 ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: Steffen Wolfrum @ 2012-04-05 10:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

please have a look at thee example below:
I have a long paragraph (more than 3 pages), and I want to set a float/figure at top of page 2.
Thus, I need to write \placefigure *in* my paragraph, between two words.

How can I do that without adding a paragraph break after the respective word (marked "HERE")?

Steffen
-------

\starttext

\switchtobodyfont[rm,10pt]

\input tufte \input ward \input zapf \input tufte \input ward \input zapf \input tufte \input ward \input zapf \input tufte \input ward \input zapf HERE \placefigure[top]{}{\vskip3pt{\externalfigure[foo][frame=off,width=\dimexpr(\textwidth-10mm)]}}\input tufte \input ward \input zapf \input tufte \input ward \input zapf \input tufte \input ward \input zapf \input tufte \input ward \input zapf \input tufte \input ward \input zapf 

\stoptext

___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: [***SPAM***] placefigure adds break
  2012-04-05 10:36 [***SPAM***] placefigure adds break Steffen Wolfrum
@ 2012-04-05 11:10 ` Aditya Mahajan
  2012-04-05 11:25   ` luigi scarso
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2012-04-05 11:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 5 Apr 2012, Steffen Wolfrum wrote:

> Hi,
>
> please have a look at thee example below:
> I have a long paragraph (more than 3 pages), and I want to set a float/figure at top of page 2.
> Thus, I need to write \placefigure *in* my paragraph, between two words.
>
> How can I do that without adding a paragraph break after the respective word (marked "HERE")?
>
> Steffen
> -------
>
> \starttext
>
> \switchtobodyfont[rm,10pt]
>
> \input tufte \input ward \input zapf \input tufte \input ward \input 
> zapf \input tufte \input ward \input zapf \input tufte \input ward 
> \input zapf HERE 
> \placefigure[top]{}{\vskip3pt{\externalfigure[foo][frame=off,width=\dimexpr(\textwidth-10mm)]}}\input 
> tufte \input ward \input zapf \input tufte \input ward \input zapf 
> \input tufte \input ward \input zapf \input tufte \input ward \input 
> zapf \input tufte \input ward \input zapf
>
> \stoptext

(Untested)

\startpostponing[+1]
\placefigure[top]{}{...}
\stoppostponing

Rest of the text


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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: [***SPAM***] placefigure adds break
  2012-04-05 11:10 ` Aditya Mahajan
@ 2012-04-05 11:25   ` luigi scarso
  2012-04-05 11:39     ` [***NOSPAM***] " Steffen Wolfrum
  0 siblings, 1 reply; 5+ messages in thread
From: luigi scarso @ 2012-04-05 11:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Apr 5, 2012 at 1:10 PM, Aditya Mahajan <adityam@umich.edu> wrote:
> (Untested)
>
> \startpostponing[+1]
> \placefigure[top]{}{...}
> \stoppostponing
>
> Rest of the text
>
>
> Aditya
\starttext

\switchtobodyfont[rm,10pt]

\input tufte \input ward \input zapf \input tufte \input ward \input
zapf \input tufte \input ward %
\input zapf \input tufte \input ward %
\input zapf HERE%
\startpostponing[+1]
\placefigure[top]{}{\vskip3pt\externalfigure[foo][frame=off,width=\dimexpr(\textwidth-10mm)]}
\stoppostponing%
AND HERE \input tufte \input ward %
\input zapf \input tufte \input ward \input zapf \input tufte \input
ward \input zapf \input tufte %
\input ward \input zapf \input tufte \input ward \input zapf

\stoptext

seems ok

-- 
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
___________________________________________________________________________________


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

* Re: [***NOSPAM***] placefigure adds break
  2012-04-05 11:25   ` luigi scarso
@ 2012-04-05 11:39     ` Steffen Wolfrum
  2012-04-05 13:38       ` Alan BRASLAU
  0 siblings, 1 reply; 5+ messages in thread
From: Steffen Wolfrum @ 2012-04-05 11:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 05.04.2012 um 13:25 schrieb luigi scarso:

> On Thu, Apr 5, 2012 at 1:10 PM, Aditya Mahajan <adityam@umich.edu> wrote:
>> (Untested)
>> 
>> \startpostponing[+1]
>> \placefigure[top]{}{...}
>> \stoppostponing
>> 
>> Rest of the text
>> 
>> 
>> Aditya
> \starttext
> 
> \switchtobodyfont[rm,10pt]
> 
> \input tufte \input ward \input zapf \input tufte \input ward \input
> zapf \input tufte \input ward %
> \input zapf \input tufte \input ward %
> \input zapf HERE%
> \startpostponing[+1]
> \placefigure[top]{}{\vskip3pt\externalfigure[foo][frame=off,width=\dimexpr(\textwidth-10mm)]}
> \stoppostponing%
> AND HERE \input tufte \input ward %
> \input zapf \input tufte \input ward \input zapf \input tufte \input
> ward \input zapf \input tufte %
> \input ward \input zapf \input tufte \input ward \input zapf
> 
> \stoptext
> 
> seems ok



indeed, a great result.
(searching for this command now, I saw that it's a quite old command ... only I never knew it)

thanks a lot Aditya and Luigi!

Steffen
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: [***NOSPAM***] placefigure adds break
  2012-04-05 11:39     ` [***NOSPAM***] " Steffen Wolfrum
@ 2012-04-05 13:38       ` Alan BRASLAU
  0 siblings, 0 replies; 5+ messages in thread
From: Alan BRASLAU @ 2012-04-05 13:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: context

On Thu, 5 Apr 2012 13:39:42 +0200
Steffen Wolfrum <context@st.estfiles.de> wrote:

> 
> Am 05.04.2012 um 13:25 schrieb luigi scarso:
> 
> > On Thu, Apr 5, 2012 at 1:10 PM, Aditya Mahajan <adityam@umich.edu>
> > wrote:
> >> (Untested)
> >> 
> >> \startpostponing[+1]
> >> \placefigure[top]{}{...}
> >> \stoppostponing
> >> 
> >> Rest of the text
> >> 
> >> 
> >> Aditya
> > \starttext
> > 
> > \switchtobodyfont[rm,10pt]
> > 
> > \input tufte \input ward \input zapf \input tufte \input ward \input
> > zapf \input tufte \input ward %
> > \input zapf \input tufte \input ward %
> > \input zapf HERE%
> > \startpostponing[+1]
> > \placefigure[top]{}{\vskip3pt\externalfigure[foo][frame=off,width=\dimexpr(\textwidth-10mm)]}
> > \stoppostponing%
> > AND HERE \input tufte \input ward %
> > \input zapf \input tufte \input ward \input zapf \input tufte \input
> > ward \input zapf \input tufte %
> > \input ward \input zapf \input tufte \input ward \input zapf
> > 
> > \stoptext
> > 
> > seems ok
> 
> 
> 
> indeed, a great result.
> (searching for this command now, I saw that it's a quite old
> command ... only I never knew it)
> 
> thanks a lot Aditya and Luigi!


I have been looking for a trick to place figures near their reference
in the text, without imposing a paragraph break.
This trick works (so thanks again to Aditya and Luigi):

\starttext

Some text is described \in{figure}[fig:reference].
\startpostponing[+0]
\startplacefigure[location=here,reference=fig:reference,
	title={This figure gets placed somewhere near its reference.}]
	\externalfigure[cow][width=\textwidth]
\stopplacefigure
\stoppostponing
The text continues here without a paragraph break.

\stoptext

A few comments:

1. The \startpostponing...\stoppostponing is necessary,
although some other wrapper around the placefigure might also work.

2. The % at the end of the lines in the above examples is not necessary
unless one seeks to kill the spacing between {HERE}{AND HERE}.

3. One should preferably be using \startplacefigure\stopplacefigure
(rather than \placefigure). Besides being cleaner, as a bonus
one gets to use title={},list={} for the figure caption and
list of figure entry.

Should placefigure be "fixed" somehow so as to hide its paragraph
break itself?

Alan
___________________________________________________________________________________
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
___________________________________________________________________________________


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

end of thread, other threads:[~2012-04-05 13:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-05 10:36 [***SPAM***] placefigure adds break Steffen Wolfrum
2012-04-05 11:10 ` Aditya Mahajan
2012-04-05 11:25   ` luigi scarso
2012-04-05 11:39     ` [***NOSPAM***] " Steffen Wolfrum
2012-04-05 13:38       ` Alan BRASLAU

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