Home > database >  Bold, font size - Hyperlink
Bold, font size - Hyperlink

Time:12-01

Can I change the font size and make the font bold in this fragment of code in RMarkdown? I export this report to PDF.

\newcommand{\soln}{https://www.google.com/}

\begin{center}

\href{\soln}{`r df['name']`}

\end{center}

CodePudding user response:

Use latex command \bfseries to bold the text and then wrap the whole \href command within a font size command, for example, \huge. see here for the list of font-size changing commands.

---
title: "large and bold hyperlink"
output: pdf_document
date: "2022-12-01"
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)

df <- "Whatever"
```

\newcommand{\soln}{https://www.google.com/}

\begin{center}

\huge{\href{\soln}{\bfseries `r paste(df)`}}

\end{center}
  • Related