fetacore / Infinitex

A LaTeX and WYSIWYG editor with academic search functionality and other helpful tools
GNU General Public License v3.0
160 stars 10 forks source link

Compile PDF does not work #3

Open probonopd opened 6 years ago

probonopd commented 6 years ago
me@host:~$ Downloads/InfiniTex-0.7.0-x86_64.AppImage 
6129
/bin/sh: 1: pdflatex: not found

pdflatex and everything it needs to run should be bundled inside the AppImage. Along the lines of

wget -c http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar xf install-tl-unx.tar.gz

# Install texlive relative to usr/
# [X] basic scheme (plain and latex)
# 2 collections out of 48, disk space required: 165 MB
# Its bin/ just needs to be put on $PATH, then existing TeXstudio AppImage works with it
mkdir -p usr/
cd usr/
echo "I" | TEXLIVE_INSTALL_PREFIX=../texlive ../install-tl-20160405/install-tl -portable -scheme basic
cd ..
fetacore commented 6 years ago

Thank you for including my project in your page!! Well if I include texlive inside the build the artifact will be close to 200mb, so I just give a notification to the user (when they enter "Science") to install texlive/mactex/miktex according to their os. An alternative would be a startup script to download and install core packages (tried that with dependencies and debian), but the installation would then take forever. Every other major program does that. I do not believe that github will be happy with an artifact this big and people downloading from it. And I also have to take care of cross-platform compatibility here (it is a pain already with all the bugs that windows introduce %@$#$^@$%^#*#$&$%)

The notification searches for the pdflatex command in the console, so users are sure to be ok if they do not see anything (as the linux way dictates). Also, with texlive, if you are, for example, a musician or a chemist and you require specific packages that are not included in texlive-core and portable editions, you have a problem and you have to install your additional packages as well. I believe the user should be free to choose their tex distribution and their packages, else I should make them download texlive-full (2GB).

probonopd commented 6 years ago

Well, think about an AppImage like a "Live ISO" but for applications. The beauty is that you don't have to install anything because all dependencies (that cannot be assumed to be part of each target system) come bundled inside the AppImage.

GitHub has no issues with 200 MB binaries in GitHub Releases (but don't check them into the git repository!)

fetacore commented 6 years ago

Ok now I finished with automatic updates and I am off to find a way to include the portable binary in the distribution. But if I include it in the AppImage, won't it's folder be read-only? If this is the case, texlive will not be able to install additional packages on demand. Correct me if I am wrong I just started working with AppImage. With native binaries this problem disappears, since I include the necessary texlive components as dependencies and they get installed along with the deb, rpm, pacman of infinitex.

probonopd commented 6 years ago

Correct, an AppImage is read-only by design. So you should bundle everything needed to produce a PDF (that would be sufficient for >90% of users who don't want to install custom packages beyond the ones that come inside the AppImage out-of-the-box). If the user wants to customize the setup, they can use --appimage-extract to extract (and then customize) the contents.