ミニページの高さがテキストボックスと同じではありません

ミニページの高さがテキストボックスと同じではありません

を使用するとminipage、2 番目の列にテキスト ボックスが表示されます。2 番目の列で使用するとfbox、1 番目の列のテキストが下に移動するため、両側の高さが同じにはなりません。コードは次のとおりです。

\begin{minipage}[t]{0.5\textwidth}
\textbf{Items:}
\begin{itemize}
\item Item1
\item Item2
\item Item3
\item Item3
\end{itemize}
\textcolor{red}{\textbf{Def:}} Cumulative distribution function (cdf ): is the probability that the variable takes a value less than or equal to X.

    \textbf{Items:}
    \begin{itemize}
    \item Item1 
    \item Item1
    \item Item1
    \item Item1
    \end{itemize}
    \textcolor{red}{\textbf{Def:}}  TCumulative distribution function (cdf ): is the probability that the variable takes a value less than or equa l to X.
    \end{minipage}
    %second column
    \begin{minipage}[t]{0.5\textwidth}
    \fbox{%
      \parbox{\textwidth}{%
        \begin{center}
          Useful mnemonics:
          \begin{itemize}
          \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
          \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
          \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
          \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
          \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
          \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
          \end{itemize}
        \end{center}
      }%
    }

    \end{minipage}

このコードの出力は次のようになります。
ここに画像の説明を入力してください

両方の列 (またはミニページ) が同じ高さになるように配置するにはどうすればよいか教えてください。 ありがとうございます!

答え1

ここに画像の説明を入力してください

\begin{minipage}[T]{0.48\textwidth}
\textbf{Items:}
\begin{itemize}
\item Item1
\item Item2
\item Item3
\item Item3
\end{itemize}
\textcolor{red}{\textbf{Def:}} Cumulative distribution function (cdf ): is the probability that the variable takes a value less than or equal to X.

    \textbf{Items:}
    \begin{itemize}
    \item Item1 
    \item Item1
    \item Item1
    \item Item1
    \end{itemize}
    \textcolor{red}{\textbf{Def:}}  TCumulative distribution function (cdf ): is the probability that the variable takes a value less than or equa l to X.
    \end{minipage}
    %second column
    \begin{minipage}[T]{0.48\textwidth}
    \fbox{%
      \parbox{\textwidth}{%
        \centering
          Useful mnemonics:
          \begin{itemize}
          \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
          \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
          \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
          \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
          \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
          \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
          \end{itemize}
      }%
    }
    \end{minipage}

[T]を揃えるオプションを使用しminipage、 を残して水平方向のスペースをすべて使い切らないようにしてください0.02\textwidth。たとえば、\begin{minipage}[T]{0.48\textwidth}は OK です。

答え2

これにより、 が\parbox...2 つのminipage環境に揃えられ、 を使用して不適切なボックスが修正され\noindent、 間のスペースが削除されminipage、 の幅が狭くなって、\parboxの行と余白のためのスペースが確保されます\fbox

\documentclass{article}
\usepackage{xcolor}
\begin{document}
\noindent
\begin{minipage}[t]{0.5\textwidth}
\textbf{Items:}
\begin{itemize}
  \item Item1
  \item Item2
  \item Item3
  \item Item3
\end{itemize}
\textcolor{red}{\textbf{Def:}} Cumulative distribution function (cdf ): is the probability that the variable takes a value less than or equal to X.

\textbf{Items:}
\begin{itemize}
  \item Item1
  \item Item1
  \item Item1
  \item Item1
\end{itemize}
\textcolor{red}{\textbf{Def:}}  TCumulative distribution function (cdf ): is the probability that the variable takes a value less than or equa l to X.
\end{minipage}%
\begin{minipage}[t]{0.5\textwidth}
\fbox{%
  \parbox[t]{.95\textwidth}{%
    \begin{center}
      Useful mnemonics:
      \begin{itemize}
        \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
        \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
        \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
        \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
        \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
        \item "OIL RIG -- \textbf{O}xidation \textbf{I}s \textbf{L}oss of electrons, \textbf{R}eduction \textbf{I}s \textbf{G}ain of electrons
      \end{itemize}
    \end{center}
  }%
}%
\end{minipage}
\end{document}

不良ボックスなしで整列

関連情報