我怎样才能将两段文本并排放置?

我怎样才能将两段文本并排放置?

我是 LaTeX 新手,知识很少。我一直在尝试使用 minipage、grouping、flushleft/flushright 等技术,以便将 2 段文本(我喜欢将其想象为 MS Word 中调用的单独文本框)并排排列,并在顶部对齐。

由于我的知识非常有限,我无法提供任何 LaTeX 示例。

我将非常感激任何帮助。

答案1

有几种可能性:

在此处输入图片描述

\documentclass{article}

\begin{document}

\setlength\parskip{1cm}

\section*{tabular}

\begin{tabular}{p{3cm}p{4cm}}
\raggedright
some text here on the left some text here on the left   &
\raggedleft
some more text on the right some more text on the right
\end{tabular}


\begin{tabular}{p{3cm}p{4cm}}
\centering
some text here on the left some text here on the left   &
\centering
some more text on the right some more text on the right
\end{tabular}

\section*{parbox}

\parbox[t]{3cm}{
\raggedright
some text here on the left some text here on the left}%
\hspace{1cm}%
\parbox[t]{4cm}{
\raggedleft
some more text on the right some more text on the right}

\parbox[t]{3cm}{
\centering
some text here on the left some text here on the left}%
\hspace{1cm}%
\parbox[t]{4cm}{
\centering
some more text on the right some more text on the right}

\section*{minipage}

\begin{minipage}[t]{3cm}
\raggedright
some text here on the left some text here on the left
\end{minipage}%
\hspace{1cm}%
\begin{minipage}[t]{4cm}
\raggedleft
some more text on the right some more text on the right
\end{minipage}

\begin{minipage}[t]{3cm}
\centering
some text here on the left some text here on the left
\end{minipage}%
\hspace{1cm}%
\begin{minipage}[t]{4cm}
\centering
some more text on the right some more text on the right
\end{minipage}



\end{document}

相关内容