Increase width of columns
Set a length explicitly or use tabularx
:
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{parskip}
\usepackage{graphicx}
\usepackage[top=0.65 in,bottom=0.65 in,left=0.65 in,right=0.65in]{geometry}
\renewcommand{\baselinestretch}{1.20}
\usepackage{array}
\usepackage{tabularx}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\usepackage{booktabs}
\begin{document}
Set a length explicitly:
\begin{center}
\begin{tabular}[t]{|c|*{10}{C{.4in}|}}
\hline
Question & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\\hline
Answer & & & & & & & & & & \\\hline
\end{tabular}
\end{center}
Or use \texttt{tabularx}:
\begin{center}
\begin{tabularx}{\textwidth}{|c|*{10}{Y|}}
\hline
Question & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\\hline
Answer & & & & & & & & & & \\\hline
\end{tabularx}
\end{center}
This is just to show the canonical way to typeset tables with \texttt{booktabs}, as suggested by Peter Grill:
\begin{center}
\begin{tabularx}{\textwidth}{c*{10}{Y}}
\toprule
Question & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\
\midrule
Answer & & & & & & & & & & \\
\bottomrule
\end{tabularx}
\end{center}
\end{document}
Edit: one way to set the column height is to use
\setcellgapes
and
\makegapedcells
by makecell
, for other methods see here: Column and row padding in tables.
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{parskip}
\usepackage{graphicx}
\usepackage[top=0.65 in,bottom=0.65 in,left=0.65 in,right=0.65in]{geometry}
\renewcommand{\baselinestretch}{1.20}
\usepackage{array}
\usepackage{tabularx}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\usepackage{booktabs}
\usepackage{makecell}
\setcellgapes{.1in}
\begin{document}
Set a length explicitly:
\begin{center}
\makegapedcells
\begin{tabular}[t]{|c|*{10}{C{.4in}|}}
\hline
Question & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\\hline
Answer & & & & & & & & & & \\\hline
\end{tabular}
\end{center}
Or use \texttt{tabularx}:
\begin{center}
\makegapedcells
\begin{tabularx}{\textwidth}{|c|*{10}{Y|}}
\hline
Question & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\\hline
Answer & & & & & & & & & & \\\hline
\end{tabularx}
\end{center}
This is just to show the canonical way to typeset tables with \texttt{booktabs}, as suggested by Peter Grill:
\begin{center}
\makegapedcells
\begin{tabularx}{\textwidth}{c*{10}{Y}}
\toprule
Question & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\
\midrule
Answer & & & & & & & & & & \\
\bottomrule
\end{tabularx}
\end{center}
\end{document}
You can make the columns wider by increasing \tabcolsep
. Here is a before and after version of your table with \setlength{\tabcolsep}{10pt}
:
Also, I would recommend you look at the booktabs
package and the associated documentation. Here is an minimal example as your table doesn't really have any data:
Notes:
I removed the
{center}
environment as one should be using\centering
instead. See Should I use center or centering for figures and tables?.As CarLaTeX mentioned, with the MWE given in the question, it is ok to use the
{center}
environment (as it does not use thetable
environment). However, most will be using thetable
aroundtabular
, so thought it should be pointed out.
Code:
\documentclass{article}
\renewcommand{\baselinestretch}{1.20}
\begin{document}
\begin{tabular}[t]{|c|c|c|c|c|c|c|c|c|c|c|}
\hline
Question & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\\hline
Answer & & & & & & & & & & \\\hline
\end{tabular}
\begingroup
\setlength{\tabcolsep}{10pt}%
\begin{tabular}[t]{|c|c|c|c|c|c|c|c|c|c|c|}
\hline
Question & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\\hline
Answer & & & & & & & & & & \\\hline
\end{tabular}
\endgroup
\end{document}
Code: booktabs
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{tabular}[t]{lcccccccccc}
\toprule
Question & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\
%\cmidrule(lr){1-11}% <-- Not very useful here.
Answer & & & & & & & & & & \\
\bottomrule
\end{tabular}
\end{document}