固定內嵌縮排

固定內嵌縮排

我想對齊從一行中間開始的內容和從下一行開頭開始的內容(對於論文授權提交頁面)。例如:

Major Professor:        ___________________________ Date: _________________
                        Professor Name, Ph.D.

我看到的一個例子是組合\indent空格和不間斷空格(反斜線空格)。這有點混亂並且很難做到恰到好處,因為 \indent 添加了一個固定的空格而不是跳到縮排等級(如 MS Word)。

有什麼方法可以跳到行中間的固定縮排等級(例如,進入正文 2 吋)?或者有更好的方法來做到這一點嗎?

這段程式碼說明了我正在做的事情:

\noindent{}M\indent{}A\\
\indent{}B % does not line up!

我想要這樣的東西:

\noindent{}M\fixindent{1in}A\\
\fixindent{1in}B % lines up!

答案1

與一個tabular

 \documentclass{article}
\begin{document}
  \noindent
  \begin{tabular}{@{}p{0.35\textwidth}@{}p{0.3\textwidth}p{0.075\textwidth}p{0.2\textwidth}@{}}
    Major Professor: &                        & Date: &     \\\cline{2-2}\cline{4-4}
  \rule{0pt}{3ex}                   & Professor name, Ph.D.  &       &
  \end{tabular}
\end{document}

在此輸入影像描述

相關內容