2

When I try to fix the width of columns in my table (using tabular with p), the column widths are wider than I specify. When I try different widths, the widths should change but they don't. Here is the code that I used:

\documentclass[11pt]{article}
\usepackage{graphicx} 
\usepackage[protrusion=true,expansion=true]{microtype}
\usepackage{wrapfig} 
\usepackage{pdfsync, fullpage, setspace, amsmath, amsthm, amssymb, amsfonts, natbib, lscape, tikz, array, float, caption, appendix, url, longtable, color}
\usepackage[top=1.5in, bottom=1.5in, left=1in, right=1in]{geometry}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage{rotating}

\begin{document}

\begin{table}
\begin{tabular}{p{1in}p{1in}p{1in}} 
\\[-1.8ex]\hline 
\hline \\[-1.8ex] 
Column 1 & Column 2 & Column 3  \\ 
Long Long Long Long & Long Long Long Long & Long Long Long Long  \\ 
\hline 
\hline 
\end{tabular} 
\end{table} 

\end{document}

I end up getting something like this:

My latex table output

Why doesn't p doesn't work?

4
  • 2
    after adding missed part of your document code (\begin{document}, \end{document} i can't reproduce your problem (as i expected). so, it is not clear, what is your problem.
    – Zarko
    May 13, 2019 at 17:31
  • If you really used that code you should get errors. May 13, 2019 at 17:31
  • I can confirm that after adding \begin{document} and \end{document} the code compiles as it should. I also changed the column width, without problem.
    – Sveinung
    May 13, 2019 at 17:37
  • 2
    See also What is the status of pdfsync, posted back in October 2010. From the user guide of the pdfsync package: "You should not use pdfsync on final documents because it can change the layout rather significantly."
    – Mico
    May 13, 2019 at 17:39

1 Answer 1

6

You shouldn't load packages you don't know about. And most likely you don't know about pdfsync that has been obsolete for several years and is only useful nowadays for spoiling the typesetting.1

It turns out that with a recent TeX distribution (TeX Live 2018 or later), the problem does not appear, while it happens with earlier versions.

Just remove pdfsync.


1 The package was meant to provide links between the source code and the PDF file, but its method was heavy and buggy. Nowadays SyncTeX works better and doesn't require additional packages.

1
  • I removed pdfsync and it works. Thanks! May 13, 2019 at 17:39

You must log in to answer this question.

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