Skip to content

Hyperlink section header #544

Open
Open
@rempsyc

Description

@rempsyc

Hi! I'm following up here from mitchelloharawild/vitae#264 from the vitae package in R.

Essentially, using vitae, I'm trying to hyperlink the header "Publications" to my Google Scholar. I have the following reprex (requires the vitae package installed) where I choose the awesomecv as output:

---
surname: Curie
pronouns: she/her
output: vitae::awesomecv
---

# [Publications](https://scholar.google.com/)

The above markdown line doesn't lead to a clickable URL, and when looking at the tex, the following is generated:

\section{\texorpdfstring{\href{https://scholar.google.com/}{Publications}}{Publications}}\label{publications}

When I try a different strategy of relying on LaTeX syntax instead of markdown,

---
surname: Curie
pronouns: she/her
output: vitae::awesomecv
---

# \href{https://scholar.google.com/}{Publications}

I get the following error:

! Argument of \href@split has an extra }.
<inserted text> 
                \par 
l.104 ...://scholar.google.com/}{Publications}}{}}
                                                  \label{section} 

Error: LaTeX failed to compile cv-test.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See cv-test.log for more info.
Execution halted

The maintainer of vitae has suggested that I might need to submit a PR in this repo to fix the link malformation and mentioned,

One idea for example is how the section titles have the colored first few letters. That might be splitting up the href command into several parts, therefore malforming the latex syntax.

Before engaging in this process (given I don't know LaTeX), I wanted to double-check here if I'd be going the right path. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions