Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: parskip in abstract and tabularRowSeparation #504

Closed
wants to merge 5 commits into from

Conversation

SinCerely023
Copy link
Contributor

main.tex
\BITSetup{
  misc = {
    tabularRowSeparation = 3,
  },
}

chapter.tex
\begin{equation}
  \begin{bmatrix}
    1 & 0 \\
    1 & 0 \\
    1 & 0 \\
    1 & 0 \\
    1 & 0 \\
    1 & 0 \\
  \end{bmatrix}
\end{equation}

\begin{longtable}{ccccc}
    \caption{Longtable} \\
    \toprule
    项目    & 产量    & 销量    & 产值   & 比重    \\ \midrule
    \endfirsthead
    手机    & 1000  & 10000 & 500  & 50\%  \\
    计算机   & 5500  & 5000  & 220  & 22\%  \\
    笔记本电脑 & 1100  & 1000  & 280  & 28\%  \\ \midrule
    合计    & 17600 & 16000 & 1000 & 100\% \\ \bottomrule
\end{longtable}

@YDX-2147483647
Copy link
Collaborator

YDX-2147483647 commented May 13, 2024

摘要部分我测试了,在\BITSetup设置style/pageVerticalAlign = scattered时确实改小了。

图片

不过现在示例main.tex给的是top,这样似乎已经够了?

style = {
pageVerticalAlign = top,

图片

@YDX-2147483647
Copy link
Collaborator

YDX-2147483647 commented May 13, 2024

表格行距部分

  • \linespread vs. \arraystretch

    其实原来也是用\linespread17398c5 才改成\arraystretch。当时是因为\linespread误改了 caption 行距(本科要求caption紧贴表格,行距太大会有空隙);现在加到\AtBeginEnvironment里,有可能又可以了,我再查查。

  • longtable

    字号没问题。行距的话,longtable的\caption是写在环境里面,用\linespread肯定不行。

    另外我怀疑longtable自己调过行距。因为设同样的\arraystretch,longtable比tabular之类的高。参考 fix: misc/tabularRowSeparation不应影响矩阵 #499 第一个截图。

@SinCerely023
Copy link
Contributor Author

SinCerely023 commented May 13, 2024

摘要部分

是我疏忽了,确实是pageVerticalAlign的行为导致摘要出现的这个问题。不过scattered状态下正文并不会出现这个现象,并且能明显看出正文并没有底端对齐。按照我的习惯会保证段间距与行间距一致,可能需要再研究一下pageVerticalAlign为何在摘要和正文的行为有差异。

  • scattered
    • 摘要
      image
    • 正文
      image
  • top
    • 摘要
      image
    • 正文
      image

表格行距部分

  • 这个版本的\linespread写在了tabular环境里,应该不会影响caption。
  • 我可以再测试一下longtable

@SinCerely023
Copy link
Contributor Author

SinCerely023 commented May 13, 2024

摘要部分

测试发现pageVerticalAlign所决定的\flushbottom会在某些情况下无法实现底部对齐,并抛出警告。因此回退所进行的\parskip修改。
image

表格行距部分

测试发现\AtBeginEnvironment{tabular}不会对table环境下的caption产生影响。
然而longtable的caption在其环境中受其影响。因此回退对longtable进行的\linespread修改。
回退后仍保持对 #498 #499 的支持,但该方法无法解决 #501 。但是保留了对longtable字号的修改,与tabular实现统一。
image
image

@SinCerely023
Copy link
Contributor Author

发现自己对几个issue的认知产生了偏差。现在的状态能够解决 #498 #501 ,而 #499 中提到的longtable行距问题未能解决。
希望这次说清楚了!希望没有产生误导!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: misc/tabularRowSeparation错误地影响了矩阵
2 participants