对齐对象

对齐对象

我正在编写我的第一个正式规范文档,但在尝试将文本对齐到左侧并将表格对齐到右侧时遇到了麻烦。

谢谢。

    \begin{flushleft}

     A patient population includes an initially-empty set of patients(as identified as by their unique set as type $\mathbb{P})$. Each patient has some information about them of type $\mathbb{I})$ 
     \end{flushleft}


     \begin{flushright}
     \begin{tabular}{|l| c |r|}
     test\\
     \hline
     this is a test and this\\is a new line\\

     \end{tabular}
     \end{flushright}

答案1

这是一个解决方案,但它应该大概完成wrapfig或类似(取决于您的实际使用情况)。

\documentclass{article}

\begin{document}
\begin{minipage}[t]{.6\linewidth}
 A patient population includes an initially-empty set of patients
 (as identified as by their unique set as type $P$).
 Each patient has some information about them of type $I$) 
\end{minipage}
\hfill
\begin{tabular}[t]{|l| c |r|}
 test\\
 \hline
 this is a test and this\\is a new line\\
\end{tabular}
\end{document}

相关内容