2

I want to make a table.

\documentclass{book}
\usepackage{placeins}
\usepackage{longtable}
\usepackage{tabularx}
\begin{document}
    \FloatBarrier
    \begingroup
    \setlength\extrarowheight{11pt}
    \begin{center}
        \begin{longtable}{|c|c|l|c|}
            \caption{Daftar Saham untuk Perhitungan Indeks LQ45} \label{LQ45}\\
            \hline
            No.&Kode&Nama Saham&Keterangan\\
            \hline
            1.&ACES&Ace Hardware Indonesia Tbk.&\\
            \hline
            2.&ADRO&Adaro Energy Tbk.&\\
            \hline
            3.&AKRA&AKR Corporindo Tbk.&\\
            \hline
            \multicolumn{4}{p{\textwidth}}
            { 
              Source: blablabla
            }
        \end{longtable}
    \end{center}
    \endgroup
    \FloatBarrier
\end{document}

It gives me enter image description here

I want to make aligned to vertical line the source: blablabla. I give \hspace{-0.2cm} and i doesn't work. How to do that?

enter image description here

2
  • @{} will delete the excess space in the beginning -- have alook at the answer below
    – js bibra
    Commented Dec 8, 2020 at 8:22
  • 1
    thank you very much! @js bibra Commented Dec 8, 2020 at 8:28

1 Answer 1

2

enter image description here

\documentclass{book}
\usepackage{placeins}
\usepackage{longtable}
\usepackage{tabularx}
\begin{document}
    \FloatBarrier
    \begingroup
    \setlength\extrarowheight{11pt}
    \begin{center}
        \begin{longtable}{|c|c|l|c|}
            \caption{Daftar Saham untuk Perhitungan Indeks LQ45} \label{LQ45}\\
            \hline
            No.&Kode&Nama Saham&Keterangan\\
            \hline
            1.&ACES&Ace Hardware Indonesia Tbk.&\\
            \hline
            2.&ADRO&Adaro Energy Tbk.&\\
            \hline
            3.&AKRA&AKR Corporindo Tbk.&\\
            \hline
            \multicolumn{4}{@{}p{\textwidth}}
            { 
              Source: blablabla
            }
        \end{longtable}
    \end{center}
    \endgroup
    \FloatBarrier
\end{document}

You must log in to answer this question.

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