我正在用minipage
它设计我的论文标题页。我有两列,我发现的问题是两列中的文本高度不一样。
\begin{minipage}{0.4\textwidth}
By:\\
Student Number:\\[3ex]
Supervisor:\\
Supervisor:\\[3ex]
Place, \today
\end{minipage}
\begin{minipage}{0.6\textwidth}
Christian Lastname\\
12345678\\[3ex]
Name\\
Loooooooooooooooooooooooooooooooooong name\\[3ex]
$~~$
\end{minipage}
您有什么办法可以让所有线条都处于平等地位吗?
答案1
您必须在这里使用环境[t]
的顶部对齐参数minipage
。
% arara: lualatex
% you may use pdflatex, just remove the package I've loaded
\documentclass{article}
\usepackage{lua-visual-debug} % just for demo
\begin{document}
\noindent % this was missing
\begin{minipage}[t]{0.4\textwidth}
By:\\
Student Number:\\[\baselineskip]
Supervisor:\\
Supervisor:\\[\baselineskip]
Place, \today
\end{minipage}% <= this percent sign was missing
\begin{minipage}[t]{0.6\textwidth}
Christian Lastname\\
1234578\\[\baselineskip]
Name\\
Loooooooooooooooooooooooooooooooooong name\\[\baselineskip]
\end{minipage}
\end{document}