NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.93k stars 13.95k forks source link

Handling of TeX-packages needs abstraction or better documentation #99592

Closed StefanSchroeder closed 4 years ago

StefanSchroeder commented 4 years ago

As a new Nixos-user I find the relevant section for Texlive in the Nixos-Manual (https://nixos.org/manual/nixpkgs/stable/#sec-language-texlive) perplexingly complicated. At the same time, the Wiki at https://nixos.wiki/wiki/TexLive is horribly sparse.

Let me lay out the use-cases that I personally have. As a long-time TeX-user I have a accumulated a variety of documents that use various packages. My ability to process them is like a test-bed to see if Nixos is for me.

E.g. https://ctan.org/pkg/memoir (which is in TL) https://ctan.org/pkg/acrotex (which is not in TL)

Although memoir is contained in TL, it cannot be found using https://search.nixos.org/packages?query=memoir. Thus it remains unclear what to do to install the memoir-package. I think installing Texlive-full, just to be sure is not a nice solution.

The package acrotex is not in TL (although the license seems to be a free one, I guess: The LaTeX Project Public License). I have no clue how to adapt the recipe in the manual (15.22.2) to install it.

What I am looking for is

(a) documentation that explains the usage of CTAN packages generically or (b) wrapper functions for CTAN-package inclusion.

for the three use-cases:

In the forums the typical response to these types of request is: Here is a link to the derivation that I made for this other package, you can adapt it to your use-case.

I kindly request (a) or (b) from the Texlive maintainers of nixpkgs. I am happy to assist with testing; though no Nix-skills available on my end.

@veprbl @Mathnerd314

287

Mathnerd314 commented 4 years ago

To install memoir it should be just like in the guide,

with pkgs;
texlive.combine {
  inherit (texlive) scheme-small memoir;
}

Although memoir is contained in TL, it cannot be found using https://search.nixos.org/packages?query=memoir.

I filed a bug for that: https://github.com/NixOS/nixos-search/issues/202

veprbl commented 4 years ago

For those wondering why acrotex is not included in texlive despite being licensed under LPPL, here is an old thread I've found: https://tug.org/pipermail/tex-live/2009-October/022862.html

StefanSchroeder commented 4 years ago

@Mathnerd314 : Thank you for the hint -- still, this is yet another example for the specific solution as already discussed in the problem description. (Which is of course appreciated!) Tomorrow, somebody else might want to install another package, perhaps one where the name of the nix-package is not trivially the CTAN-package name. Thus the request for documentation or a recipe for the generic case.

@veprbl : Well, that was more than 10 years ago, does the reason still apply? That's surely for the TL guys to decide. PDF is an ISO standard now and according to WP it's even "open", whatever that means. And although I am a free SW advocate myself, I'd rather want to leave the decision whether or not someone wants to use a SW package that is under a free license to them, even if this requires proprietary SW as a consequence. But that's a philosophical question that I don't want to entertain here. I will have a look, if there are any free PDF viewers today that would interpret the forms and the Javascript that this package introduces... And if there isn't, I'll make one. Haha, just kidding. That'd be non-trivial.

Thanks for waiting. A quick search didn't reveal any JS-capable free PDF viewers, but I looked at the WP article on PDF in more detail. There it says (bold by me):

PDF 1.7, the sixth edition of the PDF specification that became ISO 32000-1, includes some proprietary technologies defined only by Adobe, such as Adobe XML Forms Architecture (XFA) and JavaScript extension for Acrobat, which are referenced by ISO 32000-1 as normative and indispensable for the full implementation of the ISO 32000-1 specification. These proprietary technologies are not standardized and their specification is published only on Adobe's website.[8][9][10][11][12] Many of them are also not supported by popular third-party implementations of PDF.

On July 28, 2017, ISO 32000-2:2017 (PDF 2.0) was published.[13] ISO 32000-2 does not include any proprietary technologies as normative references.[14]

That means it remains to be examined, if the 2:2017 release did make the previously proprietary parts open or if they were removed entirely.

StefanSchroeder commented 4 years ago

I have started a new Wiki page here: https://nixos.wiki/wiki/Tex. It's yet a stub, but I plan on adding more recipes there.

StefanSchroeder commented 4 years ago

I am closing this issue now. There have been a number of good comments and the issue is not sufficiently clear wrt. what needs to be done to close it anyway. I have started a wiki-page (see prev. comment) as a starting point to work from there.

veprbl commented 4 years ago

@StefanSchroeder Thought you might be interested in a discussion about acrotex happening right now https://tug.org/pipermail/tex-live/2020-October/046230.html

Mathnerd314 commented 4 years ago

As a result of the discussion, acrotex is in tlcontrib now (http://contrib.texlive.info/), maybe we could package that repository.