1

So I have a table with lots of columns. Because of this there's a lot of space on the left (i.e. \parindent) and very little space on the right of the table:

Too much space on the right

Here's the relevant code:

{\scriptsize\begin{tabular}{ | l | l | l | c | c | c | c | c | c | }
\hline
\textbf{Term} & \textbf{Subject} & \textbf{Subject Name} & \textbf{Max} & \textbf{Min} & \textbf{Marks} & \textbf{Credits} & \textbf{Passed in} & \textbf{Remark} \\
~ & \textbf{Code} & ~ & \textbf{Marks} & \textbf{Marks} & \textbf{Obtained} & ~ & \textbf{Exam} & ~ \\ \hline
I. & IT-41 & Mathematics-I & 100 & 40 & 69 & 4 & Dec, 2009 & ~ \\ \hline
I. & IT-2 & Communication Skill & 100 & 40 & 62 & 3 & Dec, 2009 & ~ \\ \hline
\multirow{2}{*}{I.} & \multirow{2}{*}{IT-4} & Electronic Devices and & \multirow{2}{*}{200} & \multirow{2}{*}{80} & \multirow{2}{*}{136} & \multirow{2}{*}{6} & \multirow{2}{*}{Dec, 2009} & ~ \\
~ & ~ & Circuit-I & ~ & ~ & ~ & ~ & ~ & ~ \\ \hline
\multirow{2}{*}{I.} & \multirow{2}{*}{IT-35} & Fundamentals of Computer & \multirow{2}{*}{120} & \multirow{2}{*}{48} & \multirow{2}{*}{105} & \multirow{2}{*}{6} & \multirow{2}{*}{Dec, 2009} & ~ \\
~ & ~ & \& Networking System & ~ & ~ & ~ & ~ & ~ & ~ \\ \hline
I. & IT-37 & Engineering Graphics & 150 & 60 & 121 & 6 & Dec, 2009 & ~ \\ \hline
II. & IT-42 & Mathematics-II & 100 & 40 & 73 & 4 & May, 2010 & ~ \\ \hline
\multirow{2}{*}{II.} & \multirow{2}{*}{IT-7} & Electronic Devices and & \multirow{2}{*}{200} & \multirow{2}{*}{80} & \multirow{2}{*}{148} & \multirow{2}{*}{6} & \multirow{2}{*}{May, 2010} & ~ \\
~ & ~ & Circuit-II & ~ & ~ & ~ & ~ & ~ & ~ \\ \hline
II. & IT-8 & Programming in C++ & 200 & 80 & 178 & 6 & May, 2010 & ~ \\ \hline
II. & IT-9 & Physics & 200 & 80 & 149 & 8 & May, 2010 & ~ \\ \hline
\multirow{2}{*}{II.} & \multirow{2}{*}{IT-10} & Development of Generic & \multirow{2}{*}{100} & \multirow{2}{*}{40} & \multirow{2}{*}{59} & \multirow{2}{*}{3} & \multirow{2}{*}{May, 2010} & ~ \\
~ & ~ & Skill & ~ & ~ & ~ & ~ & ~ & ~ \\ \hline
III. & IT-11 & Digital Electronics & 200 & 80 & 165 & 6 & Dec, 2010 & ~ \\ \hline
III. & IT-12 & System Programming & 175 & 70 & 138 & 6 & Dec, 2010 & ~ \\ \hline
\multirow{2}{*}{III.} & \multirow{2}{*}{IT-13} & Database Management & \multirow{2}{*}{200} & \multirow{2}{*}{80} & \multirow{2}{*}{124} & \multirow{2}{*}{6} & \multirow{2}{*}{Dec, 2010} & ~ \\
~ & ~ & System (DBMS) & ~ & ~ & ~ & ~ & ~ & ~ \\ \hline
\multirow{2}{*}{III.} & \multirow{2}{*}{IT-15} & Elements of Computer & \multirow{2}{*}{175} & \multirow{2}{*}{70} & \multirow{2}{*}{123} & \multirow{2}{*}{6} & \multirow{2}{*}{Dec, 2010} & ~ \\
~ & ~ & Engineering & ~ & ~ & ~ & ~ & ~ & ~ \\ \hline
III. & IT-16 & Software Engineering & 175 & 70 & 132 & 6 & Dec, 2010 & ~ \\ \hline
IV. & IT-17 & Data Structure & 200 & 80 & 168 & 6 & May, 2011 & ~ \\ \hline
\multirow{2}{*}{IV.} & \multirow{2}{*}{IT-18} & Computer Peripheral \& & \multirow{2}{*}{175} & \multirow{2}{*}{70} & \multirow{2}{*}{121} & \multirow{2}{*}{6} & \multirow{2}{*}{May, 2011} & ~ \\
~ & ~ & Devices & ~ & ~ & ~ & ~ & ~ & ~ \\ \hline
IV. & IT-19 & Communication System & 200 & 80 & 103 & 7 & Dec, 2011 & ~ \\ \hline
\multirow{2}{*}{IV.} & \multirow{2}{*}{IT-36} & Fundamentals of Operating & \multirow{2}{*}{175} & \multirow{2}{*}{70} & \multirow{2}{*}{127} & \multirow{2}{*}{6} & \multirow{2}{*}{May, 2011} & ~ \\
~ & ~ & Systems & ~ & ~ & ~ & ~ & ~ & ~ \\ \hline
IV. & IT-21 & Visual Basic & 175 & 70 & 118 & 6 & May, 2011 & ~ \\ \hline
IV. & IT-43 & Open Source Technology & 95 & 38 & 50 & 4 & May, 2011 & ~ \\ \hline
V. & IT-23 & Fiber Optic Communication & 150 & 60 & 112 & 6 & Dec, 2011 & ~ \\ \hline
V. & IT-24 & Network \& Security & 175 & 70 & 117 & 6 & Dec, 2011 & \# \\ \hline
V. & IT-25 & Computer Graphics & 175 & 70 & 130 & 6 & Dec, 2011 & \# \\ \hline
V. & IT-26 & TCP/IP Internet & 120 & 48 & 99 & 6 & Dec, 2011 & \# \\ \hline
V. & IT-38 & Multimedia \& Animation & 200 & 80 & 154 & 7 & Dec, 2011 & ~ \\ \hline
VI. & IT-30 & Project & 200 & 80 & 151 & 9 & May, 2012 & \# \\ \hline
VI. & IT-31 & Web Technology & 150 & 60 & 126 & 6 & May, 2012 & \# \\ \hline
VI. & IT-32 & E-Commerce & 150 & 60 & 113 & 6 & May, 2012 & \# \\ \hline
VI. & IT-34 & Information Technology & 200 & 80 & 156 & 6 & May, 2012 & \# \\ \hline
\multirow{2}{*}{VI.} & \multirow{2}{*}{IT-39} & Object Oriented Modeling & \multirow{2}{*}{200} & \multirow{2}{*}{80} & \multirow{2}{*}{157} & \multirow{2}{*}{6} & \multirow{2}{*}{May, 2012} & \multirow{2}{*}{\#} \\
~ & ~ & \& Design & ~ & ~ & ~ & ~ & ~ & ~ \\ \hline
\end{tabular}}

How do I make the table align in such a way that there's an equal amount of space on the left as well as on the right?

5
  • 2
    When asking questions it is better to provide a full minimal working example (MWE) both in order to demonstrate what you are trying to do and to help others help you. The MWE should like like \documentclass...\begin{document}...\end{document}, it should compile and contain close to the minimal amount of code needed to explain/demonstrate what you are asking. This saves a lot of time for everyone.
    – user30471
    Oct 20, 2014 at 3:39
  • Why not \begin{center}...\end{center} ...? The equal amount of space depends on the margin values...
    – user31729
    Oct 20, 2014 at 3:44
  • 2
    The main problem with your table is that it's considerably wider than the text block. This is quite independent of the value of \parindent. Other than reducing the font size or shrinking the entire table with a command such as \resizebox, you might want to look into simplifying the table's contents considerably.
    – Mico
    Oct 20, 2014 at 5:21
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Oct 20, 2014 at 9:03
  • Related: centering tables Oct 20, 2014 at 9:04

1 Answer 1

1

I solved the problem by using \resizebox from the graphicx package as follows:

\resizebox{\textwidth}{!}{
    \begin{tabular}{...}
        ...
    \end{tabular}
}

The result was as follows:

enter image description here

Just what I wanted.

You must log in to answer this question.

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