Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need to place a minipage on the top of a page. I use the t option, but seems not working.

\usepackage{abbrevs}
\usepackage{adjustbox}
\usepackage{floatrow}
\usepackage{graphicx}
\usepackage{latexsym}
\usepackage{paralist}
\usepackage{pgfplots, pgfplotstable}
\usepackage{subfig}
\usepackage{tikz}
\usepackage{times}

\begin{minipage}[t]{0.8\textwidth}
      \begin{minipage}[b]{0.4\textwidth}
        \centering
        \adjustbox{width=0.7\textwidth} {
          \begin{tikzpicture}[text centered, nodes = {draw, minimum size = 22mm}]
            \matrix at (0, 0)
                    {
                      \node {$ 1 $}; & \node {$ 1 $}; \\
                      \node {$ *1 $}; & \node {$ *1 $}; \\
                    };
          \end{tikzpicture}
        }
        \captionof{figure}{fig 1.}
      \end{minipage}%
    \hfill
      \begin{minipage}[b]{0.46\textwidth}
        \centering
        \adjustbox{width=1.2\textwidth} {
          \begin{tikzpicture}[text centered, nodes = {draw, minimum size = 12mm}]
            \matrix at (0, 0)
                    {
                      \node {$ 2 $}; & \node {$ \forall $}; \\
                      \node {$ 2 $}; & \node {$ 2 $}; \\
                    };
          \end{tikzpicture}
        }
        \captionof{figure}{fig 2.}
      \end{minipage}
    \end{minipage}
share|improve this question
    
Please add a complete minimal example illustrating the problem mentioned. –  Gonzalo Medina Mar 13 '12 at 18:09
    
Perhaps you want to place the minipage above the text area? –  Gonzalo Medina Mar 13 '12 at 18:26
    
To add to Gonzalo Medina's question, maybe he/she needs it as a watermark. –  Ahmed Musa Mar 13 '12 at 18:48
    
Hi all, thanks for replies. I wish the final effect seems like \begin{figure}[t], not in the top margin. Because there are two figures in the minipage, I cannot use figure to wrap the minipage again. –  xando Mar 13 '12 at 19:03
    
@Kejia柯嘉: Please provide a minimal example. –  Marco Daniel Mar 13 '12 at 19:19
add comment

1 Answer

The [t] option does not represent where the minipage will be placed on the page, but actually represents the internal alignment of the material.

If you want the minipage to be put at the top of a page, you can put it into a floating environment- either a figure or table (or you could even create your own if you wanted to).

So, the following would get you closer to what you want

\begin{figure}[!t]
    \begin{minipage}{.3\textwidth}
    ...
    \end{minipage}
\end{figure}

Of course, now that your minipage is floating, it may not be in the order that you desire with respect to your other content. If you don't want it to float, then you might also look into \clearpage or \newpage

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.