Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow URLs for brand logo in Typst #11438

Open
cwickham opened this issue Nov 14, 2024 · 0 comments
Open

Allow URLs for brand logo in Typst #11438

cwickham opened this issue Nov 14, 2024 · 0 comments
Assignees
Labels
brand `_brand.yml` enhancement New feature or request triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone. typst
Milestone

Comments

@cwickham
Copy link
Collaborator

Bug description

The spec for brand.yml suggests you can use URLs for logo paths:

Logos can be stored locally—adjacent to your _brand.yml file—or hosted online. Local file paths should be relative to the location of your _brand.yml file (I’ll use logos/ as the directory in the examples below). Online images should use full URLs starting with http:// or https://.

However, this doesn't currently work for format: typst.

Steps to reproduce

---
title: "Untitled"
format: typst
brand:
  logo: 
    medium: https://quarto.org/quarto.png
---

Expected behavior

Logo should appear.

Actual behavior

An error:

[typst]: Compiling typst-online-logo.typ to typst-online-logo.pdf...error: file not found (searched at /Users/charlottewickham/Documents/posit/weekly-log/2024-11-11/https:/quarto.org/quarto.png)
    ┌─ typst-online-logo.typ:295:62
    │
295 │ #set page(background: align(left+top, box(inset: 0.5in, image("https://quarto.org/quarto.png", width: 2in))))
    │                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ERROR: Error
    at Object.complete (file:///Users/charlottewickham/Documents/posit/quarto-cli/src/command/render/output-typst.ts:79:13)

Your environment

Mac OS Sequoia 15.0

Quarto check output

$ quarto check
Quarto 99.9.9
[✓] Checking environment information...
      Quarto cache location: /Users/charlottewickham/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 99.9.9
      commit: 195974712dbbed32d1f224e42b0014631e534a2b
      Path: /Users/charlottewickham/Documents/posit/quarto-cli/package/dist/bin

[✓] Checking tools....................OK
      TinyTeX: v2024.03.13
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/charlottewickham/Library/TinyTeX/bin/universal-darwin
      Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.12.1
      Path: /Users/charlottewickham/Documents/posit/quarto-web/.venv/bin/python
      Jupyter: 5.7.2
      Kernels: julia-1.10, ark, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.3.3
      Path: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources
      LibPaths:
        - /Users/charlottewickham/Library/R/arm64/4.3/library
        - /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
      knitr: 1.45
      rmarkdown: 2.28

[✓] Checking Knitr engine render......OK
@cwickham cwickham added brand `_brand.yml` enhancement New feature or request labels Nov 14, 2024
@mcanouil mcanouil added the typst label Nov 14, 2024
@cscheid cscheid added this to the v1.7 milestone Nov 14, 2024
@cscheid cscheid added the triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone. label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brand `_brand.yml` enhancement New feature or request triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone. typst
Projects
None yet
Development

No branches or pull requests

4 participants