1
\begin{table}[H]
\center
\begin{tabularx}{\textwidth}{| l | X |}
    \hline
    \textbf{Daten} & \textbf{XXX}
    \hline
    \textit{Crawler} & 
        \begin{itemize}
            \item task
            \item crawl
        \end{itemize} \\
    \textit{Disk} & 
        \begin{itemize}
            \item flash
        \end{itemize} \\
    \hline
\end{tabularx}
\caption
[test2]
{test1}
\label{tab:test}
\end{table} 

This gives methe following error: ! Misplaced \noalign. \hline ->\noalign

Can someone help me please? I am kinda new to LaTeX

  • 2
    Welcome to TeX.SX! Try a \\ right after \textbf{XXX}. If that doesn't help please add the essential information to make your code a MWE (minimal yet containing documentclass and needed packages). – TeXnician Sep 9 '17 at 10:27
  • 1
    unrelated to the error but also \center is not a latex command (it is the internal definition of \begin{center}) use \centering. – David Carlisle Sep 9 '17 at 10:28
  • Sometimes it helps masking the itemize environment in something like a parbox. – TeXnician Sep 9 '17 at 11:51
1

you miss one \\ ... (as mentioned in above comments).

off-topics: see if the following changes (based on added packages) is interesting to you:

\documentclass[12pt]{article}
\usepackage{tabularx}
\usepackage{enumitem} % added
\usepackage{etoolbox} % added
\AtBeginEnvironment{table}{%
         \setlist[itemize]{ nosep,     % <-- new list setup
                            topsep     = 0pt,
                            partopsep  = 0pt,
                            leftmargin = *,
                            before     = \vspace{-0.6\baselineskip},
                            after      = \vspace{-\baselineskip}
                            }}
\usepackage[labelfont=bf, textfont=bf]{caption}

\begin{document}
    \begin{table}[ht] % changed
\centering % changed/corrected
\begin{tabularx}{\textwidth}{| l | X |}
\hline
\textbf{Daten} & \textbf{XXX}       \\ % <--- missing \\
\hline
\textit{Crawler} &
    \begin{itemize}
        \item task
        \item crawl
    \end{itemize} \\
\textit{Disk} &
    \begin{itemize}
        \item flash
    \end{itemize} \\
\hline
\end{tabularx}
\caption
[test2]
{test1}
\label{tab:test}
    \end{table}
\end{document}

enter image description here

note: caption of tables are usual above table. to achieve this, just move caption before tabularx.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.