1

I'm working on putting captions beside a table. When I used SCtable to do so, it messed up the top text on my page and made it appear below the table. Is there any other way I can do this?

Also, how can I put vertical space between the captions; using \vspace doesn't have any effect.

\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}
6
  • Welcome to TeX.SX! Sep 3, 2015 at 4:11
  • @HeikoOberdiek :) Sep 3, 2015 at 4:15
  • Please, make a complete file with the missing packages and settings. Also putting the float object SCtable into flushleft, does not make sense, because the table floats away leaving an empty flushleft environment. Sep 3, 2015 at 4:25
  • Made a complete file and also removed flushleft from SCtable. Sep 3, 2015 at 10:28
  • Can you also tell me how I could write something in the empty space on the right of the box containing stars. :) Should I make use of twocolumn? Sep 3, 2015 at 10:30

1 Answer 1

0

I assume you want to have a non-floating float object:

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

\sidecaptionrelwidth is the default for the first optional parameter, which must be given in order to set the second optional argument.

Example with Right side to the right side of the tabular with stars:

\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}

Result page 1

8
  • Sorry, I meant the empty space above it, sorry. And \vspace messes up the distance between captions when I put sentences as captions, is there any other way I can put spaces between the captions? Sep 3, 2015 at 10:39
  • @VinayakMehta Pretty unclear to me. The captions 1 to 4 are separated by \\, this could be changed to \\[1cm] to add additional space. Sep 3, 2015 at 10:41
  • I'm trying to make the captions evenly spaced along the height of the table, will do what you said and report back. Sep 3, 2015 at 10:44
  • That worked! Thanks @HeikoOberdiek! :D Just one last question, to put a table in that empty space above star table, should I just follow the normal way? Guess I'll have to try first but it would be awesome if you could give some pointers. Thanks again! Sep 3, 2015 at 10:53
  • @VinayakMehta You can put the tabular in the same line as the left tabular. There is an optional argument of tabular for the vertical alignment (t = top, b = bottom, default is centered). Sep 3, 2015 at 10:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .