如何在文件中的一行上製作 3 列?

如何在文件中的一行上製作 3 列?

我正在用 Latex 寫一份報告,其中一行我想有 3 個標題「案例 1」、「案例 2」和「案例 3」。如何僅針對文件中的某一行執行此操作?

答案1

這應該適用於一行。

\documentclass{article}
\begin{document}

\leavevmode\rlap{Long left text}\hfill
  Center text\hfill\llap{Right}\par

\end{document}

範例程式碼的輸出

這是處理三部分運行頭的“標準”方法。

答案2

這裡有2個建議:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\begin{document}
First line, indented because it begins a paragraph.
\par\noindent%
\begin{tabular}{ccc}
Case 1 & Case 2 & Case 3 \\
\end{tabular}
\par\noindent%
Last line.

First line, indented because it begins a paragraph.
\par\noindent%
Case 1 \hfill Case 2 \hfill Case 3
\par\noindent%
Last line.

\end{document}

相關內容