« Previous - Version 6/8 (diff) - Next » - Current version
Thibault P, 12/01/2021 10:57 pm


Installing AMC with Nix

Nix is part of the Nix packages collection, in unstable for now (as of 2021-11-05) and will likely be part of the 21.11 release.

Installation on NixOS

To install, either add auto-multiple-choice to environment.systemPackages in your configuration.nix. If you want to use TeX to write your questionnaires, you also need to add the package to your texlive installation, like this:

environment.systemPackages = with pkgs; [
auto-multiple-choice
(texlive.combine {
  inherit (pkgs.texlive) scheme-full;
  xtra =
    {
      pkgs = [ auto-multiple-choice ];
    };
})
];

Installation with Nix on non-NixOS platforms

The usual methods should work. You can either get a shell with AMC installed with nix-shell -p auto-multiple-choice, or install AMC in the user environment with nix-env -i auto-multiple-choice.

In both these cases, though, the .sty file won't be available to your TeXLive installation. To fix this, you can pass LaTeX an explicit TEXINPUTS, like this:

TEXINPUTS=:.:$(nix eval --raw nixpkgs.auto-multiple-choice.outPath)/tex/latex:$TEXINPUTS pdflatex questionnaire

Troubleshooting

AMC has been added very recently to Nixpkgs. If you encounter errors, make sure you're on unstable or at least 21.11 (not yet released at the time of this writing), and update your channels before installing.