package a latex distribution
See original GitHub issueThe usecase would be that one could install pandoc (already packaged) and latex to get pdf output form nbconvert. For that to work it would be nessesary if the tex distribution would install the binaries into <env>\Scripts
on windows.
Unfortunately, this seems to be a lot harder than I thought (only tried windows):
repackage miktex portable
miktex directory structure means that the bin dir has to be separate from the script dir in the conda env (bin is in .\miktex\bin
and it expects the rest of the stuff in .
, so we end up with a directory structure below the conda env main dir 😕). But this means that we have to add .\miktex\bin
to the path, which is feasible using activate.d
scripts, but this again means that one would have to activate such an environment before starting the notebook server (or any other commandline program), which is IMO not gonna work (e.g. who activates the main environment? And my notebook server is installed in an env, but is started by just specifying the complete path to jupyter.exe in that env).
Miktex has the disadvantage that it is only available on windows, but the advantage, that the install size is little because it installs (can install) missing packages automatically.
texlive
The portable binary installer installs itself into ./bin/win32
, so that’s also not gonna work 😦 It seems it is possible to install texlive from source in the required form (setting bindir in the configure step), but just reading the documentation made me too scared to try (and it uses svn, which I don’t have installed…). And actually supporting a latex distributions is a bigger job than I want to try…
texlife is available in mac/linux/windows, but installing missing packages is a manual step (or the package gets really big…)…
So, what are the options?
- Use a repackaged miktex portable, use a
activate.d
script and warn user, that they have to use activate (I’ve actually no clue how that work out in the root environment), if they want to have access to the latex binaries in e.g.nbconvert
. Maybe get nbconvert, mpl and friends to add the dir if it exist (either upstream or in a patch). - Try to compile texlive on all platforms, putting the bindir in the dir which is anyway included in the path
- I’ve no clue if it would be possible to edit the binaries of texlive to remove the
\win32
part?
Any (other) ideas?
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (12 by maintainers)
Top GitHub Comments
We actually have a recipe for Miktex-portable on Windows: https://github.com/ClinicalGraphics/conda-recipes/tree/master/miktex-portable
It’s not necessarily pretty, but it has worked out really well for us so far.
We decided to package a version that included all the packages we needed, but you can simply download the miktex-portable.exe and build the package from the clean distribution.
We could be more specific about which scripts have to be available to act like a minimal Latex install, we just decided to move all scripts to Scripts. As long as this package is installed in the same environment (could be root) as nbconvert, you don’t have to do any additional activations
If no one tries that I will give it a go later today. I want to package GMT and that requires Latex too.