RMarkdown changes a good URL containing "-" into an error

title: "URL mangled by RMarkdown"
author: "Spencer Graves"
date: "2022-08-04"
output: pdf_document

knitr::opts_chunk$set(echo = TRUE)


Wikipedia has an article on Gaussian quadrature, which I can link to in RMarkdown. It also has an article on Gauss-Hermite quadrature. After I knit this to a PDF, I can link to the first, but the second fails.

Specifically, in the second case, I ask to go to:

Instead I get


This occurs with "output: pdf_document" but NOT with "output: html_document".

What do you suggest?


Can you share the content of your Rmd file that you use to include the link ?

FAQ: How to Format R Markdown Source

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.