我想在一页上放置两个表格,但是它不会位于页面顶部。这是代码:
\documentclass[
a4paper,
12pt,
blue,
rgb,
]{tubsbook}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage{listings}
\usepackage{hyperref}
\usepackage{array,multirow}
\newcommand\mcbf[1]{\multicolumn{2}{|c|}{\textbf{#1}}}
\newcommand\mlbf[1]{\multicolumn{2}{|l|}{\textbf{#1}}}
\usepackage{graphicx}
\usepackage[activate]{pdfcprot}
\begin{document}
\begin{table}[htb]
\centering
\renewcommand\arraystretch{1.2}
\begin{tabular}{|>{\bfseries}c|>{\bfseries}l|c|}
\hline
\mcbf{Cortex A9 Parameters} & \textbf{Values} \\ \hline
\mcbf{Core clock} & 800 MHz \\ \hline
\multirow{5}{*}{L2} & Size & 512 kB \\ \cline{2-3}
& Associativity & 8 \\ \cline{2-3}
& Latency & 8 \\ \cline{2-3}
& MSHRs & 11 \\ \cline{2-3}
& Write buffers & 9 \\ \hline
\multirow{4}{*}{L1 - I} & Size & 32 kB \\ \cline{2-3}
& Associativity & 4 \\ \cline{2-3}
& Latency & 1 \\ \cline{2-3}
& MSHRs & 2 \\ \hline
\multirow{5}{*}{L1 - D} & Size & 32 kB \\ \cline{2-3}
& Associativity & 4 \\ \cline{2-3}
& Latency & 1 \\ \cline{2-3}
& MSHRs & 4 \\ \cline{2-3}
& Write buffers & 16 \\ \hline
{Stride prefetcher} & Degree & 1 \\ \hline
\multirow{2}{*}{Global BP} & Entries & 4096 \\ \cline{2-3}
& Bits & 2 \\ \hline
\mlbf{BTB entries} & 4096 \\ \hline
\mlbf{Return Address Stack (RAS) entries} & 8 \\ \hline
\mlbf{Issues width} & 2 \\ \hline
\mlbf{Pipeline stages} & 8 \\ \hline
\mlbf{Physical INT registers} & 62 \\ \hline
\mlbf{Physical FP registers} & 256 \\ \hline
\mlbf{IQ entries} & 32 \\ \hline
\mlbf{LSQ entries} & 8 / 8 \\ \hline
\mlbf{ROB entries} & 40 \\ \hline
\end{tabular}%
\caption{My caption}
\label{my-label}
\end{table}
\end{document}
答案1
参见:一页上的两个表格。
\documentclass[
a4paper,
12pt,
blue,
rgb,
]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage{listings}
\usepackage{hyperref}
\usepackage{array,multirow}
\newcommand\mcbf[1]{\multicolumn{2}{|c|}{\textbf{#1}}}
\newcommand\mlbf[1]{\multicolumn{2}{|l|}{\textbf{#1}}}
\usepackage{graphicx}
\usepackage[activate]{pdfcprot}
\usepackage[margin=1in]{geometry}
\begin{document}
\begin{table}[p]
\centering
\renewcommand\arraystretch{1.2}
\begin{tabular}{|>{\bfseries}c|>{\bfseries}l|c|}
\hline
\mcbf{Cortex A9 Parameters} & \textbf{Values} \\ \hline
\mcbf{Core clock} & 800 MHz \\ \hline
\multirow{5}{*}{L2} & Size & 512 kB \\ \cline{2-3}
& Associativity & 8 \\ \cline{2-3}
& Latency & 8 \\ \cline{2-3}
& MSHRs & 11 \\ \cline{2-3}
& Write buffers & 9 \\ \hline
\multirow{4}{*}{L1 - I} & Size & 32 kB \\ \cline{2-3}
& Associativity & 4 \\ \cline{2-3}
& Latency & 1 \\ \cline{2-3}
& MSHRs & 2 \\ \hline
\multirow{5}{*}{L1 - D} & Size & 32 kB \\ \cline{2-3}
& Associativity & 4 \\ \cline{2-3}
& Latency & 1 \\ \cline{2-3}
& MSHRs & 4 \\ \cline{2-3}
& Write buffers & 16 \\ \hline
{Stride prefetcher} & Degree & 1 \\ \hline
\multirow{2}{*}{Global BP} & Entries & 4096 \\ \cline{2-3}
& Bits & 2 \\ \hline
\mlbf{BTB entries} & 4096 \\ \hline
\mlbf{Return Address Stack (RAS) entries} & 8 \\ \hline
\mlbf{Issues width} & 2 \\ \hline
\mlbf{Pipeline stages} & 8 \\ \hline
\mlbf{Physical INT registers} & 62 \\ \hline
\mlbf{Physical FP registers} & 256 \\ \hline
\mlbf{IQ entries} & 32 \\ \hline
\mlbf{LSQ entries} & 8 / 8 \\ \hline
\mlbf{ROB entries} & 40 \\ \hline
\end{tabular}%
\caption{My caption}
\label{my-label}
\end{table}
\begin{table}[p]
\centering
\renewcommand\arraystretch{1.2}
\begin{tabular}{|>{\bfseries}c|>{\bfseries}l|c|}
\hline
\mcbf{Cortex A9 Parameters} & \textbf{Values} \\ \hline
\mcbf{Core clock} & 800 MHz \\ \hline
\multirow{5}{*}{L2} & Size & 512 kB \\ \cline{2-3}
& Associativity & 8 \\ \cline{2-3}
& Latency & 8 \\ \hline
\end{tabular}%
\caption{My caption}
\label{my-label2}
\end{table}
\end{document}