3
\documentclass[11pt, oneside]{article}
\usepackage{geometry}
\geometry{a4paper}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{arydshln}
\usepackage[table]{xcolor}
\usepackage{pifont}

\begin{document}

\begin{center} \renewcommand*\arraystretch{1.2}

\scalebox{1}[1]{|c|{\begin{tabular}[t]{|rrl||c|c|c|c||c|} \hline\multicolumn{3}|} & {\sc{c1}} & {\sc{c2}} & {\sc{c3}} & {\sc{c4}} & {\textit{H}} \\[0.5ex]

\& & & {\textit{w=7}} & {\textit{w=3}} & {\textit{w=3}} & {\textit{w=1}} & \\

\hline \hline a. & \ding{43} & {O1} & & -3 & & -1 & -4 \\

\hline b. & & {O2} & & -3 & -3 & -1 & -7 \\

\hline c. & \ding{43} & {O3} & & & -3 & -1 & -4 \\

\hline \end{tabular} \renewcommand*\arraystretch{1} \end{center}

\end{document}
Au101
  • 10,278

2 Answers2

4

I suggest to simplify your syntax quite a bit:

  • instead of the center environment, which adds additional vertical spaces, you could use \centering

  • the \scalebox{1}{1}{...} does not have any effect (scales both directions by 1), thus can be left out

  • your second row has not enough entries, I suspect one empty cell is missing at the start

  • two-letter font commands are deprecated, see Does it matter if I use \textit or \it, \bfseries or \bf, etc (and just my personal opinion, the combination between small caps and numbers looks odd...)

  • for better spacing put your equations w=3 in math mode instead of italics, same for all the negative numbers. This will give you real minus signs instead of hyphens

  • many of the {} around the cells are unnecessary (thank to @Au101 for pointing this out in the comments)

  • and what Werner and Simon say in their comments below your question

and please have a look at http://betterposters.blogspot.com/2012/08/the-data-prison.html

\documentclass[11pt, oneside]{article}
\usepackage{geometry}
\geometry{a4paper}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{arydshln}
\usepackage[table]{xcolor}
\usepackage{pifont}

\begin{document}

\begingroup
\centering
\renewcommand*\arraystretch{1.2}
\begin{tabular}[t]{|rrl||c|c|c|c||c|} 
    \hline
    \multicolumn{3}{|l}{} & \textsc{c1} & \textsc{c2} & \textsc{c3} & \textsc{c4} & \textit{H} \\[0.5ex]
    \& & & & $w=7$ & $w=3$ & $w=3$ & $w=1$ &\\
    \hline \hline 
    a. & \ding{43} & O1 & & $-3$ & & $-1$ & $-4$ \\
    \hline 
    b. & & O2 & & $-3$ & $-3$ & $-1$ & $-7$ \\
    \hline 
    c. & \ding{43} & O3 & & & $-3$ & $-1$ & $-4$ \\
    \hline 
\end{tabular}

\endgroup


\end{document}

enter image description here

3

Maybe this is what you want?

\documentclass[11pt, oneside]{article}
\usepackage{geometry}
\geometry{a4paper}
\usepackage{graphicx}
\usepackage{amsmath, amssymb}
\usepackage{hhline}
\usepackage{arydshln}
\usepackage[table]{xcolor}
\usepackage{pifont}

\begin{document}

\[ \renewcommand*\arraystretch{1.2}
\begin{array}
{|rrl||c|c|c|c||c|}
 \hhline{---||----||-}
\textsc{c1} & & & {\textsc{c2}} & {\textsc{c3}} & {\textsc{c4}} & {H} & \\[0.5ex]
\text{\&} & & {w=7} & {w=3} & {w=3} & {w=1} & & \\
\hhline{===::====::=}
a. & \text{\ding{43}} & {O1} & & -3 & & -1 & -4 \\
\hhline{---||----||-} b. & & {O2} & & -3 & -3 & -1 & -7 \\
\hhline{---||----||-}
 c. & \text{\ding{43}} & {O3} & & & -3 & -1 & -4 \\
\hhline{---||----||-}
 \end{array}\]%

\end{document}

enter image description here

Bernard
  • 271,350