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

There is no line break between the H4-level heading and the body text #362

Open
ShuwenY opened this issue Oct 9, 2023 · 3 comments
Open

Comments

@ShuwenY
Copy link

ShuwenY commented Oct 9, 2023

How can I get a line break between the H4 heading and the main text?

command:

pandoc -o $pdf_name $md_files \
    --from markdown \
    --pdf-engine=xelatex --listings \
    --template eisvogel \
    --toc --toc-depth=4 \
    -V mainfont="Alibaba PuHuiTi" \
    -V sansfont="Alibaba PuHuiTi" \
    -V monofont="Cascadia Code" \
    -V CJKmainfont="Alibaba PuHuiTi" \
    -V CJKsansfont="Alibaba PuHuiTi" \
    -V CJKmonofont="Cascadia Code" \
    -V colorlinks=true \
    -V urlcolor=blue \
    -V linkcolor=blue \
    -V toc-color=NavyBlue \
    -V titlepage=true \
    -V titlepage-color="FFFFFF" \
    -V titlepage-rule-color="FFFFFF" \
    -V titlepage-text-color="000000" \
    -V titlepage-logo="../logo.png" \
    -V logo-width=20mm

###Problem phenomenon

image

@cratermoon
Copy link

That's built in to pandoc. If you add -V block-headings, that should give you the result you want.

@dm5n
Copy link

dm5n commented Jan 26, 2024

Also in YAML:

block-headings: true

@GregoryKogan
Copy link

block-headings sometimes doesn't work with book: true for me. I was able to add line breaks after H4 by manually specifying it.

# metadata.yaml

header-includes: |
  \RedeclareSectionCommand[
    beforeskip=-10pt plus -2pt minus -1pt,
    afterskip=1sp plus -1sp minus 1sp]{paragraph}
  \RedeclareSectionCommand[
    beforeskip=-10pt plus -2pt minus -1pt,
    afterskip=1sp plus -1sp minus 1sp,
    indent=0pt]{subparagraph}

You have full control over headings like this. You can change font as you wish.

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

No branches or pull requests

4 participants