
mientras usa minipage
, en la segunda columna hay un cuadro de texto. Cuando utilicé fbox
la segunda columna, el texto de la primera columna va hacia abajo, por lo que la altura no permanece igual en ambos lados. Aquí está el código;
\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}
y el resultado de este código es así;
Por favor dígame cómo puedo organizarlas para que ambas columnas (o minipáginas) permanezcan a la misma altura. ¡Gracias!
Respuesta1
\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}
Utilice la [T]
opción para alinear minipage
s y no utilice todo el espacio horizontal dejando 0.02\textwidth
, por ejemplo, \begin{minipage}[T]{0.48\textwidth}
estará bien.
Respuesta2
Esto alinea el \parbox...
con los dos minipage
entornos y arregla las cajas defectuosas usando \noindent
, eliminando el espacio entre los minipage
s y reduciendo el ancho del \parbox
para dejar espacio para la línea y el margen de \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}