O espaçamento antes e depois do tabular desaparece

O espaçamento antes e depois do tabular desaparece

Tenho alguns problemas com o espaçamento antes e depois tabulardas caixas. Quando minha tabela tem apenas uma linha, está tudo bem.

\documentclass{article}
\usepackage{setspace}

\begin{document}
\doublespacing
Some text.

\begin{tabular}{|l|}
\hline
Some text.\\
\hline
\end{tabular}

Some text.
\end{document}

Uma linha

Mas quando adiciono uma nova linha, o espaçamento antes e depois da tabela desaparece!

\begin{tabular}{|l|}
\hline
Some text.\\ \hline
Some text.\\
\hline
\end{tabular}

Duas linhas

O que devo fazer para corrigir isso?

Responder1

Se você não gosta flushleftde or center, você pode usar \vspace:

\documentclass{article}
\usepackage{setspace}

\begin{document}
    \doublespacing
    \noindent I think the best solution is with \texttt{flushleft} (or \texttt{center}) environment:

    \begin{flushleft}
        \begin{tabular}{|l|}
            \hline
            Some text.\\
            \hline
            Some text.\\
            \hline
        \end{tabular}
    \end{flushleft}
    Some text.

    \noindent However, you could use \textbackslash\texttt{vspace*} and set any spacing you want:\vspace*{.1\baselineskip}

    \noindent
    \begin{tabular}{|l|}
        \hline
        Some text.\\
        \hline
        Some text.\\
        \hline
    \end{tabular}\vspace*{.2\baselineskip}  

    \noindent Some text.
\end{document}

insira a descrição da imagem aqui

informação relacionada