[Tex/LaTex] minipage alignment with tikzpicture

beamerminipagetikz-pgf

I want to have one minipage containing a tikzpicture and on its right another minipage with a block, and tried with:

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,chains}
\usetikzlibrary{positioning}
\begin{document}
...
\begin{minipage}{0.75\textwidth}  
\begin{tikzpicture}  
\tikzset{base/.style={draw, on chain, on grid, align=center, minimum height=4ex},
 norm/.style={->, draw},
}
% -------------------------------------------------
    \node [base,text width=10cm] (one) {text in box};
    \end{tikzpicture}
    \end{minipage}%
    \begin{minipage}[b]{0.2\textwidth}
      \begin{block}{\huge Legend}
       ...
      \end{block}
    \end{minipage} 

However the two minipages become very distant (horizontally), as if the first minipage is aligned to the left margin and the second minipage is aligned to the right margin. Could anyone suggest what to do?

Best Answer

The snippet contains:

\end{minipage}%
\begin{minipage}...

Thus, there is no horizontal space between them. The second minipage can be moved to the right by:

\end{minipage}\hfill
\begin{minipage}...

and putting both minipages in a box:

\noindent
\hbox to \linewidth{%
  \begin{minipage}...
  \end{minipage}%
  \hfill
  \begin{minipage}...
  \end{minipage}%
}\par

Or as last line of a paragraph:

\begin{minipage}...
\end{minipage}%
\hfill
\begin{minipage}...
\end{minipage}%
{\setlength{\parfillskip}{0pt}\par}

With a full MWE, it would have been easier to provide the best code.