
을 사용하는 동안 minipage
두 번째 열에 텍스트 상자가 있습니다. 두 번째 열을 사용하면 fbox
첫 번째 열의 텍스트가 아래쪽으로 이동하므로 높이가 양쪽에서 동일하게 유지되지 않습니다. 코드는 다음과 같습니다.
\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}
괜찮습니다.
답변2
이는 를 \parbox...
두 minipage
환경에 맞춰 정렬하고 를 사용하여 잘못된 상자를 수정하고 s \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}