Bug 441713 - Okular "Cannot find latex executable."
Summary: Okular "Cannot find latex executable."
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 21.08.0
Platform: Flatpak Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-29 18:19 UTC by rms.des.web
Modified: 2021-08-29 20:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rms.des.web 2021-08-29 18:19:16 UTC
SUMMARY
Trying to add annotations containing LaTeX in PDF fails with
"Cannot find latex executable."

Okular is installed through Flatpak.
Flatpak's texlive installation was performed with org.freedesktop.Sdk.Extension.texlive.
Host system (Linux Mint 20) also has a working latex installation.

STEPS TO REPRODUCE
1. Install Okular and texlive through Flatpak
2. Annotate some pdf with a pop-up note containing latex. for instance $$\frac{a}{b}$$

OBSERVED RESULT
Latex rendering failed - Okular
Cannot find latex executable.

EXPECTED RESULT
Display of mathematical formula

SOFTWARE/OS VERSIONS
Windows: NA
macOS: NA
Linux/KDE Plasma: Linux 5.4.0-81-generic (Linux Mint 20.1)
(available in About System)
KDE Plasma Version: NA
KDE Frameworks Version: KDE Frameworks 5.85.0
Qt Version: Qt 5.15.3 (built against 5.15.3)

ADDITIONAL INFORMATION
I suppose the problem is related to:
"    QString latexExecutable = QStandardPaths::findExecutable(QStringLiteral("latex")); "
line 144 latexrenderer.cpp

due to the sandbox, perhaps it cannot find the latex command, even if I give full access to the system?
flatpak has the org.freedesktop.Sdk.Extension.texlive extension, perhaps it could be used if it was added as a possible dependency?
Comment 1 Albert Astals Cid 2021-08-29 20:29:31 UTC
I'm not sure this belongs here or https://flathub.org/apps/details/org.kde.okular but well, doesn't matter :D

Yes, probably someone should figure out if org.freedesktop.Sdk.Extension.texlive can be used, if you have time/knowledge it would be welcome.