表格和侧边标题的问题

表格和侧边标题的问题

我正在努力将标题放在表格旁边。当我使用 SCtable 执行此操作时,它弄乱了页面顶部的文本,并使其出现在表格下方。还有其他方法可以做到这一点吗?

另外,如何在标题之间留出垂直空间;使用\vspace没有任何效果。

\documentclass[12pt]{article}

\usepackage[a4paper,margin=1cm,footskip=.5cm]{geometry}
%\usepackage{showframe}
\usepackage{sidecap,wasysym,array,tabularx,caption}
\pagenumbering{gobble}

\newcommand\textbox[1]{%
  \parbox{.333\textwidth}{#1}%
}

\begin{document}

\noindent\textbox{Date: \underline{\hspace{3cm}}\hfill}\textbox{\hfil \textsc{\LARGE Content}\hfil}\textbox{\hfill}

\vspace{.5cm}

%\begin{flushleft}
\setlength{\tabcolsep}{50pt}
\renewcommand{\arraystretch}{1.2}
\begin{SCtable}
\caption*{``Caption 1''\\
    ``Caption 2''\\
    ``Caption 3''\\
    ``Caption 4''}
\begin{tabular}{| c | c | m{.05mm} |}
    \hline
    Time & Task & Tick \\ \hline
    $00:00 - 01:00$ & & $\Box$ \\ \hline
    $01:00 - 02:00$ & & $\Box$ \\ \hline
    $02:00 - 03:00$ & & $\Box$ \\ \hline
    $03:00 - 04:00$ & & $\Box$ \\ \hline
    $04:00 - 05:00$ & & $\Box$ \\ \hline
    $05:00 - 06:00$ & & $\Box$ \\ \hline
    $06:00 - 07:00$ & & $\Box$ \\ \hline
    $07:00 - 08:00$ & & $\Box$ \\ \hline
    $08:00 - 09:00$ & & $\Box$ \\ \hline
    $09:00 - 10:00$ & & $\Box$ \\ \hline
    $10:00 - 11:00$ & & $\Box$ \\ \hline
    $11:00 - 12:00$ & & $\Box$ \\ \hline
    $12:00 - 13:00$ & & $\Box$ \\ \hline
    $13:00 - 14:00$ & & $\Box$ \\ \hline
    $14:00 - 15:00$ & & $\Box$ \\ \hline
    $15:00 - 16:00$ & & $\Box$ \\ \hline
    $16:00 - 17:00$ & & $\Box$ \\ \hline
    $17:00 - 18:00$ & & $\Box$ \\ \hline
    $18:00 - 19:00$ & & $\Box$ \\ \hline
    $19:00 - 20:00$ & & $\Box$ \\ \hline
    $20:00 - 21:00$ & & $\Box$ \\ \hline
    $21:00 - 22:00$ & & $\Box$ \\ \hline
    $22:00 - 23:00$ & & $\Box$ \\ \hline
    $23:00 - 00:00$ & & $\Box$ \\ \hline
    \multicolumn{2}{|c|}{Total} & \multicolumn{1}{c|}{} \\
    \hline
\end{tabular}
\end{SCtable}

\vspace{.3cm}

\begin{flushleft}
\setlength{\tabcolsep}{10pt}
\renewcommand{\arraystretch}{.9}
\begin{tabular}{l c r}
    & & \textsc{Content} \\
    Sub 1 & $\Box$ & \hrulefill \\
    Sub 2 & $\Box$ & \hrulefill \\
    Sub 3 & $\Box$ & \hrulefill \\
    Sub 4 & $\Box$ & \hrulefill \\
    Sub 5 & $\Box$ & \hrulefill \\
    Sub 6 & $\Box$ & \hrulefill \\
    Sub 7 & $\Box$ & \hrulefill \\
    Sub 8 & $\Box$ & \hrulefill \\
    Sub 9 & $\Box$ & \hrulefill \\
    Sub 10 & $\Box$ & \hrulefill \\
    Sub 11 & $\Box$ & \hrulefill \\
\end{tabular}

\vspace{.3cm}

\mbox{\textsc{Content}
\setlength{\tabcolsep}{6.5pt}
\renewcommand{\arraystretch}{.9}
\begin{tabular}{|c|c|c|c|c|}
    \hline
    $\star$ \hspace{.5cm} $\Box$ & $\star\star$ \hspace{.5cm} $\Box$ & $\star\star\star$ \hspace{.5cm} $\Box$ & $\star\star\star\star$ \hspace{.5cm} $\Box$ & $\star\star\star\star\star$ \hspace{.5cm} $\Box$ \\
    \hline
    & & & & \\
    \hline
\end{tabular}}

\vspace{.2cm}

Suggestions/Remarks

\underline{\hspace{13cm}}
\underline{\hspace{13cm}}
\underline{\hspace{13cm}}

\end{flushleft}
\end{document}

答案1

我假设您想要一个非浮动的浮动对象:

\begin{SCtable}[\sidecaptionrelwidth][h]

\sidecaptionrelwidth是第一个可选参数的默认值,必须给出该默认值才能设置第二个可选参数。

Right side表格右侧带有星号的示例:

\documentclass[12pt]{article}

\usepackage[a4paper,margin=1cm,footskip=.5cm]{geometry}
%\usepackage{showframe}
\usepackage{sidecap,wasysym,array,tabularx,caption}
\pagenumbering{gobble}

\newcommand\textbox[1]{%
  \parbox{.333\textwidth}{#1}%
}

\begin{document}

\noindent\textbox{Date: \underline{\hspace{3cm}}\hfill}\textbox{\hfil
\textsc{\LARGE Content}\hfil}\textbox{\hfill}

\vspace{.5cm}

%\begin{flushleft}
\setlength{\tabcolsep}{50pt}
\renewcommand{\arraystretch}{1.2}
\begin{SCtable}[\sidecaptionrelwidth][h]
\caption*{``Caption 1''\\
    ``Caption 2''\\
    ``Caption 3''\\
    ``Caption 4''}
\begin{tabular}{| c | c | m{.05mm} |}
    \hline
    Time & Task & Tick \\ \hline
    $00:00 - 01:00$ & & $\Box$ \\ \hline
    $01:00 - 02:00$ & & $\Box$ \\ \hline
    $02:00 - 03:00$ & & $\Box$ \\ \hline
    $03:00 - 04:00$ & & $\Box$ \\ \hline
    $04:00 - 05:00$ & & $\Box$ \\ \hline
    $05:00 - 06:00$ & & $\Box$ \\ \hline
    $06:00 - 07:00$ & & $\Box$ \\ \hline
    $07:00 - 08:00$ & & $\Box$ \\ \hline
    $08:00 - 09:00$ & & $\Box$ \\ \hline
    $09:00 - 10:00$ & & $\Box$ \\ \hline
    $10:00 - 11:00$ & & $\Box$ \\ \hline
    $11:00 - 12:00$ & & $\Box$ \\ \hline
    $12:00 - 13:00$ & & $\Box$ \\ \hline
    $13:00 - 14:00$ & & $\Box$ \\ \hline
    $14:00 - 15:00$ & & $\Box$ \\ \hline
    $15:00 - 16:00$ & & $\Box$ \\ \hline
    $16:00 - 17:00$ & & $\Box$ \\ \hline
    $17:00 - 18:00$ & & $\Box$ \\ \hline
    $18:00 - 19:00$ & & $\Box$ \\ \hline
    $19:00 - 20:00$ & & $\Box$ \\ \hline
    $20:00 - 21:00$ & & $\Box$ \\ \hline
    $21:00 - 22:00$ & & $\Box$ \\ \hline
    $22:00 - 23:00$ & & $\Box$ \\ \hline
    $23:00 - 00:00$ & & $\Box$ \\ \hline
    \multicolumn{2}{|c|}{Total} & \multicolumn{1}{c|}{} \\
    \hline
\end{tabular}
\end{SCtable}

\vspace{.3cm}

\begin{flushleft}
\setlength{\tabcolsep}{10pt}
\renewcommand{\arraystretch}{.9}
\begin{tabular}{l c r}
    & & \textsc{Content} \\
    Sub 1 & $\Box$ & \hrulefill \\
    Sub 2 & $\Box$ & \hrulefill \\
    Sub 3 & $\Box$ & \hrulefill \\
    Sub 4 & $\Box$ & \hrulefill \\
    Sub 5 & $\Box$ & \hrulefill \\
    Sub 6 & $\Box$ & \hrulefill \\
    Sub 7 & $\Box$ & \hrulefill \\
    Sub 8 & $\Box$ & \hrulefill \\
    Sub 9 & $\Box$ & \hrulefill \\
    Sub 10 & $\Box$ & \hrulefill \\
    Sub 11 & $\Box$ & \hrulefill \\
\end{tabular}

\vspace{.3cm}

\mbox{\textsc{Content}
\setlength{\tabcolsep}{6.5pt}
\renewcommand{\arraystretch}{.9}
\begin{tabular}{|c|c|c|c|c|}
    \hline
    $\star$ \hspace{.5cm} $\Box$ & $\star\star$ \hspace{.5cm} $\Box$ &
$\star\star\star$ \hspace{.5cm} $\Box$ & $\star\star\star\star$
\hspace{.5cm} $\Box$ & $\star\star\star\star\star$ \hspace{.5cm} $\Box$ \\
    \hline
    & & & & \\
    \hline
\end{tabular}}\quad
Right side

\vspace{.2cm}

Suggestions/Remarks

\underline{\hspace{13cm}}
\underline{\hspace{13cm}}
\underline{\hspace{13cm}}

\end{flushleft}

结果第 1 页

相关内容