当我使用####作为第4级标题时,在段落开始之前,pdf(latex)中的输出不会留下一行空间。例如,
#### Heading 4
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type
specimen book. 只输出pdf(胶乳),如下所示
标题4 Lorem Ipsum只是印刷和排版行业的虚拟文本。自从1500年代以来,Lorem就一直是业界标准的虚拟文本,当时一台不知名的打印机拿出一台打字机,把它拼成一本样书。
我到处都读到r标记允许1-6 #的标题,所以我试图找出我在这里做错了什么。
另外,我想我可以使用\subsubsub分段来代替####作为标题,但这给了我一个错误。
发布于 2015-10-14 22:00:17
见Mico对以下问题的答复:
将此代码添加到tex头文件中,这将完成以下操作:
\documentclass{article}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{-2.5ex\@plus -1ex \@minus -.25ex}%
{1.25ex \@plus .25ex}%
{\normalfont\normalsize\bfseries}}
\makeatother
\setcounter{secnumdepth}{4} % how many sectioning levels to assign numbers to发布于 2015-10-14 21:15:45
这本质上是一个LaTeX风格的问题,而不是(R)特定的问题.如果添加YAML标头
---
output:
pdf_document:
keep_tex: true
---对于您的文档(或将这些行添加到现有的YAML头),生成的LaTeX文件将被保留;然后您可以查看LaTeX文件以查看生成的内容:
段{标题4}\标签{标题-4} 伊普苏姆..。
问题是LaTeX中的默认段落样式不包括换行符。一旦你知道这是怎么回事,你就可以搜索像这个LaTeX咒语来自tex.stackexchange.com这样的东西,创建一个包含
\usepackage{titlesec}
\titleformat{\paragraph}
{\normalfont\bfseries}
{}
{0pt}
{}并根据rmarkdown包中PDF输出的“高级定制”文档将其合并到YAML标题中。
---
output:
pdf_document:
keep_tex: true
includes:
in_header: parahdr.tex
---https://stackoverflow.com/questions/33134416
复制相似问题