1

As seen in the picture below, the content of table goes too much to right. how can i correct my code so that text does not mix with the header of page.

Tnx in Advance

enter image description here

\begin{landscape}
\begin{longtable}{ *{4}{l} }

\caption{Übersicht aller gefundenen Publikationen} \\
\hline\endfirsthead
\caption[]{Übersicht aller gefundenen Publikationen}\\
\endhead
\hline
\endfoot
\label{table}
%\hline\endhead  % header material
%\hline\endfoot  % footer material


Methode & Datenbank & Stichworte oder zitierter Artikel & Referenzen  \\

\hline  

Subjektives Heraussuchen der Abstracts & Kombination & \parbox[t]{8cm}{\enquote{pressure} AND \enquote{protein}}&  
\parbox[t]{5cm}{~\cite{ibrahim_investigation_2021}, ~\cite{penhallurick_how_2021}, ~\cite{rajeshwar_t_mechanical_2021}, ~\cite{hata_high_2020}, ~\cite{samways_grand_2020}}\\

\end{longtable}
\end{landscape}
1
  • 2
    it is same as tabular you have specified *{4}{l} so 4 columns each with one line as wide as the content, with no line wrapping. Make at least the first column p{3cm} or whatever width works. so the text wraps to that width. Commented Jul 21, 2021 at 16:16

1 Answer 1

0

Like this?

enter image description here

(red lines shows page layout)

As you see, this table not need to be in landscape orientation (reasoning / guessing based on given information about table content):

\documentclass{article}
\usepackage{geometry}
\usepackage{ragged2e}
\usepackage{array, booktabs, longtable}
\newcolumntype{L}[1]{>{\RaggedRight}p{#1}}

\usepackage{csquotes}

\begin{document}
    \begin{longtable}{@{} L{0.25\linewidth} l 
                          L{0.3\linewidth} 
                          L{0.2\linewidth} @{}}
\caption{Übersicht aller gefundenen Publikationen}
\label{table}                                           \\
    \toprule
\endfirsthead
\caption[]{Übersicht aller gefundenen Publikationen}    \\
\endhead
    \midrule
\endfoot
    \bottomrule
\endlastfoot
%
Methode 
    &   Datenbank 
        &   Stichworte oder\newline zitierter Artikel 
            &   Referenzen                          \\
    \midrule
Subjektives Heraussuchen der Abstracts 
    &   Kombination 
        &   \enquote{pressure} AND \enquote{protein} 
            &   \cite{ibrahim_investigation_2021},
                \cite{penhallurick_how_2021}, 
                \cite{rajeshwar_t_mechanical_2021}, 
                \cite{hata_high_2020}, 
                \cite{samways_grand_2020}       \\
\end{longtable}
\end{document}
2
  • Thanks a lot! it actually worked but I got another issue! For me the first titel of the first column , called "Methode" is not at the same height as the rest of the column headers. Maybe you coulld also help me in this case?
    – Amirus
    Commented Jul 24, 2021 at 16:42
  • okay I could solve the problem on my own, thanks anyways!
    – Amirus
    Commented Jul 24, 2021 at 17:03

You must log in to answer this question.

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