Hello Smart People of Latex Planet;

I have this following table:

\DeclareGraphicsExtensions{.pdf, .jpg}


\caption{Reservoir parameters}
\hline  Parameter & low & mid & high & Unit \\
\hline  Initial Flow Rates ($\textit{q$_{i-prod}$}$) &  1 & 10  & 20 & MMscfd \\

Although it seems like a very basic table as a minimum working example, it produces the following table when I want to have fixed-width column. It can be seen that the second column is super wide, it also gives overfull bad box warning. The table works just fine if I change |p{2cm}| to |c|.

enter image description here

I have tried 10+ different packages, 20 different answers similar to my problem to fix it; none of them worked successfully. I am using my university's template, '.cls', '.sty' files, whatever the problem is, to find it a bit advanced for my latex knowledge. Also the template is not my creation that makes it tougher to modify. I should have created my own latex file but it's too late for that now.

As advised, I included the packages that I am using..

  • 1
    Welcome to TeX.SE! A quick hint: If you indent lines of LaTeX code by four spaces, they will be nicely formatted automatically. Inline snippets of LaTeX code are best surrounded by backticks. Talking about code snippets: It's really very helpful to post entire MWEs (minimum working examples that start with \documentclass and end with \end{document}) in order to give folks a chance to diagnose the problem. – Mico Jun 5 '14 at 21:58
  • I just tried putting your table in my document and it does not behave in that way, it has a 2cm wide column. I assume the previous line just says \begin{table} by the way... If not, perhaps you could expand your example code? – FionaSmith Jun 5 '14 at 22:02
  • Please make your example code into a complete document that demonstrates the problem (don't just link to your full code) – David Carlisle Jun 5 '14 at 22:23
  • esm.psu.edu/~gray/PSUThesis.zip here it is! – user54076 Jun 5 '14 at 22:24
  • @Burak No! edit the code in the question above so it makes a small 1-table document that demonstrates the problem. – David Carlisle Jun 5 '14 at 22:24

Given the provided psuthesis.cls and the following MWE:



\caption{Reservoir parameters}
\hline  Parameter & low & mid & high & Unit \\
\hline  Initial Flow Rates ($\textit{q$_{i-prod}$}$) &  1 & 10  & 20 & MMscfd \\

it looks like you have a conflict between the pdfsync and array packages. Uncommenting both of them causes the problem. For your future information, I arrived at this by taking your code, making a compilable document, and commenting out lines until only those two packages remained.

If I were going to guess, I'd say to drop pdfsync. I've never used it, and don't know that it's particularly required for anything currently. Always go through a list of provided packages to know if you really need them or not. Odds are, whoever made this list of packages (you, or someone else) never needed a p column type.

And finally, assuming you're a PSU student, this question should have gone first to Dr. Gray, since it's his document class. If you're not a PSU student, then I'm surprised their document class matches your university's requirements.

| improve this answer | |
  • I added the packages that I am using. document class file is a bit long to post it here I think. – user54076 Jun 5 '14 at 22:15
  • You wouldn't post the entire class file. A link to where it's hosted at your university might be sufficient. – Mike Renfro Jun 5 '14 at 22:16
  • Now I see it's psuthesis. Hope it's the same one I found here. – Mike Renfro Jun 5 '14 at 22:17
  • esm.psu.edu/~gray/PSUThesis.zip here it is! – user54076 Jun 5 '14 at 22:17
  • 3
    You get exactly the same problem with pdfsync using just the article class, so the psuthesis class is innocent. If you really want to have pdfsync then use \usepackage[novbox]{pdfsync} instead. – Andrew Jun 5 '14 at 23:10

Your Answer

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