1

I'm using TeXLive 2023 on Windows. I have the footmisc package installed, and use it like so:

\usepackage[symbol,perpage]{footmisc}

well, during document compilation, I'm getting:

File `perpage.sty' not found. \MakePerPage

So, I thought maybe I'd try installing the perpage package - but there is no such package in TeXLive.

The line triggering the error is line 477 of footmisc.sty, which says:

\MakePerPage{footnote}

Still not much help. Now, I would assume that if footmisc needs perpage.sty - it should have either included that file as part of the installation - and yet it's missing. Why am I getting this error, and what can I do about it?

Notes:

  • I know how to install TeXLive and individual TeXLive packages, please stop marking this as a duplicate of a question about doing that.
einpoklum
  • 12,311
  • 2
    Do you have https://ctan.org/pkg/bigfoot installed? – samcarter_is_at_topanswers.xyz Feb 06 '24 at 12:10
  • @samcarter_is_at_topanswers.xyz: No, why? Will that resolve the problem? – einpoklum Feb 06 '24 at 12:29
  • 2
    perpage (which gets loaded by footmisc if you use the perpage option) is part of the bigfoot texlive package. So you need to have it installed. – samcarter_is_at_topanswers.xyz Feb 06 '24 at 12:30
  • @samcarter_is_at_topanswers.xyz: No, the issue here is the fact that footmisc depends on a file from bigfoot but doesn't require it. – einpoklum Feb 06 '24 at 13:35
  • footmisc does require the perpage package if you use the option of the same name: l. 476 of footmisc: \RequirePackage{perpage} – samcarter_is_at_topanswers.xyz Feb 06 '24 at 13:38
  • @samcarter_is_at_topanswers.xyz: But there is no perpage package in texlive - which is why you told me to install bigfoot. So, footmisc requires bigfoot. – einpoklum Feb 06 '24 at 13:38
  • the perpage latex package is part of the bigfoot texlive package. A texlive package can contain several latex packages. Footmisc does not requite all of bigfoot, just the perpage latex package, but for convenience it is easier to install the whole bigfoot package. – samcarter_is_at_topanswers.xyz Feb 06 '24 at 13:39
  • 3
    (or install a complete texlive instead, this would also avoid problems with firewalls or outdated texlive versions as everything would already be installed) – samcarter_is_at_topanswers.xyz Feb 06 '24 at 13:49
  • "it should have installed it." Texlive doesn't normally do on the fly installation of missing packages. The user has to install them. – samcarter_is_at_topanswers.xyz Feb 06 '24 at 14:31
  • @samcarter_is_at_topanswers.xyz: See my answer. If I installed footmisc, texlive should have installed everything footmisc relies on. – einpoklum Feb 06 '24 at 14:31
  • bigfoot is a soft dependency, not every footmisc user will need it. – samcarter_is_at_topanswers.xyz Feb 06 '24 at 14:42
  • @samcarter_is_at_topanswers.xyz: There's nothing soft about that, it's just a dependency. – einpoklum Feb 06 '24 at 14:45
  • It is soft, because it is only required if you use the perpage option – samcarter_is_at_topanswers.xyz Feb 06 '24 at 14:45
  • @samcarter_is_at_topanswers.xyz Well, if you don't use footers at all in your document, maybe you don't really need any files. That doesn't matter. a dependency is a dependency and tlmgr should make sure it is satisfied. – einpoklum Feb 06 '24 at 14:48
  • 1
    If you think there is something wrong with how the package works, you should probably write the relevant author a message. Most people here are not responsible for how packages are coded, they only try to help others understand how the packages work. – Jasper Habicht Feb 06 '24 at 17:51
  • @JasperHabicht: It's not the footmisc package itself - which works fine , it is just the missing dependency. But I will get in touch with the TeXLive people about it. – einpoklum Feb 06 '24 at 20:16
  • 2
    in a perfect world every dependency would be resolve automatically without you having to think about it. In the real world you sometime have to install a package manually. Why do you make such a fuss about it? The obvious solution when you get such an error is to install the package and go on with life. – Ulrike Fischer Feb 06 '24 at 22:43
  • @UlrikeFischer: Because you can't install a "perpage" package manually. If that was the problem, of course I'd just install it. The thing is, perpage.sty was hiding inside another TeXLive package. – einpoklum Feb 06 '24 at 22:59
  • 2
    Yes in a perfect world perpage.sty would be in the perpage package, in the real world packages sometimes have a different name. See https://tex.stackexchange.com/a/274551/2388 or the documentation of tlmgr how to find which package contains a file. – Ulrike Fischer Feb 06 '24 at 23:24
  • @UlrikeFischer: And that's why users who come up against these situations ask question on TeX.SX, and other people answer them. That being said - software distributions track dependencies well enough (e.g. npm, conan, Linux distributions etc.) - so why can't TeXLive track theirs? Anyway, the answer you linked to would probably have worked for me; and if my question had been closed as a duplicate of that question, I wouldn't have complained. – einpoklum Feb 06 '24 at 23:29
  • @einpoklum just flag your question, mods and gold badge holders can add additional dupe targets. – samcarter_is_at_topanswers.xyz Feb 06 '24 at 23:32

2 Answers2

2

Now, I would assume that if footmisc needs perpage.sty - it should have either included that file as part of the installation - and yet it's missing. Why am I getting this error, and what can I do about it?

The footmisc package only requires perpage under certain conditions and not by default. Thus bigfoot is a soft dependency of footmisc:

https://tug.org/svn/texlive/trunk/Master/tlpkg/tlpsrc/footmisc.tlpsrc?revision=69890&view=markup

As of Feb 2024, texlive only considers hard dependencies. They are either specified by the package maintainers or contributed by users, so they are also far from complete. The user will have to install soft dependencies themselves. See https://tug.org/texlive/pkgcontrib.html#deps for some more information about package dependencies.

(rumours have it that some people work on a more automated way to deal with dependencies, so this situation might change in the future)

  • I don't know about all that, but this was recognized as a bug and fixed. So either the dependency was hardened, or they started installing soft dependencies. At any rate, the user will not have to install bigfoot to get perpage in footmisc. – einpoklum Feb 14 '24 at 23:31
  • The incorrect classification as hard dependency was removed in the mean time. – samcarter_is_at_topanswers.xyz Feb 14 '24 at 23:33
1

This is the result of a TeXLive bug (which has, by now, been reported and fixed by Karl Berry; but apparently, the fix may have been backed out). Indeed, the dependency of footmisc on perpage.sty should have resulted either in perpage.sty being installed as part of footmisc, or alternatively, should have created a package dependency between footmisc and another package which offers perpage.sty.

As described in this answer, you can search other packages for that file. This should result in:

bidi:
    texmf-dist/tex/xelatex/bidi/bidi-perpage.sty
bigfoot:
    texmf-dist/tex/latex/bigfoot/perpage.sty
lwarp:
    texmf-dist/tex/latex/lwarp/lwarp-perpage.sty
zref:
    texmf-dist/tex/latex/zref/zref-perpage.sty

The package we need is bigfoot. So, just install it, e.g. by using tlmgr install bigfoot) - and footmisc will now manage to find its missing file.

Thanks @UlrikeFischer for pointing me to the right way one should handle such situations.

einpoklum
  • 12,311
  • 1
    Could you update this? The dependency was removed because it is only soft i.e. adding the dependency was determined to be incorrect and your original report determined not to be a bug after all. As it stands, your answer will convince people something is wrong if it doesn't work automatically. (But the information about how to satisfy the dependency is obviously useful. You just need to make clear this is something people need to do for themselves unless they install a more complete system.) – cfr Feb 20 '24 at 07:09
  • @cfr Updated, but it is a bug after all. "Soft", "hard", call it what you will - if you need perpage.sty to use footmisc features, then it being missing after installing footmisc is a bug, period. If I had the time I would take this up with the TeXLive people, but I did my duty reporting the bug and it's up to them to not be ridiculous about it. – einpoklum Feb 21 '24 at 08:09
  • There is no such thing as "optional dependencies" for packages. There are dependencies, and non-dependencies. A package may recommend other packages, and may even be able to do more in the presence of different files on the system - but packages are never built so as to depend on non-dependencies, and thus never crash, or fail to load due to a missing shared library, etc. And that's because everything they depend on is present and working. footmisc depends on perpage.sty being present, as it assumes its presence. – einpoklum Feb 21 '24 at 22:14
  • "footmisc only looks for perpage if the perpage option is enabled" <- that means, that you can't use footmisc without perpage.sty . For it to be usable, it should never assume perpage.sty exists. It could say "option perpage not supported, blah blah blah" and that's fine. What it can't do is just load it. That's a dependency, as opposed to a non-dependency. Soft, hard, call it whatever you like. When you install footmisc the way it is now, bigfoot, or the perpage file, must be installed. – einpoklum Feb 22 '24 at 21:27
  • "the option is disabled" <- it's not disabled, it just defaults to false. If it were disabled, I would get an error message about an unsupported/unrecognized option. – einpoklum Feb 22 '24 at 21:28
  • 1
    "that means, that you can't use footmisc without perpage.sty" -> but the thing is, you can use footmisc without the perpage package. Many users do that. Only the users who use the perpage option need to have the perpage package. If you are forcing users to install things which they might or might not need, why bother with partial installations at all? If you want everything on hand for all possible uses of latex, this would mean everybody would need a full installation. – samcarter_is_at_topanswers.xyz Feb 22 '24 at 21:55
  • "you can use footmisc without the perpage package" <- crashing only in some cases rather than always does not count as "can use". – einpoklum Feb 22 '24 at 22:15
  • 1
    The user has the ability to not use a special option and thus not causing crashes. – samcarter_is_at_topanswers.xyz Feb 22 '24 at 22:17
  • @cfr: I haven't asked for a file which can't be found; footmisc has. And it's a bug of TeXLive to not avoid this happening; because footmisc.sty assumes perpage.sty can be loaded. – einpoklum Feb 23 '24 at 07:29
  • @einpoklum I've tidied up and recommend you do the same. – cfr Feb 24 '24 at 16:49