QR-Codes from latex package {qrcode} are generated but are not clickable links #7500
-
DescriptionI'm using latex and the qrcode package to generate qr-codes for my pdf outputs. It's very simple and just needs the following, which creates a qr-code and also makes the image of the code a clickable link to the same destination as the code: \qrcode[hyperlink,height=0.5in]{http://www.ctan.org} Creating the qr-code works fine, but the image is not a clickable link. This works in other documents but somehow quarto seems to remove/not add the link to the image. Does anyone have an idea on how to fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Could you share a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository? Thanks. Meanwhile, you can use You can share a Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four ````qmd
---
title: "Reproducible Quarto Document"
format: html
---
This is a reproducible Quarto document using `format: html`.
It is written in Markdown and contains embedded R code.
When you run the code, it will produce a plot.
```{r}
plot(cars)
```
The end.
```` |
Beta Was this translation helpful? Give feedback.
-
Yes, this is a working example: ---
title: "qrTest"
format:
pdf:
include-in-header:
- text: |
\usepackage{qrcode}
editor: visual
---
This is ***markdown*** content, and here we switch to latex to generate the qr-code:
\qrcode[hyperlink,height=0.5in]{http://www.ctan.org}
This is ***markdown*** again. |
Beta Was this translation helpful? Give feedback.
I would say, it is likely a conflict with one of the LaTeX packages used in the template (from Pandoc).
I suggest you investigate this using
keep-tex: true
and moving\usepackage{qrcode}
in the frontmatter/header of the tex file and rendering using a LaTeX engine.