I got a bad problem with the width of my table. I can't get the point why its so wide.
I'm using latexmk.
Here's my code:
\documentclass[final,12pt,abstracton,oneside,a4paper,
bibliography=totocnumbered,
listof=totoc]{scrreprt}
% my imports
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{lastpage}
\usepackage[usenames,dvipsnames]{color}
\usepackage[ngerman, num]{isodate}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{pdfsync}
\usepackage{enumerate}
\usepackage{listings}
\usepackage[square]{natbib}
\usepackage{setspace}
\usepackage{rotating}
% import from used template
\usepackage{amsfonts}
\usepackage{tabularx}
\usepackage[right]{eurosym}
\usepackage[printonlyused]{acronym}
\usepackage{paralist}
\usepackage{parskip}
\usepackage[titles]{tocloft}
\usepackage[pdfpagelabels=true]{hyperref}
% define paper geometry
\geometry{a4paper, left=20mm, top=27mm, right=20mm, bottom=27mm, headsep=10mm,bindingoffset=10mm}
\fancypagestyle{plain}{
\lhead{}
\renewcommand{\headrulewidth}{0.4pt}
}
\pagestyle{fancy}
\lhead{\leftmark}
\chead{}
\rhead{\thepage}
\cfoot{}
\begin{document}
% titlepage toc tof and so on...
\begin{table}[h]
\begin{tabularx}{\textwidth}{lX}
\hline
Event & Description \\
\hline
\texttt{SomeOfMyEvents} & Description of the events goes here...
large large texts should be here line 1
large large texts should be here line 2
large large texts should be here line 3
large large texts should be here line 4
large large texts should be here line 5
large large texts should be here line 6
large large texts should be here line 7
large large texts should be here line 8
large large texts should be here line 9
large large texts should be here line 10
large large texts should be here \\
\hline
\end{tabularx}
\caption{caption}
\label{tab:cap}
\end{table}
% ...
\end{document}
and my result looks like this:

The rule wit the romic II is my textwidth. How you can see this table is much wider than textwidh. If I try to set the width to 0.5\textwidth only the hline's of the table will be as half as long, the columns stay the same.
I even tried wit package tabulary, tabu, and tabular* with p{4cm}p{4cm} didn't work either. I'm running out of ideas. I hope some one has a better idea on this purpose.
EDIT:
I added more real code. Now only the name of the events and the content of my description varies.
EDIT #2:
Due to comments i added the complete preamble of my document. The picture i show is the output of my code shown above.
lXbecause the X should held long lines of text. But it is generating the table wrong too. According to the documentation oftabularx|ythe table should have the width of my text and the X should be automatically set. Specifying two XX doesn't work properly either. – Marschal Jun 28 '14 at 15:41\documentclassto\end{document}and show the image of the output from that code – David Carlisle Jun 28 '14 at 16:03! LaTeX Error: \l@subfigure undefined.Once latex generates an error you should not be surprised about any typeset result, tex's recovery actions try to let it continue they do not try to make a sensible typeset result – David Carlisle Jun 28 '14 at 16:16