JuliaTeX / TikzPictures.jl

Creating PGF/TikZ pictures and saving them in various formats
Other
89 stars 28 forks source link

! Undefined control sequence. 330 \sa@placebox ... #67

Closed tlienart closed 3 years ago

tlienart commented 3 years ago

Hello,

I think I'm bumping against an issue that several people before me seem to have had in various contexts as far as I could see in the issues and PRs however it's still unclear to me how to fix it.

My context is the following, a Franklin.jl user would like to be able to call TikzCDs.jl (which relies on TikzPictures.jl), produce a diagram and show it on a webpage. This works fine locally, here's a screenshot (using MacTex):

Screenshot 2020-10-20 at 14 07 54

I would now like the same to happen when deploying with GitHub Action. For this purpose, I have used a deploy.yml with these lines:

- name: Install deps for Tikz
      run: |
          sudo apt-get -qq update
          sudo apt install -y pdf2svg texlive-latex-base texlive-binaries texlive-pictures texlive-latex-extra texlive-luatex

which was copied from TikzCDs' deploy script. However when the GitHub Action runs, I get

WARNING: could not import LaTeXStrings.@L_mstr into TikzPictures
328
WARNING: could not import LaTeXStrings.@L_mstr into TikzCDs
329
! Undefined control sequence.
330
\sa@placebox ->\newpage \global \pdfpagewidth 
331
                                              =\wd \sa@box \global \pdfpageh...
332
l.9 \end{tikzcd}

which crashes the build. The WARNINGs can probably be ignored as I get them locally too. The placebox thing seems to be a known issue since you have specific issues & PRs related to it. Any idea what I could try to get this to work? Since I've got this working locally, I'm assuming it must be a dependency problem with texlive?

With apologies for the spam, cc @epatters who was trying this and @mehalter since this concerns TikzCDs too.

Thanks in advance!

tlienart commented 3 years ago

Ok I apologise for the spam. The workaround is to force the installation of TeXLive2019, this is possible in GitHub Action using the following lines:

      run: |
          sudo add-apt-repository ppa:jonathonf/texlive-2019
          sudo apt-get -qq update
          sudo apt install -y pdf2svg texlive-latex-base texlive-binaries texlive-pictures texlive-latex-extra texlive-luatex

This is what I use here in order to get the working example here

I'll close this issue now but it might be worth adding the lines above in the docs?