geocompx / geocompy

Geocomputation with Python: an open source book and online resource for getting started in this space
https://py.geocompx.org/
Other
259 stars 47 forks source link

Section links fail #243

Closed Robinlovelace closed 1 month ago

Robinlovelace commented 1 month ago

Links to sections are not being rendered:

image

Split-out from #241

Also in Chapter 1:

The vector data model (sec-vector-data)

https://py.geocompx.org/01-spatial-data

Robinlovelace commented 1 month ago

Cannot reproduce this issue locally as shown below. Quarto version issue?

image

To do that:

quarto --version 1.5.47
quarto preview
Robinlovelace commented 1 month ago

Will try

docker run -it ghcr.io/geocompx/docker:python /bin/bash

to debug...

Robinlovelace commented 1 month ago

The container has a different version:

➜  ~ docker run -it ghcr.io/geocompx/docker:python /bin/bash
root@32d56fcb7ad0:/# quarto --version
1.5.41
Robinlovelace commented 1 month ago

Will try installing that version to debug locally...

Robinlovelace commented 1 month ago

Looks like another quarto regression to me.

Robinlovelace commented 1 month ago

Latest version:

root@96152b486388:/workspaces/geocompy# quarto --version
1.5.54
Robinlovelace commented 1 month ago

Cannot reproduce in devcontainer, I'm confused... Any ideas @Nowosad ?

image

Robinlovelace commented 1 month ago

There is something unexpected in the workflow logs:


pandoc 
  to: latex
  output-file: index.tex
  standalone: true
  toc: true
  number-sections: true
  top-level-division: chapter
  pdf-engine: xelatex
  variables:
    graphics: true
    tables: true
  default-image-extension: pdf

metadata
  crossref:
    chapters: true
  documentclass: krantz
  papersize: letter
  block-headings: true
  jupyter: python3
  bibliography:
    - geocompr.bib
  monofont: Source Code Pro
  monofontoptions:
    - Scale=0.7
  description-meta: |
    This book will teach you how to work with geographic data in Python.
    It's a short and practical open source book in which you'll
    develop and use geocomputation to solve practical
    problems and lay the foundations for advanced geospatial applications.
  title: Geocomputation with Python
  author: 'Michael Dorman, Anita Graser, Jakub Nowosad, Robin Lovelace'
  description: |
    An introductory resource for working with geographic data in Python

FATAL (/opt/quarto/share/filters/main.lua:7217) An error occurred:
Could not convert a SVG to a PDF for output. Please ensure that rsvg-convert is available on the path.
Error running filter /opt/quarto/share/filters/main.lua:
/opt/quarto/share/filters/main.lua:2639: attempt to call a nil value (global 'crash_with_stack_trace')
stack traceback:
    /opt/quarto/share/filters/main.lua:2218: in function 'fail'

Source: https://github.com/geocompx/geocompy/actions/runs/10272870283/job/28426047661#step:4:1295

Robinlovelace commented 1 month ago

Fixed in https://github.com/geocompx/geocompy/commit/cb47eccda5977974a2ac4d5764f00fcc18d342ce

Note @Nowosad: let's keep the pdf bits commented-out until we need them.

Robinlovelace commented 1 month ago

Demo: https://py.geocompx.org/01-spatial-data#sec-vector-data

michaeldorman commented 1 month ago

Great, thanks @Robinlovelace ! 🙏 I guess if there is incompatibility between the HTML and PDF rendering we can switch to PDF setting when needed (which should be rare). At the moment only @jakub could accomplish the PDF rendering