rstudio / rstudio/rticles

onehalfspacing causes overlapping of titles and text

Open
#535 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted :heart:
Dominant language
TeX
Stars
1.5k
Forks
517
Avg merge
1d 8h
Merged PRs (30d)
5

Description

The package onehalfspacing seems to cause some overlapping in the titles of sections and sub-sections.

https://github.com/rstudio/rticles/blob/3cb3a3cc6b7fa4188c4358c0e319568c05703171/inst/rmarkdown/templates/frontiers/resources/template.tex#L17

image

Commenting the line or adding explicit title spacing seems to fix it.

\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\usepackage[onehalfspacing]{setspace}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with inst/rmarkdown/templates/frontiers/resources/template.tex around line 17, where the onehalfspacing option is enabled. Render a Frontiers template containing section, subsection, and subsubsection titles to reproduce the overlap, then verify that the rendered titles and following text no longer overlap while preserving the intended spacing.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.