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

When setting lang to ja-JP in Beamer, it attempts to install non-existent LaTeX packages, causing rendering to fail. #11256

Open
ujtwr opened this issue Oct 31, 2024 · 6 comments
Assignees
Labels
bug Something isn't working latex LaTeX engines related libraries and technologies

Comments

@ujtwr
Copy link

ujtwr commented Oct 31, 2024

Bug description

---
title: "Untitled"
format:
  beamer:
    pdf-engine: lualatex
    lang: ja-JP
---

## Quarto

あいうえお

When rendering this qmd file, an error occurs with the following message. Although it shows a permission issue here, even attempting installation as root fails because the specified LaTeX package does not exist."

> 1 package to install
> installing hyphen-japanese (1 of 1)
ERROR: [non-error-thrown] tlmgr returned a non zero status code
You don't have permission to change the installation in any way,
specifically, the directory /usr/local/texlive/2024/tlpkg/ is not writable.
Please run this program as administrator, or contact your local admin.
tlmgr: An error has occurred. See above messages. Exiting.

Steps to reproduce

Render qmd file bellow:

---
title: "Untitled"
format:
  beamer:
    pdf-engine: lualatex
    lang: ja-JP
---

## Quarto

あいうえお

Expected behavior

No response

Actual behavior

No response

Your environment

RStudio Server: 2024.09.0+375 on Ubuntu 24.04.1
Client: Windows11 + chrome
Quarto: 1.5.57 (bundled with RStudio)
Latex: texlive2024 (the latest version today)

Quarto check output

Quarto 1.5.57
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.57
      Path: /usr/lib/rstudio-server/bin/quarto/bin

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

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /usr/local/bin
      Version: 2024

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

[✓] Checking Python 3 installation....OK
      Version: 3.12.3
      Path: /tmp/RtmpdepXB2/rstudio/terminal/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.4.1
      Path: /usr/lib/R
      LibPaths:
        - /home/nishide/R/x86_64-pc-linux-gnu-library/4.4
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      knitr: 1.48
      rmarkdown: 2.28

[✓] Checking Knitr engine render......OK
@ujtwr ujtwr added the bug Something isn't working label Oct 31, 2024
@TomBener
Copy link

It seems this bug is similar to the scenario that happened to Chinese #10291

@cscheid
Copy link
Collaborator

cscheid commented Oct 31, 2024

I believe @TomBener is correct, and we need the analogous fix to 7b5c247

But, more generally, I subscribe to the "there's only three numbers in software engineering: 0, 1, and infinity" theory. So I don't believe this is only needed for simplified chinese and japanese; other writing systems probably need addressing as well, and we should come up with a more general fix.

@mcanouil mcanouil added the latex LaTeX engines related libraries and technologies label Oct 31, 2024
@cderv
Copy link
Collaborator

cderv commented Oct 31, 2024

So I don't believe this is only needed for simplified chinese and japanese; other writing systems probably need addressing as well, and we should come up with a more general fix.

Totally. We just need a way to know which one needs it or which don't. Or we just need to revert the feature in a way that we don't try to install it automatically and let user do it if there is a real problem.

I'll compare with tinytex R package because we don't have this issue, and probably because we don't try to install automatically a package if we detect this hyphen message in the log file.

@cderv cderv self-assigned this Oct 31, 2024
@winniehell
Copy link
Contributor

there is a list of languages that support hypenation at https://github.com/hyphenation/tex-hyphen/blob/master/data/language-codes/tex-languages.txt

maybe that helps

@cderv
Copy link
Collaborator

cderv commented Nov 5, 2024

Definitely helpful ! This can be a good base for us, to only try installing for one of those known packages

@spring-haru
Copy link

spring-haru commented Dec 14, 2024

I encountered the same issue when trying to preview an .ipynb file as .pdf.
But, the preview is correctly shown once lang: ja-JP is removed.

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

No branches or pull requests

7 participants