如何防止 \subsection 或 \section 之后换行
Here I queried how to identify the counters for \subsection
and \theorem.
The resulting look would be the same (except for the math-specific things, like the content inside a theorem is put in emphasis) if only there is a way to prevent linebreaks after \subsection.
Is there a way to do this? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一种方法是使用 titlesec 包来格式化带有“runin”的部分。一旦您安装了 titlesec 软件包以供使用,您可以将其放在序言中:
除了“runin”选项之外,上面的格式设置是小节的默认设置。这些当然可以修改,例如,如果您希望小节标题与定理标题大小相同,则可以去掉“\large”。
One way is by using the titlesec package to format the section with 'runin'. Once you've installed the titlesec package for use you can put this in the preamble:
The formatting settings above other than the 'runin' option are the default settings for subsections. Those can of course be modified, e.g., you could take out the '\large' if you wanted the subsection headings to be same size as the theorem headings.
Darnit,Herb 在我打字时节拍...
FWIW,
titleformat
的完整选项是:\titleformat{command}[shape]{format}{label}{sep}{before} [after]
这是大约一年前的一个问题:
https://stackoverflow。 com/questions/1469096/no-newline-after-subsection
Darnit, Herb beat as I was typing...
FWIW, the full options to
titleformat
are:\titleformat{command}[shape]{format}{label}{sep}{before}[after]
This was a question on SO about a year ago:
https://stackoverflow.com/questions/1469096/no-newline-after-subsection