
Bei der Verwendung minipage
befindet sich in der zweiten Spalte ein Textfeld. Wenn ich es fbox
in der zweiten Spalte verwendet habe, wird der Text der ersten Spalte nach unten verschoben, sodass die Höhe auf beiden Seiten nicht gleich bleibt. Hier ist der Code:
\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}
und die Ausgabe dieses Codes sieht wie folgt aus;
Sagen Sie mir bitte, wie ich sie so anordnen kann, dass beide Spalten (oder Miniseiten) auf der gleichen Höhe bleiben. Danke!
Antwort1
\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}
Verwenden Sie die [T]
Option zum Ausrichten minipage
von s und verbrauchen Sie nicht den gesamten horizontalen Platz 0.02\textwidth
, indem Sie beispielsweise stehen lassen \begin{minipage}[T]{0.48\textwidth}
. Das ist in Ordnung.
Antwort2
Dadurch wird die \parbox...
an die beiden minipage
Umgebungen angepasst und die fehlerhaften Felder werden durch die Verwendung von behoben \noindent
, der Leerraum zwischen den minipage
s wird entfernt und die Breite der reduziert, \parbox
um Platz für die Zeile und den Rand der zu schaffen \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}