如何在 minipage 中平行对齐内容

如何在 minipage 中平行对齐内容

我无法在同一页上平行对齐内容。我需要包含在页面右侧的部分进入了第二页的右侧,尽管第一页的右侧仍然是空的。我在此附上图片。

\begin{flushright}
\begin{minipage}[t]{11cm}
    \vspace*{0.5cm}
    \begin{tcolorbox}[grow to right by = 0.75cm,colframe=white,colback=white]
        \section*{Education}
            \begin{tabular}{r l}
            xxxxx xxxxxxxxxxxxxx: & xxxxxxxxxxxxxxxxxxxxxxxxxxxxx \\
                                  & xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\
            xxxxxxxxxxxxxxxxxxx : & xxxxxxxxxxxxxxxxxxxxxxxx\\
                                  & xxxxxxxxxxxxxxxxxxxxxxxx \\
            
        \end{tabular}
    \end{tcolorbox}
\end{minipage}
\end{flushright}

答案1

您可以将两个小页面并排放置,其总宽度小于文本的宽度。

里面有表格环境。设置p列会处理长行格式,因此您无需为同一条目添加另一行。

A

这是完整的代码。

\documentclass[10pt,a4paper]{article}

\usepackage[left=2.00cm, right=2.00cm, top=4.00cm, bottom=3.00cm]{geometry}%% adjust margins

\usepackage{showframe}%only to see the margins

\begin{document}
    
\noindent
\begin{minipage}[t]{0.45\textwidth}
\section*{Skills}
    \small
    \renewcommand{\arraystretch}{2}% increase space between rows
    \begin{tabular}{r p{0.45\linewidth}}
        xxxxx xxxxxxxxxxxxxx: & There can be no doubt that the objects in space and time are
        what first give rise to human reason. \\                
        xxxxxxxxxxxxxxxxxxx : & Let us suppose that, indeed, our
        problematic judgements, indeed, can be treated like our concepts.\\                                 
    \end{tabular}
\end{minipage}
\hfill
\begin{minipage}[t]{0.45\textwidth}
\section*{Education}
    \small
    \renewcommand{\arraystretch}{2}% increase space between rows
    \begin{tabular}{r p{0.45\linewidth}}
        xxxxx xxxxxxxxxxxxxx: & There can be no doubt that the objects in space and time are
        what first give rise to human reason. \\                
        xxxxxxxxxxxxxxxxxxx : & Let us suppose that, indeed, our
            problematic judgements, indeed, can be treated like our concepts.\\                                 
    \end{tabular}
\end{minipage}

    
\end{document}

相关内容