ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Set a block of content at minimum distance from top of page?
@ 2012-02-02 20:51 Peter Park Nelson
  2012-02-02 21:46 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Park Nelson @ 2012-02-02 20:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi ConTeXt list,

I have a document with a graphic (logo) in the upper right corner
(positioned on a layer and placed as a background). To the left of
this graphic are several text elements (Title, Author List, etc.) that
don't go all the way across the page. (Currently I have wrapped them
in \startnarrower...\stopnarrower -- is there a better way?) But this
is followed by an Abstract paragraph that uses the full width of the
page.

I would like to ensure that the full-width text never starts high
enough on the page that it encroaches on the upper-right-corner
graphic. So, I'm looking for a way to protect the graphic, or to force
the Abstract to start a minimum distance from the top of the page.

The Abstract can be forced down the page if necessary by manually
inserting a \godown[] command before it, but I would prefer a
programmatic solution.

Floating the graphic and wrapping text around it does not seem like a
good option, because I want to ensure that its position is absolute
and it never moves. Also, the Abstract needs to be full-width
throughout, so I need to force it to start after the graphic rather
than partially wrapping it.

Any suggestions appreciated...
PPN
-- 
Peter Park Nelson
peter.park.nelson@gmail.com
___________________________________________________________________________________
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] 4+ messages in thread

* Re: Set a block of content at minimum distance from top of page?
  2012-02-02 20:51 Set a block of content at minimum distance from top of page? Peter Park Nelson
@ 2012-02-02 21:46 ` Wolfgang Schuster
  2012-02-03  0:35   ` Peter Park Nelson
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2012-02-02 21:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 02.02.2012 um 21:51 schrieb Peter Park Nelson:

> Hi ConTeXt list,
> 
> I have a document with a graphic (logo) in the upper right corner
> (positioned on a layer and placed as a background). To the left of
> this graphic are several text elements (Title, Author List, etc.) that
> don't go all the way across the page. (Currently I have wrapped them
> in \startnarrower...\stopnarrower -- is there a better way?) But this
> is followed by an Abstract paragraph that uses the full width of the
> page.
> 
> I would like to ensure that the full-width text never starts high
> enough on the page that it encroaches on the upper-right-corner
> graphic. So, I'm looking for a way to protect the graphic, or to force
> the Abstract to start a minimum distance from the top of the page.
> 
> The Abstract can be forced down the page if necessary by manually
> inserting a \godown[] command before it, but I would prefer a
> programmatic solution.
> 
> Floating the graphic and wrapping text around it does not seem like a
> good option, because I want to ensure that its position is absolute
> and it never moves. Also, the Abstract needs to be full-width
> throughout, so I need to force it to start after the graphic rather
> than partially wrapping it.
> 
> Any suggestions appreciated…

You can use something like the following code but without a example from you it’s difficult to give a answer.

\showframe[text][text]

\starttext

\maxaligned\bgroup

	\startframed[frame=off,location=top,width=10cm,align=flushleft]%
	line 1\\
	line 2\\
	line 3
	\stopframed

	\hfill

	\tbox{\externalfigure[dummy][width=3cm,height=4cm]}%

\egroup

\input knuth

\stoptext

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
___________________________________________________________________________________


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

* Re: Set a block of content at minimum distance from top of page?
  2012-02-02 21:46 ` Wolfgang Schuster
@ 2012-02-03  0:35   ` Peter Park Nelson
  2012-02-04  2:16     ` Peter Park Nelson
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Park Nelson @ 2012-02-03  0:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Feb 2, 2012 at 3:46 PM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
>
> Am 02.02.2012 um 21:51 schrieb Peter Park Nelson:
>
>> Hi ConTeXt list,
>>
>> I have a document with a graphic (logo) in the upper right corner
>> (positioned on a layer and placed as a background). To the left of
>> this graphic are several text elements (Title, Author List, etc.) that
>> don't go all the way across the page. (Currently I have wrapped them
>> in \startnarrower...\stopnarrower -- is there a better way?) But this
>> is followed by an Abstract paragraph that uses the full width of the
>> page.
>>
>> I would like to ensure that the full-width text never starts high
>> enough on the page that it encroaches on the upper-right-corner
>> graphic. So, I'm looking for a way to protect the graphic, or to force
>> the Abstract to start a minimum distance from the top of the page.
>>
>> The Abstract can be forced down the page if necessary by manually
>> inserting a \godown[] command before it, but I would prefer a
>> programmatic solution.
>>
>> Floating the graphic and wrapping text around it does not seem like a
>> good option, because I want to ensure that its position is absolute
>> and it never moves. Also, the Abstract needs to be full-width
>> throughout, so I need to force it to start after the graphic rather
>> than partially wrapping it.
>>
>> Any suggestions appreciated…
>
> You can use something like the following code but without a example from you it’s difficult to give a answer.
>
> \showframe[text][text]
>
> \starttext
>
> \maxaligned\bgroup
>
>        \startframed[frame=off,location=top,width=10cm,align=flushleft]%
>        line 1\\
>        line 2\\
>        line 3
>        \stopframed
>
>        \hfill
>
>        \tbox{\externalfigure[dummy][width=3cm,height=4cm]}%
>
> \egroup
>
> \input knuth
>
> \stoptext
>
> Wolfgang
>
> ___________________________________________________________________________________

Here's a minimal example of what I'm talking about.

I would like the Abstract to not start until it will be clear of the
logo graphic on the right side.

In the real document, I cannot be sure how much vertical space will
taken up by text items (Authors, subtitle, etc.) between the Title and
the Abstract, hence my question.

Maybe I am thinking about this in the wrong way and there is a
different approach? I have more of a DTP background.

%%---start example -----------------------%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PAGE LAYOUT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setuppapersize[letter][letter]

\setuplayout
  [width=middle,
  backspace=15mm,
  topspace=10mm,
  height=254mm,
  header=5mm,
  headerdistance=3mm,
  footer=5mm,
  footerdistance=3mm,
  grid=yes]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% LOGO ON FIRST PAGE:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\useexternalfigure[logo][dummy][type=pdf,width=35mm,height=50mm]

\definelayer
  [logo-layer]
  [width=\paperwidth,height=\paperheight]

\setlayer
  [logo-layer]
  [preset=righttop,hoffset=15mm,voffset=10mm]
  {\externalfigure[logo]}

\setupbackgrounds[page][background={logo-layer}]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% HEADS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setuphead[title]
 [header=high,
  footer=high,
  grid={page},
  width=140mm,
  textstyle=\tfc\ss\bf]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ARTICLE ABSTRACT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definedescription[Abstract][%
  location=serried,
  width=broad,
  text={Abstract},
  indentnext=no]%,

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ARTICLE TEXT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\starttext

\title{The title of this article wraps at 140 mm so it doesn't hit the logo}

% A VARIABLE NUMBER OF TEXT ITEMS WILL BE PLACED HERE...

% \godown[3cm] % UNCOMMENT TO FORCE THE ABSTRACT BELOW THE LOGO

\startAbstract
But the abstract can continue all the way across the page...\input tufte\par
\stopAbstract

\stoptext

%%------- end example --------------%

-- 
Peter Park Nelson
peter.park.nelson@gmail.com
___________________________________________________________________________________
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] 4+ messages in thread

* Re: Set a block of content at minimum distance from top of page?
  2012-02-03  0:35   ` Peter Park Nelson
@ 2012-02-04  2:16     ` Peter Park Nelson
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Park Nelson @ 2012-02-04  2:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aright, whatever, but does anybody use the positioning mechanism with
\anchor described in the Details manual?

On Thu, Feb 2, 2012 at 6:35 PM, Peter Park Nelson
<peter.park.nelson@gmail.com> wrote:
> On Thu, Feb 2, 2012 at 3:46 PM, Wolfgang Schuster
> <schuster.wolfgang@googlemail.com> wrote:
>>
>> Am 02.02.2012 um 21:51 schrieb Peter Park Nelson:
>>
>>> Hi ConTeXt list,
>>>
>>> I have a document with a graphic (logo) in the upper right corner
>>> (positioned on a layer and placed as a background). To the left of
>>> this graphic are several text elements (Title, Author List, etc.) that
>>> don't go all the way across the page. (Currently I have wrapped them
>>> in \startnarrower...\stopnarrower -- is there a better way?) But this
>>> is followed by an Abstract paragraph that uses the full width of the
>>> page.
>>>
>>> I would like to ensure that the full-width text never starts high
>>> enough on the page that it encroaches on the upper-right-corner
>>> graphic. So, I'm looking for a way to protect the graphic, or to force
>>> the Abstract to start a minimum distance from the top of the page.
>>>
>>> The Abstract can be forced down the page if necessary by manually
>>> inserting a \godown[] command before it, but I would prefer a
>>> programmatic solution.
>>>
>>> Floating the graphic and wrapping text around it does not seem like a
>>> good option, because I want to ensure that its position is absolute
>>> and it never moves. Also, the Abstract needs to be full-width
>>> throughout, so I need to force it to start after the graphic rather
>>> than partially wrapping it.
>>>
>>> Any suggestions appreciated…
>>
>> You can use something like the following code but without a example from you it’s difficult to give a answer.
>>
>> \showframe[text][text]
>>
>> \starttext
>>
>> \maxaligned\bgroup
>>
>>        \startframed[frame=off,location=top,width=10cm,align=flushleft]%
>>        line 1\\
>>        line 2\\
>>        line 3
>>        \stopframed
>>
>>        \hfill
>>
>>        \tbox{\externalfigure[dummy][width=3cm,height=4cm]}%
>>
>> \egroup
>>
>> \input knuth
>>
>> \stoptext
>>
>> Wolfgang
>>
>> ___________________________________________________________________________________
>
> Here's a minimal example of what I'm talking about.
>
> I would like the Abstract to not start until it will be clear of the
> logo graphic on the right side.
>
> In the real document, I cannot be sure how much vertical space will
> taken up by text items (Authors, subtitle, etc.) between the Title and
> the Abstract, hence my question.
>
> Maybe I am thinking about this in the wrong way and there is a
> different approach? I have more of a DTP background.
>
> %%---start example -----------------------%%
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %% PAGE LAYOUT
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> \setuppapersize[letter][letter]
>
> \setuplayout
>  [width=middle,
>  backspace=15mm,
>  topspace=10mm,
>  height=254mm,
>  header=5mm,
>  headerdistance=3mm,
>  footer=5mm,
>  footerdistance=3mm,
>  grid=yes]
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %%%%% LOGO ON FIRST PAGE:
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> \useexternalfigure[logo][dummy][type=pdf,width=35mm,height=50mm]
>
> \definelayer
>  [logo-layer]
>  [width=\paperwidth,height=\paperheight]
>
> \setlayer
>  [logo-layer]
>  [preset=righttop,hoffset=15mm,voffset=10mm]
>  {\externalfigure[logo]}
>
> \setupbackgrounds[page][background={logo-layer}]
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %% HEADS
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> \setuphead[title]
>  [header=high,
>  footer=high,
>  grid={page},
>  width=140mm,
>  textstyle=\tfc\ss\bf]
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %% ARTICLE ABSTRACT
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> \definedescription[Abstract][%
>  location=serried,
>  width=broad,
>  text={Abstract},
>  indentnext=no]%,
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %% ARTICLE TEXT
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \starttext
>
> \title{The title of this article wraps at 140 mm so it doesn't hit the logo}
>
> % A VARIABLE NUMBER OF TEXT ITEMS WILL BE PLACED HERE...
>
> % \godown[3cm] % UNCOMMENT TO FORCE THE ABSTRACT BELOW THE LOGO
>
> \startAbstract
> But the abstract can continue all the way across the page...\input tufte\par
> \stopAbstract
>
> \stoptext
>
> %%------- end example --------------%
>
> --
> Peter Park Nelson
> peter.park.nelson@gmail.com



-- 
Peter Park Nelson
peter.park.nelson@gmail.com
___________________________________________________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2012-02-04  2:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-02 20:51 Set a block of content at minimum distance from top of page? Peter Park Nelson
2012-02-02 21:46 ` Wolfgang Schuster
2012-02-03  0:35   ` Peter Park Nelson
2012-02-04  2:16     ` Peter Park Nelson

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