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

Tikz not rendering in the github page #37

Open
durandg12 opened this issue Feb 10, 2025 · 10 comments
Open

Tikz not rendering in the github page #37

durandg12 opened this issue Feb 10, 2025 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@durandg12
Copy link

My submission is published as a GitHub page at this URL: https://durandg12.github.io/algo-curve/

The tikz figures are not rendered, tikz code is displayed instead, in both HTML and PDF.

On my computer, rendering produces the right figures in both HTML and PDF.

To my knowledge, I am using the last version of the build.yml workflow configuration file, as per discussed here : #33 (comment) :

name: Main Workflows

on:
  push:
    branches: ["main"]
  repository_dispatch:
    types: [custom-event] 
  workflow_dispatch:

permissions:
  contents: write
  pages: write

jobs:
  call_env_workflow:
    uses: computorg/workflows/.github/workflows/global-env.yml@main
    secrets:
      token: ${{ secrets.GITHUB_TOKEN }}
    with:
      config-path: './config/quarto_config.yml'
  call_quartopublish_workflow:
    uses: computorg/workflows/.github/workflows/publish-render.yml@main
    needs: call_env_workflow
    with:
      config-path: './config/quarto_config.yml'
    secrets:
      token: ${{ secrets.GITHUB_TOKEN }}

The actions are successfull after each push : https://github.com/durandg12/algo-curve/actions

Thanks in advance

@jchiquet jchiquet added the bug Something isn't working label Feb 10, 2025
@jchiquet
Copy link
Member

Quick guess: maybe it has something to do with the fact that you place the tikz figures in absolute repositories (e.g;, filename=../figure-tikz/fig-tikz-01') and that those are not pushed to the gh-pages by the publishing action.

@durandg12
Copy link
Author

For this path choice, I just followed the workaround proposed by @fradav here : #20 (comment)

@jchiquet
Copy link
Member

For some reason, the repository 'figure-tikz' is not present there https://github.com/durandg12/algo-curve/tree/gh-pages/algo-curve_files, let's just wait until @fradav ave a look.

(contrary to what happened in the computo-quarto-extension https://github.com/computorg/computo-quarto-extension/tree/gh-pages/computo-quarto-extension_files)

@fradav
Copy link
Contributor

fradav commented Feb 11, 2025

Hi Guillermo, see my PR there durandg12/algo-curve#1

As a side note, it seems that pdflatex can’t be called correctly from the diagram toolchain quarto -> diagram.lua -> quarto tinytex/pdflatex and we now have to directly and manually add the tex binaries in the PATH :

mkdir -p ~/.local/bin
~/.TinyTeX/bin/x86_64-linux/tlmgr option sys_bin ~/.local/bin
~/.TinyTeX/bin/x86_64-linux/tlmgr path add
~/.TinyTeX/bin/x86_64-linux/tlmgr update --self

@jchiquet remember the good old libertinus hack ? it’s back 😀
Sortof.

@jchiquet
Copy link
Member

@jchiquet remember the good old libertinus hack ? it’s back 😀

😢

@durandg12
Copy link
Author

durandg12 commented Feb 11, 2025

Now working, but for some reason the github deployed page does not use the same math font as LaTeX.

GitHub page:
Image

HTML and PDF render on my computer:
Image

Is it possible to change this behaviour so that all maths of my submission use the same font?

@jchiquet
Copy link
Member

Screenshot of gh-pages https://durandg12.github.io/algo-curve/ on my computer (Ubuntu 24, Google Chrome 133.0.6943.53).

Image

Looks fine no? What navigator are you using? Mathjax font problem?

@fradav
Copy link
Contributor

fradav commented Feb 11, 2025

Same problem as described as @durandg12 for the math font inside tikz schemas. julien, did you refresh your page ? I looked in the svg from the github and they’re not displaying the math font… I think it’s caused by the github runner’s inkscape version (they’re first rendered with pdflatex and converted to svg by inkscape for html output), local inkscape didn’t exhibit this problem.

@fradav
Copy link
Contributor

fradav commented Feb 11, 2025

Github
github inkscape generated version
vs
Local
Image

@jchiquet
Copy link
Member

After multiple refreshments, on my laptop this time (same settings... Ubuntu 24) Github pages

with Firefox 135.0 (64-bit)

Image

with Google Chrome 133.0.6943.53

Image

and I get similar stuff locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants