4

Even when I put the longtable after all headlines, it appears before the \paragraph headline.

How can I change that?

MWE:

\documentclass{scrartcl}

\usepackage{longtable}
\usepackage{booktabs}
\usepackage{hyperref}       



\begin{document}

\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\paragraph{Paragraph}

\begin{longtable}[]{@{}ll@{}}
\toprule
\endhead
\begin{minipage}[t]{0.66\columnwidth}\raggedright
Inspected Web Service\strut
\end{minipage} & \begin{minipage}[t]{0.28\columnwidth}\raggedright
\url{http://europa.eu}\strut
\end{minipage}\tabularnewline
\begin{minipage}[t]{0.66\columnwidth}\raggedright
Start Time\strut
\end{minipage} & \begin{minipage}[t]{0.28\columnwidth}\raggedright
2018-06-19 10:22:56 +0200\strut
\end{minipage}\tabularnewline
\begin{minipage}[t]{0.66\columnwidth}\raggedright
End Time\strut
\end{minipage} & \begin{minipage}[t]{0.28\columnwidth}\raggedright
2018-06-19 10:23:49 +0200\strut
\end{minipage}\tabularnewline
\bottomrule
\end{longtable}

Here some Text

\end{document}
6
  • 3
    paragraph is an inline heading, it needs some text after it. Add e.g. ~ after the \paragraph: \paragraph{Paragraph}~. Jun 20, 2018 at 8:00
  • @UlrikeFischer oops..when I am adding an answer, your comments have come and I didnt notice this. Exactly the same answer. Sorry for that.
    – David
    Jun 20, 2018 at 8:15
  • @David That is not a problem. This is not a race here with only one winner. Jun 20, 2018 at 8:17
  • @UlrikeFischer True.. I have learnt latex from you and others like David Christle, moewe, etc. I always grateful for that. Your active response in this forum gives us to post the answer as soon as possible for the benefit of the user.
    – David
    Jun 20, 2018 at 8:25
  • Is there a reason for using minipage instead of declaring \begin{longtable}{@{}p{0.66\columnwidth}p{0.28\columnwidth}@{}}?
    – egreg
    Jun 20, 2018 at 8:35

1 Answer 1

5

There should be some text in the paragraph.

\documentclass{scrartcl}

\usepackage{longtable}
\usepackage{booktabs}
\usepackage{hyperref}       



\begin{document}



    \section{Section}
    \subsection{Subsection}
    \subsubsection{Subsubsection}
    \paragraph{Some paragraph} Some should be here

    \begin{longtable}[]{@{}ll@{}}
        \toprule
        \endhead
        \begin{minipage}[t]{0.66\columnwidth}\raggedright
            Inspected Web Service\strut
        \end{minipage} & \begin{minipage}[t]{0.28\columnwidth}\raggedright
            \url{http://europa.eu}\strut
        \end{minipage}\tabularnewline
        \begin{minipage}[t]{0.66\columnwidth}\raggedright
            Start Time\strut
        \end{minipage} & \begin{minipage}[t]{0.28\columnwidth}\raggedright
            2018-06-19 10:22:56 +0200\strut
        \end{minipage}\tabularnewline
        \begin{minipage}[t]{0.66\columnwidth}\raggedright
            End Time\strut
        \end{minipage} & \begin{minipage}[t]{0.28\columnwidth}\raggedright
            2018-06-19 10:23:49 +0200\strut
        \end{minipage}\tabularnewline
        \bottomrule
    \end{longtable}


    \paragraph{Some paragraph}\mbox{}

    \begin{longtable}[]{@{}ll@{}}
        \toprule
        \endhead
        \begin{minipage}[t]{0.66\columnwidth}\raggedright
            Inspected Web Service\strut
        \end{minipage} & \begin{minipage}[t]{0.28\columnwidth}\raggedright
            \url{http://europa.eu}\strut
        \end{minipage}\tabularnewline
        \begin{minipage}[t]{0.66\columnwidth}\raggedright
            Start Time\strut
        \end{minipage} & \begin{minipage}[t]{0.28\columnwidth}\raggedright
            2018-06-19 10:22:56 +0200\strut
        \end{minipage}\tabularnewline
        \begin{minipage}[t]{0.66\columnwidth}\raggedright
            End Time\strut
        \end{minipage} & \begin{minipage}[t]{0.28\columnwidth}\raggedright
            2018-06-19 10:23:49 +0200\strut
        \end{minipage}\tabularnewline
        \bottomrule
    \end{longtable}


    Here some Text

\end{document}

If you dont want any text, simply put \mbox{} followed by an empty line.

Output:

enter image description here

2
  • 1
    The braces might lead to the idea that \paragraph wants two arguments; I also think that an explicit empty object is better than some random spacing.
    – egreg
    Jun 20, 2018 at 8:47
  • yeah... You are correct. I should not have used { }. thanks.
    – David
    Jun 20, 2018 at 8:49

You must log in to answer this question.

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