pandocquarto

Coloring hyperlinks in table of contents


Consider the following quarto code:

---
title: "Untitled"
format: pdf
toc: true
---

# section 1

# section 2

The hyperlinks of the table of contents are all in black. Is there some way of making them, e.g., blue, to make more clear that the text is clickable?


Solution

  • Use the toccolor option in yaml to color the hyperlinks in table of contents,

    ---
    title: "Untitled"
    format: pdf
    toc: true
    toccolor: blue
    ---
    
    # section 1
    
    # section 2
    

    colored toc


    Check out the colors section from Quarto documentations for more related options such as, linkcolor, citecolor, urlcolor etc.