答案1
我认为完成对齐的最简单方法不是使用\hfill
而是tabular
或tabularx
环境:
\documentclass[]{article}
\usepackage{geometry}
\usepackage{array}
\usepackage{tabularx}
\begin{document}
\noindent
\begin{tabularx}{\linewidth}{
@{}
>{\bfseries}X
>{\centering}X
r
@{}}
~\textsc{Education}\\
\hline
Udacity & Machine Learning Nanodegree & Aug. 2014 -- Sept. 2015\cr
Singapore Management University & M.S. in Data Management and Analytics & Aug.
2014 -- Aug. 2015\\
\end{tabularx}
\end{document}
答案2
我不确定你在哪里看到问题,但如果它是线路的末端:
\linebreak
与段落分隔符有所不同。设置\parfillskip
为 0pt 并使用\par
或\\
分隔两者:
{%
\parfillskip=0pt
\noindent \textbf{Udacity} \hfill
Machine Learning Nanodegree \hfill
Aug. 2014 -- Sept. 2015
\par %or \\ here
\noindent \textbf{Singapore Management University} \hfill
M.S. in Data Management and Analytics \hfill
Aug. 2014 -- Aug. 2015
\par %important.
}