question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

package a latex distribution

See original GitHub issue

The 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:closed
  • Created 7 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
ivoflipsecommented, Apr 27, 2016

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

1reaction
ocefpafcommented, Apr 28, 2016

Here is a recipe for packaging a basic version of TexLive.

If no one tries that I will give it a go later today. I want to package GMT and that requires Latex too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get LaTeX - Mac OS, Windows, Linux
LaTeX is free software under the terms of the LaTeX Project Public License (LPPL). LaTeX is distributed through CTAN servers or comes as...
Read more >
Latex distributions. What are their main differences? - TeX
Some GNU/Linux distributions provide it in their packaging ... A TeX distribution for Windows, essentially MiKTeX with something added.
Read more >
(\LaTeX\) Packages - How to Use LaTeX - Research Guides
What are LaTeX Packages? A basic TeX distribution doesn't actually provide much functionality. In most cases, creating a LaTeX document will ...
Read more >
1.2 Install LaTeX (TinyTeX) for PDF reports - Bookdown
TinyTeX is a custom LaTeX distribution based on TeX Live that is relatively small in ... You can install TinyTeX with the R...
Read more >
TeX Live - TeX Users Group
Many Unix/GNU/Linux operating systems provide TeX Live via their own distributions and package managers. Concise instructions, per platform:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found