tuna / thuthesis

LaTeX Thesis Template for Tsinghua University
https://www.ctan.org/pkg/thuthesis
LaTeX Project Public License v1.3c
4.52k stars 1.07k forks source link

插图和下一段之间空白太大,求解答谢谢~ #382

Closed ycydsxy closed 5 years ago

ycydsxy commented 5 years ago

相连的两段文字段A和段B中有一插图F,排版后发现插图F和段B间的空白太大,请问是我的tex代码不对还是模板本身的问题?图F和段B间我插了空行,因为若不这样的话,当此处图排版不下被放到他处后,段A和段B就连成一段了。谢谢!

附代码如下:

Vo等人\cite{Vo2005}在此基础上指出压气机发生突尖型失速时流场现象具有一定的相似性,即泄漏流和主流的分界面与叶片前缘平行,如图\ref{fig:intro:Vo2005}所示。另外,其针对低速的E3 Rotor B,研究了叶顶间隙分别为1.8\%和3.0\%弦长时的流场特征,提出了应用于突尖型失速先兆的判据,即叶尖泄漏流在尾缘附近发生回流和在前缘附近发生溢出两者需要同时满足。
\begin{figure}[htbp]
    \centering
    \includegraphics[width=8cm]{intro_Vo2005.png}
    \caption{E3动叶近失速点顶部熵云图\cite{Vo2005}}
    \label{fig:intro:Vo2005}
\end{figure}

Deppe等人\cite{Deppe2008}对上述判据进行了实验验证,其针对三台不同的低速单级轴流压气机,测量发现突尖型扰动的出现和前缘溢出及尾缘回流现象有直接的关系,且尾缘回流又从同一叶片的前缘溢出。
zepinglee commented 5 years ago

@ycydsxy 可以给个截图嘛?

ycydsxy commented 5 years ago

image

zepinglee commented 5 years ago

好像正常就是这样

ycydsxy commented 5 years ago

有点不对劲吧,我感觉优点太宽了吧。正常应该是插图段前6磅,段后12磅,thuthesis模板和word模板对比如下图所示(以图片标题对齐): image

zepinglee commented 5 years ago

@ycydsxy 你在 Word 里是怎么设置格式的?把图片和 caption 文字居中,再设置 caption “段前6磅,段后12磅”?

ycydsxy commented 5 years ago

对的

zepinglee commented 5 years ago

嗯,确实有些问题。 LaTeX 的行距处理方式跟 word 不一样,而且浮动体的处理也比较复杂,这里需要再研究一下。

stone-zeng commented 5 years ago

局部加一个 \vspace{距离} 这种吧,难免要手调的(不过建议在定稿之后精调)。

ycydsxy commented 5 years ago

各位维护者辛苦了~

LiuRuiQi commented 5 years ago

可以 \vspace{-3mm}

用一个负数来缩小间距。 这个应该不是bug,latex自动出来的可能就是这样的

ycydsxy commented 5 years ago

@LiuRuiQi 多谢,但是全文插图每次都\vspace{-3mm}比较麻烦,而且就外观来说如果不加间距真的有点大

zepinglee commented 5 years ago

@ycydsxy 不要在终稿前手动调整距离,因为浮动体可能浮动到其他位置,\vspace{-3mm}可能会导致两段之间少了 3mm;所以你暂时先不要管这个问题,我尽可能在模板的层面上解决

ycydsxy commented 5 years ago

@zepinglee 好的,多谢您!您也可以自己测试一下看是否能够复现我这个问题,也有可能是我使用thuthesis的姿势不对...

xueruini commented 5 years ago

word 里图上面的距离似乎不对,是不是下面也少了同样的部分

ycydsxy commented 5 years ago

@xueruini 您说的也有道理,具体标准word模板我也没有,我也只是按学校要求的一些参数改的,可能word版的也有问题,但是您不觉得latex版中图和后一段间距有些过大吗?

zepinglee commented 5 years ago

官方的 word 示例在这里:http://yjsy.cic.tsinghua.edu.cn/docinfo/board/boarddetail.jsp?columnId=001050603&parentColumnId=0010506&itemSeq=5365

07第3章(示例).doc 有一个表格 caption,格式是段前 12 磅,段后 6 磅。

zepinglee commented 5 years ago

@ycydsxy 你可以把这一小段的 word 版本发上来吗?我不太会设置 word

ycydsxy commented 5 years ago

@zepinglee 谢谢您提供模板,我按照模板里面 “13图(示例).docx”又重新设置了一遍行距,新的word文件请见链接:https://pan.baidu.com/s/1aogxCnYGuLnhLNtiv_W0mA 提取码:sm73 。按照您提供的模板进行设置后如下,图片行的行距设置为“段前12磅,段后6磅”,标题行的行距设置为“段前6磅,段后12磅”。

@xueruini 之前我的回答中有图片的那行的行距设置有一定的问题,但图片标题那行设置没问题,故不影响标题和后一段中的间距,之前反映的问题仍然存在。

zepinglee commented 5 years ago

我尝试修复这个问题,现在标题行到下文的距离小了一点,但是比 word 版还是要大。

我测试了如下 minimal 代码:

\documentclass[zihao=-4,linespread=1]{ctexart}
\usepackage{caption}
\usepackage{zhlipsum}

\setlength\textfloatsep{0bp}
\setlength\intextsep{0bp}

\DeclareCaptionFont{thu}{\fontsize{11bp}{11bp}\selectfont}
\captionsetup{
  font = thu,
  skip = 0bp,
}

\begin{document}

\fontsize{12bp}{12bp}\selectfont
\zhlipsum[1]

\begin{figure}[htbp]
  \centering
  \rule{2cm}{2cm}
  \caption{劳仑衣普桑,认至将指点效则机}
\end{figure}

\zhlipsum[1]

\end{document}

标题行跟正文的距离可以设置得很小(目测至多 2pt),

Screen Shot 2019-03-11 at 9 36 31 PM

但是我在 thuthesis 上设置类似的代码时,该距离明显要大很多,目前不知道原因,可能是跟使用了其他宏包有关。

xueruini commented 5 years ago

但是我在 thuthesis 上设置类似的代码时,该距离明显要大很多,目前不知道原因,可能是跟使用了其他宏包有关。

可以在 float 里 show 一下这几个变量的值

zepinglee commented 5 years ago

242e792 中应该没问题了, @ycydsxy 你再测量下?

ycydsxy commented 5 years ago

@zepinglee 您能提供编译后的模板吗?我这边ins文件编译报错,我不知如何解决...

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/W32TeX) (preloaded format=latex 2019.2.27)  20 MAR 2019 10:59
entering extended mode
 restricted \write18 enabled.
 Source specials enabled.
 %&-line parsing enabled.
**thuthesis.tex

! Emergency stop.
<*> thuthesis.tex

*** (job aborted, file error in nonstop mode)
zepinglee commented 5 years ago

你试试用 xetex 编译 ins 文件?

On Mar 20, 2019, at 11:05 AM, Kevin Su notifications@github.com wrote:

@zepinglee https://github.com/zepinglee 您能提供编译后的模板吗?我这边ins文件编译报错,我不知如何解决...

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/W32TeX) (preloaded format=latex 2019.2.27) 20 MAR 2019 10:59 entering extended mode restricted \write18 enabled. Source specials enabled. %&-line parsing enabled. **thuthesis.tex

! Emergency stop. <*> thuthesis.tex

*** (job aborted, file error in nonstop mode) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xueruini/thuthesis/issues/382#issuecomment-474666292, or mute the thread https://github.com/notifications/unsubscribe-auth/ALuLBst5o2qaTPKoJNWwEdCh84wJVY6cks5vYaVygaJpZM4bbegI.

ycydsxy commented 5 years ago

仍然报错..

This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018/W32TeX) (preloaded format=xelatex 2019.2.27)  20 MAR 2019 11:03
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**thuthesis.tex

! Emergency stop.
<*> thuthesis.tex

*** (job aborted, file error in nonstop mode)
zepinglee commented 5 years ago

仍然报错..

好吧我附一份 cls 文件。

你用的什么编辑器/IDE?应该是调用 xetex 的时候自动取掉了后缀名,然后编译器就默认找 thuthesis.tex文件了。

thuthesis.cls

ycydsxy commented 5 years ago

TeXstudio 2.12.14,已测试,现在这个距离应该没问题了,辛苦了!

skandbug commented 1 month ago

\setlength{\textfloatsep}{1pt}
You can adjust it like this