ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* problem with tikz remember picture and overlay.
@ 2011-03-07 13:02 Curiouslearn
  2011-03-07 14:13 ` Curiouslearn
  0 siblings, 1 reply; 2+ messages in thread
From: Curiouslearn @ 2011-03-07 13:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

I am trying to use tikz's remember picture and overlay for absolute
positioning. With the code below, the content in the tikz picture
appears on a new page after the slide title. I want it to appear on
the same page. Please see the minimal example below. I have explained
with comments where the problem occurs.

Thanks for your help.

    \setuppapersize[S6][S6]
    \setuplayout[backspace=0.5in, width=middle, header=0.25in,
      topspace=0.25in, height=middle]
    \setupbackgrounds[page][background=color, backgroundcolor=linen]
    \setupwhitespace[medium]
    \setuppagenumbering[location=]
    \setupcolors[state=start]
    \setupinteraction[state=start,color=blue]
    \setupcolor[xwi]

    \definehead[slidetitle][subject]
    \setuphead[slidetitle][style=\tfb,
                           color=lightsteelblue]

    \def\SlideTitle#1{\page\framed[frame=off, background=color, %
        backgroundcolor=gray:9]{\slidetitle{#1}}}
    \usemodule[simplefonts]
    \setmainfont[Helvetica]
    \switchtobodyfont[20pt]

    \definehead[slidetitle][subject]
    \setuphead[slidetitle][style=\tfb,
                           color=lightsteelblue]

     \def\SlideTitle#1{\page\framed[frame=off, background=color, %
        backgroundcolor=gray:9]{\slidetitle{#1}}}

    \starttext

     \SlideTitle{Product Characteristics and Quality}

     % This tikz content should appear on the same page as the title,
but it appears
      % on a new page. If I use \subject{Product Characteristics and
Quality} then
      % the tikz content appears on the same page.

     \starttikzpicture[remember picture, overlay]
       \node[xshift=2in, yshift=2in] at (current page.north west)
            [text width = 2in]{Weight?}
     \stoptikzpicture

    % The following content appears on another page after the tikz
content. This is independent
    % of whether I use \SlideTitle or \subject. How can I make all of
these appear on the same page?

     MORE CONTENT HERE


     \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] 2+ messages in thread

* Re: problem with tikz remember picture and overlay.
  2011-03-07 13:02 problem with tikz remember picture and overlay Curiouslearn
@ 2011-03-07 14:13 ` Curiouslearn
  0 siblings, 0 replies; 2+ messages in thread
From: Curiouslearn @ 2011-03-07 14:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi All,

I realized one error in my tikz code. I forgot the semi-colon. But
with the semi-colon, the tikz part is completely ignored.

Anyhow, in a previous post here I found a good example of absolute
positioning of text using Context's positioning macro. That is awesome
for my current purpose. Thanks Peter for that (and of course, Hans for
everything).

But would still like to learn if Tikz's absolute positioning is
incompatible with Context.

Bharat

On Mon, Mar 7, 2011 at 8:02 AM, Curiouslearn <curiouslearn@gmail.com> wrote:
> Hello,
>
> I am trying to use tikz's remember picture and overlay for absolute
> positioning. With the code below, the content in the tikz picture
> appears on a new page after the slide title. I want it to appear on
> the same page. Please see the minimal example below. I have explained
> with comments where the problem occurs.
>
> Thanks for your help.
>
>    \setuppapersize[S6][S6]
>    \setuplayout[backspace=0.5in, width=middle, header=0.25in,
>      topspace=0.25in, height=middle]
>    \setupbackgrounds[page][background=color, backgroundcolor=linen]
>    \setupwhitespace[medium]
>    \setuppagenumbering[location=]
>    \setupcolors[state=start]
>    \setupinteraction[state=start,color=blue]
>    \setupcolor[xwi]
>
>    \definehead[slidetitle][subject]
>    \setuphead[slidetitle][style=\tfb,
>                           color=lightsteelblue]
>
>    \def\SlideTitle#1{\page\framed[frame=off, background=color, %
>        backgroundcolor=gray:9]{\slidetitle{#1}}}
>    \usemodule[simplefonts]
>    \setmainfont[Helvetica]
>    \switchtobodyfont[20pt]
>
>    \definehead[slidetitle][subject]
>    \setuphead[slidetitle][style=\tfb,
>                           color=lightsteelblue]
>
>     \def\SlideTitle#1{\page\framed[frame=off, background=color, %
>        backgroundcolor=gray:9]{\slidetitle{#1}}}
>
>    \starttext
>
>     \SlideTitle{Product Characteristics and Quality}
>
>     % This tikz content should appear on the same page as the title,
> but it appears
>      % on a new page. If I use \subject{Product Characteristics and
> Quality} then
>      % the tikz content appears on the same page.
>
>     \starttikzpicture[remember picture, overlay]
>       \node[xshift=2in, yshift=2in] at (current page.north west)
>            [text width = 2in]{Weight?}
>     \stoptikzpicture
>
>    % The following content appears on another page after the tikz
> content. This is independent
>    % of whether I use \SlideTitle or \subject. How can I make all of
> these appear on the same page?
>
>     MORE CONTENT HERE
>
>
>     \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] 2+ messages in thread

end of thread, other threads:[~2011-03-07 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-07 13:02 problem with tikz remember picture and overlay Curiouslearn
2011-03-07 14:13 ` Curiouslearn

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