Ignasi Furió | 1 Oct 16:45 2007
Picon
Picon

Problem with minipage + nodes + beamer

Hi all,

	I was not shure if my question is beamer or tikz related so excuse double  
posting.

	I want to place three tikzpictures on the same beamer slide. I also want  
to reference nodes inside pictures so I tried to use a tikzpicture which  
contains three nodes containing each one a minipage with the 'real'  
tikzpictures.

	One of my pictures shows a label over a path, the original pictures is  
correct, but when i include it inside a minipage inside a node, the label  
moves to the end of the path. Here you have a minimal example that shows  
this problem. I use beamer and pgf last week cvs versions.

\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}{Test}

%% A node which contains a tikzpicture inside a minipage environment
\begin{tikzpicture}
\node (trellis) {
\bgroup % why should I use bgroup and egroup?
\begin{minipage}{5.5cm}
     \begin{tikzpicture}[node distance=1.25cm,font=\tiny]
     \tikzstyle{n}=[circle,fill,minimum size=4pt,inner sep=0pt,outer  
sep=0pt]
     \tikzstyle{etiqueta}=[circle,fill=white,inner sep=0pt,font=\tiny]
             \node [n, label=left:$S_0$] (N-0-0) at (0,0) {};
(Continue reading)

Ignasi Furió | 2 Oct 11:38 2007
Picon
Picon

Re: Problem with minipage + nodes + beamer

>
> It's possible to resolve this problem with the use of midway
>
> \tikzstyle{etiqueta}=[circle,fill=white,inner sep=0pt,font=\tiny,midway]
>
>
> The rsult is the same with this code (below)
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \usepackage{tikz}
>
> \begin{document}
> \tikzstyle{n}=[circle,fill,minimum size=4pt,inner sep=0pt,outer sep=0pt]
> \tikzstyle{etiqueta}=[circle,fill=white,inner sep=0pt,font=\tiny]
> \begin{tikzpicture}
> \node (trellis)  {%
>    \begin{tikzpicture}[node distance=1.25cm,font=\tiny]
>        \node [n, label=left:$S_0$] (N00) at (0,0) {};
>        \node [n] (N01) at (1,0) {};
>        \draw (N00) -- node[etiqueta]{$00$} (N01);
> \end{tikzpicture}
> };
> \end{tikzpicture}
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>

Alain,

thank you for your answer, but it doesn't solve all problems.

What I was complaining about was that the same tikz code produces  
(Continue reading)

Alain Matthes | 2 Oct 11:58 2007
Picon

Re: Problem with minipage + nodes + beamer


Le 2 oct. 07 à 11:38, Ignasi Furió a écrit :

> \begin{tikzpicture}
> \node[inner sep=0pt,above right] (arbre) {
> \bgroup
> \begin{minipage}{4cm}
> \begin{tikzpicture}[level distance=6mm,font=\tiny, draw, thick]
>

1) Why [inner sep=0pt,above right] ?

2) Why bgroup ?

3) why minipage ?

The problem for me is 1) [inner sep=0pt,above right]

try this code : I get exactly the same result

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{trees}
\begin{document}
\tikzstyle{every child node}=[fill=white,rectangle,inner sep=1pt]
\tikzstyle{level 1}=[sibling distance=40mm]
\tikzstyle{level 2}=[sibling distance=20mm]
\tikzstyle{level 3}=[sibling distance=10mm]

\begin{frame}
(Continue reading)

Alain Matthes | 2 Oct 12:10 2007
Picon

Re: Problem with minipage + nodes + beamer


I think that's the word in relation with your problem is "inherited",  
it's like CSS cascade Style
for me, tikz is "CST" :)

Perhaps I'm wrong and T.Tantau can give to you  a better  
explanation  ...

Below, it's a part of the documentation :

"Second, which pos is chosen for the node? The position is inherited  
from the surrounding scope. However,
this holds only for nodes speci ed in this implicit way. Thus, if you  
add the option [near end] to a scope,
this does not mean that all nodes given in this scope will be put on  
near the end of lines. Only the nodes
for which an implicit pos is added will be placed near the end.  
Typically, this is what you want."

Best Regards Alain

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Ignasi Furió | 2 Oct 12:36 2007
Picon
Picon

Re: Problem with minipage + nodes + beamer

>
>> \begin{tikzpicture}
>> \node[inner sep=0pt,above right] (arbre) {
>> \bgroup
>> \begin{minipage}{4cm}
>> \begin{tikzpicture}[level distance=6mm,font=\tiny, draw, thick]
>>

> 1) Why [inner sep=0pt,above right] ?

Because is suggested at "PGF and TikZ examples gallery"
	http://www.fauskes.net/pgftikzexamples/connecting-text-and-graphics/
and I thought it was a good option.

------------------------
        \begin{tikzpicture}[show background grid]
             % Put the graphic inside a node. This makes it easy to place  
the
             % graphic and to draw on top of it.
             % The above right option is used to place the lower left corner
             % of the image at the (0,0) coordinate.
             \node [inner sep=0pt,above right]
                 {\includegraphics[width=4cm]{img/daniells-pile}};
------------------------

>
> 2) Why bgroup ?
>
> 3) why minipage ?
>
(Continue reading)

Kjell Magne Fauske | 2 Oct 13:26 2007
Picon

Re: Problem with minipage + nodes + beamer

The problems you are having, are indeed what Alain said, scoping
issues where options are inherited by subpictures.

On 10/2/07, Ignasi Furió <ignasi.furio <at> uib.es> wrote:
> >
> >> \begin{tikzpicture}
> >> \node[inner sep=0pt,above right] (arbre) {
> >> \bgroup
> >> \begin{minipage}{4cm}
> >> \begin{tikzpicture}[level distance=6mm,font=\tiny, draw, thick]
> >>
>
>
> > 1) Why [inner sep=0pt,above right] ?
>
> Because is suggested at "PGF and TikZ examples gallery"
>         http://www.fauskes.net/pgftikzexamples/connecting-text-and-graphics/
> and I thought it was a good option.
>

This example is slightly different because in the example an external
graphic is put inside a node. That's why it makes sense to set inner
sep=0pt and above right to get et lower left origin. When the contents
of the node is another tikzpicture the options are inherited and give
some odd results.

>
> >
> > 2) Why bgroup ?
> >
(Continue reading)

Alain Matthes | 2 Oct 13:51 2007
Picon

Re: Problem with minipage + nodes + beamer


Le 2 oct. 07 à 13:26, Kjell Magne Fauske a écrit :

> The problems you are having, are indeed what Alain said, scoping
> issues where options are inherited by subpictures.
>
>

kjell, I agree with all your answers.

Regards Alain

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Sakya Tripathy | 4 Oct 09:14 2007
Picon

Re: Error : Undefined Control Sequence.

I am trying to get the tikz package to load up


tex file:
--------------------------
\documentclass{beamer}


\mode<presentation>
{
\setbeamertemplate{background canvas}[vertical
shading][bottom=red!10,top=blue!10]

\usetheme{frankfurt}
\usefonttheme{default}
\setbeamercovered{dynamic}
}
\usepackage[english]{babel}
\usepackage{tikz}
\begin{document}
\begin{frame}
  \titlepage
\end{frame}
\end{document}
------------------------------

log file:
------------------------------
.
.
..
...
! Undefined control sequence.
l.1837 \pgfdeclareplotmark
                          {ball}
? H
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

?

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.1837 \pgfdeclareplotmark{b
                            all}
?
! Undefined control sequence.
l.1840   \shade
                (0,0) circle (\pgfplotmarksize);%
?
! Undefined control sequence.
l.1840   \shade (0,0) circle (\pgfplotmarksize
                                              );%
?
.
.....
.......
------------------------------------------

Can anyone help me please?
Thanks
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
Alain Matthes | 4 Oct 09:46 2007
Picon

Re: Error : Undefined Control Sequence.


Le 4 oct. 07 à 09:14, Sakya Tripathy a écrit :

> I am trying to get the tikz package to load up
>
>
> tex file:
> --------------------------
> \documentclass{beamer}
>
>
> \mode<presentation>
> {
> \setbeamertemplate{background canvas}[vertical
> shading][bottom=red!10,top=blue!10]

here why not :

[verticalshading,bottom=red!10,top=blue!10]

>
> \usetheme{frankfurt}
> \usefonttheme{default}
> \setbeamercovered{dynamic}
> }
> \usepackage[english]{babel}
> \usepackage{tikz}

\usetikzlibrary{plotmarks}

Alain 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Sakya Tripathy | 4 Oct 10:05 2007
Picon

Re: Error : Undefined Control Sequence.

Thanks for your reply.
But I am not able to get rid of the error. It continues to ruin my life..


On 10/4/07, Alain Matthes < alain.matthes <at> mac.com> wrote:

Le 4 oct. 07 à 09:14, Sakya Tripathy a écrit :

> I am trying to get the tikz package to load up
>
>
> tex file:
> --------------------------
> \documentclass{beamer}
>
>
> \mode<presentation>
> {
> \setbeamertemplate{background canvas}[vertical
> shading][bottom=red!10,top=blue!10]

here why not :

[verticalshading,bottom=red!10,top=blue!10]

>
> \usetheme{frankfurt}
> \usefonttheme{default}
> \setbeamercovered{dynamic}
> }
> \usepackage[english]{babel}
> \usepackage{tikz}

\usetikzlibrary{plotmarks}

Alain

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users

Gmane