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

Tex version issue in base images #743

Closed
kfeinauer opened this issue May 2, 2024 · 2 comments · Fixed by #814
Closed

Tex version issue in base images #743

kfeinauer opened this issue May 2, 2024 · 2 comments · Fixed by #814
Assignees
Labels
bug Something isn't working customer request Requested by customer

Comments

@kfeinauer
Copy link
Contributor

kfeinauer commented May 2, 2024

In the base image, we install Tex here:

### Install TinyTeX ###
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh \
&& /root/.TinyTeX/bin/*/tlmgr path remove \
&& mv /root/.TinyTeX/ /opt/TinyTeX \
&& /opt/TinyTeX/bin/*/tlmgr option sys_bin /usr/local/bin \
&& /opt/TinyTeX/bin/*/tlmgr path add

This allows users to use Quarto and RMarkdown to knit documents, but this will only work for so long. Eventually, next calendar year, the default Tex repos will bump versions and no longer be compatible, as mentioned by a customer. This prevents rendering of any Quarto/RMarkdown documents unless worked around.

Example .qmd file content:

---
title: "TexLive Error Example"
format: pdf
---

# Demoing the error

```{r}
mtcars

Error when rendering:

==> quarto preview remediation_EValue_4.1.3.qmd --to pdf --no-watch-inputs --no-browse

processing file: remediation_EValue_4.1.3.qmd
1/3
2/3 [unnamed-chunk-1]
3/3
output file: remediation_EValue_4.1.3.knit.md

pandoc
to: latex
output-file: remediation_EValue_4.1.3.tex
standalone: true
pdf-engine: xelatex
variables:
graphics: true
tables: true
default-image-extension: pdf

metadata
documentclass: scrartcl
classoption:
- DIV=11
- numbers=noendperiod
papersize: letter
header-includes:
- '\KOMAoption{captions}{tableheading}'
block-headings: true
title: TexLive Error Example

Rendering PDF
running xelatex - 1
This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode

updating tlmgr

updating existing packages
finding package for scrartcl.cls
ERROR: Your TexLive version is not updated enough to connect to the remote repository and download packages. Please update your installation of TexLive or TinyTex.

Underlying message: Local TeX Live (2023) is older than remote repository (2024).
Cross release updates are only supported with
update-tlmgr-latest(.sh/.exe) --update
See https://tug.org/texlive/upgrade.html for details.

Stack trace:

Underlying message: Local TeX Live (2023) is older than remote repository (2024).
Cross release updates are only supported with
update-tlmgr-latest(.sh/.exe) --update
See https://tug.org/texlive/upgrade.html for details.

at findPackages (file:///opt/quarto/1.4.550/bin/quarto.js:75468:27)
at eventLoopTick (ext:core/01_core.js:183:11)
at async findAndInstallPackages (file:///opt/quarto/1.4.550/bin/quarto.js:76288:30)
at async initialCompileLatex (file:///opt/quarto/1.4.550/bin/quarto.js:76180:39)
at async generatePdf (file:///opt/quarto/1.4.550/bin/quarto.js:76125:22)
at async Object.complete (file:///opt/quarto/1.4.550/bin/quarto.js:76405:27)
at async file:///opt/quarto/1.4.550/bin/quarto.js:70089:31
at async withTimingAsync (file:///opt/quarto/1.4.550/bin/quarto.js:19466:25)
at async Object.complete (file:///opt/quarto/1.4.550/bin/quarto.js:70087:13)
at async Object.onPostProcess (file:///opt/quarto/1.4.550/bin/quarto.js:77266:36)

This can be mitigated by users by running a command to pin the Tex repos to an older version as mentioned in this thread but this is an annoyance to customers and either requires them to run this every time they do work, or to modify the image manually.

Ideally this error would never surface to customers and things would just work, falling back to older Tex repos if necessary. I do not think we should be rebuilding images with updated versions of Tex.

The Quarto team may have some ideas on how to tackle this issue.

@kfeinauer kfeinauer added bug Something isn't working needs refinement Marked for review at a future meeting customer request Requested by customer labels May 2, 2024
@kfeinauer kfeinauer changed the title Tex version issue in session images Tex version issue in base images May 2, 2024
@bdeitte
Copy link
Contributor

bdeitte commented May 8, 2024

We should ask in the quarto Slack channel and can go from there

@bschwedler
Copy link
Contributor

Guidance from Quarto: https://quarto.org/docs/output-formats/pdf-engine.html#managing-tex

We may want to implement this outside of quarto, but use the same underlying method to update tinytex.

@costrouc costrouc removed the needs refinement Marked for review at a future meeting label Jun 26, 2024
@ianpittwood ianpittwood self-assigned this Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working customer request Requested by customer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants