4

This is an example picture. I want to make my table like that.

enter image description here

Here what I am doing.

\documentclass{svjour3}
\usepackage{tabularx}
\captionsetup{labelfont=bf, justification=raggedleft, singlelinecheck=false, position=above}

\begin{document}

\begin{table}[ht]
\caption{Definitions of symbols}
\label{Symbols}       % Give a unique label
\begin{tabular}{ll}
\hline\noalign{\smallskip}
    {Symbol} & {Definition} \\
\noalign{\smallskip}\hline\noalign{\smallskip}
    {$\mathcal{G}$} & Graph \\
    {$\mathcal{M}$} & Adjacency matrix \\
    {$N$} & Vertices \\
    {$E$} & Edges \\
\noalign{\smallskip}\hline
\end{tabular}
\end{table}

\end{document}
  • 3
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Stefan Pinnow Jan 6 at 8:29
  • 1
    Thanks, @StefanPinnow for your attention to my question. – Umair Chauhan Jan 6 at 9:00
6

A solution that uses the sidecap package:

\documentclass{article}
\usepackage{tabularx,caption}
\usepackage[leftcaption]{sidecap}
\captionsetup{labelfont=bf, justification=raggedleft, singlelinecheck=false}

\begin{document}
\renewcommand{\sidecaptionsep}{1cm} % to be adjusted
\begin{SCtable}[][ht]
\caption{Definitions of symbols}
\label{Symbols}       % Give a unique label
\begin{tabular}{ll}
\hline\noalign{\smallskip}
    {Symbol} & {Definition} \\
\noalign{\smallskip}\hline\noalign{\smallskip}
    {$\mathcal{G}$} & Graph \\
    {$\mathcal{M}$} & Adjacency matrix \\
    {$N$} & Vertices \\
    {$E$} & Edges \\
\noalign{\smallskip}\hline
\end{tabular}
\end{SCtable} 

\end{document}

enter image description here

  • @Umair Chauhen If any solution solves your problem please mark it as acepted by clicking the appropriate mark! – Hafid Boukhoulda Jan 7 at 11:51
7

with help of floatrow:

enter image description here

\documentclass{svjour3}
\usepackage{booktabs}
\usepackage{floatrow}

\begin{document}
\begin{table}[htb]
\floatbox[{\capbeside\thisfloatsetup{capbesideposition={left,top},capbesidewidth=4cm}}]{table}[\FBwidth]
{\caption{A test figure with its caption side by side}\label{fig:test}}
{\begin{tabular}{ll}
    \toprule
Symbol          &   Definition          \\
    \midrule
$\mathcal{G}$   &   Graph               \\
$\mathcal{M}$   &   Adjacency matrix    \\
$N$             &   Vertices            \\
$E$             &   Edges               \\
    \bottomrule
 \end{tabular}}
\end{table}

or

\begin{table}[htb]
\floatbox[{\capbeside\thisfloatsetup{capbesideposition={right,top},capbesidewidth=4cm}}]{table}[\FBwidth]
{\caption{A test figure with its caption side by side}\label{fig:test}}
{\begin{tabular}{ll}
    \toprule
Symbol          &   Definition          \\
    \midrule
$\mathcal{G}$   &   Graph               \\
$\mathcal{M}$   &   Adjacency matrix    \\
$N$             &   Vertices            \\
$E$             &   Edges               \\
    \bottomrule
 \end{tabular}}
\end{table}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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