Bug 509344

Summary: Give Ghostwriter Flatpak access to org.freedesktop.Sdk.Extension.texlive
Product: [Applications] ghostwriter Reporter: Stefan K. <lerothas>
Component: generalAssignee: megan.conkle
Status: REPORTED ---    
Severity: wishlist    
Priority: NOR    
Version First Reported In: 25.08.0   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Stefan K. 2025-09-10 12:55:12 UTC
SUMMARY
Ghostwriter Flatpak has no access to the texlive extension from FreeDesktop.org as others like Kile do.

STEPS TO REPRODUCE
1. Open the Ghostwriter Flatpak and create a file (with content).
2. Export the file via pandoc to "PDF(LaTeX)".

OBSERVED RESULT
Error: ''pdflatex not found. Please select a different --pdf-engine or install pdflatex''

EXPECTED RESULT
File is exported to PDF via LaTeX.

SOFTWARE/OS VERSIONS
Operating System: Solus 4.7
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.2

SOLUTION
Add the texlive-extension as a optional dependency like xournal++ is doing it, see:
https://github.com/flathub/com.github.xournalpp.xournalpp/blob/master/com.github.xournalpp.xournalpp.yaml

For the ghostwriter manifest this would mean:

1. Add extension:
"add-extensions": {
    "org.freedesktop.Sdk.Extension.texlive": {
        "directory": "extensions",
        "subdirectories": true,
        "no-autodownload": true,
        "autodelete": true,
        "version": "24.08"
    }
},

2. add build step:
{
    "name": "texlive_extension",
    "buildsystem": "simple",
    "build-commands": [
        "mkdir /app/extensions"
    ]
},

Alternatively include tinytex:
https://github.com/rstudio/tinytex-releases/