嚴格 \titlespacing,無膠水

嚴格 \titlespacing,無膠水

問題描述

TeX 似乎調整垂直空間在 2 列文件中,即使我已指定使用 \titlespacing 不會發生拉伸或收縮。下圖 (a) 下給出了簡短的視覺化:

(a) 最小工作範例顯示不應用 \titlespacing..{12pt}{0pt} (b) 發生這種情況的真實案例,不包含為來源。

儘管我指定了 例如\titlespacing{\section}{0pt}{**12pt**}{**0pt**},但似乎有一個垂直佈局會拉長標題之間的間距,這是不可接受的,至少對於我必須滿足的特定會議風格而言。

問題

我可以擺脫這種「垂直對齊」嗎?任何可能的解釋都非常受歡迎。這是我的 MWE,它重現了該行為(注意:我使用的是 xelatex,但使用 Latex 會產生相同的行為):

\documentclass[a4paper]{article}
\makeatletter
\usepackage{multicol}
% ----important----
\usepackage[noindentafter]{titlesec}
\titlespacing{\section}{0pt}{12pt}{0pt} 
\titlespacing{\subsection}{0pt}{10pt}{0pt}
\titlespacing{\subsubsection}{0pt}{3pt}{0pt}
% -----------------
\makeatother
\begin{document}
  \title{Foo Bar 2013: A personal journey through a typographic nightmare.}
  \author{Waldorf A. and Stattler B.}
  \maketitle
  \begin{abstract}
  this would in fact be longer, thus we make a space here
  \vspace{10cm}
  \end{abstract}
  \begin{multicols}{2}
  \section*{first order heading}
  All that is gold does not glitter. Not all those who wander are lost. The old that is     
  strong does not wither.
  \section*{first order heading}
  \subsection*{second order heading}
  Deep roots are not reached by the frost.  
  \section*{first order heading}
  \subsection*{second order heading}
  From the ashes a fire shall be woken. A light from the shadows shall spring. Renewed 
  shall be blade that was broken. The crownless again shall be king.
  \section*{first order heading}
  \subsection*{second order heading}
  \subsubsection*{third order heading}
  Not all that have fallen are vanquished. A king may yet be without crown. A blade 
  that was broken be brandished. 
  \end{multicols}
\end{document}

參考

我見過與該主題相關的問題,但沒有一個真正有幫助:

  • 什麼是膠水拉伸說「任何膠水都是由固定部分、可拉伸部分和可收縮部分組成。這些部分中的每一個都可以為零......通過 表示<fixed part> plus <stretchable part> minus <shrinkable part>。嘗試過,但沒有運氣 - 問題仍然存在。

  • 在某處讀到(我不記得在哪裡,令我羞愧!)您應該嘗試將例如 -0 指定為“後面的空格”,即\titlespacing{\section}{0pt}{12pt}{-0}。沒有運氣。

答案1

感謝 Steven B. Segletes 和他在上面評論中的指點,我找到了一種方法並想在這裡分享:

\setlength{\parskip}{0pt}

也許還有

\setlength{\textfloatsep}{0pt}

產生了預期的(並且可以說是無聊的)佈局:

沒有膠水,yipee

謝謝你!

相關內容