Open mlhetland opened 6 years ago
pythontex
loads fvextra
to do code typesetting, and fvextra
loads lineno
to make its breaklines
option possible. lineno
and footmisc
are incompatible, but apparently only if footmisc
is loaded with the perpage
option.
I don't know enough about lineno
or footmisc
to be able to suggest a quick fix for either without digging in the source code. Another option would be to "fake" the loading of lineno
, so that it isn't ever actually loaded (instructions). That would probably work as long as you never need to use the breaklines
option when typesetting code.
OK, thanks! Further resolution here is not crucial to me, so feel free to close this, if you wish. I'll leave it open, though, in case it's something you'll want to look into in the future. (Maybe I will, too, if I get around to it :-))
I will at least add a note in the pythontex
and/or fvextra
documentation before closing this.
The faking trick worked nicely. Perhaps one could add an option to pythontex
(and fvextra
) to prevent the loading of lineno
? Somethink like breaklines=false
or something? Or if you add a note about it in the docs, that should be fine, I'm sure :-)
Ideally, I could remove the fvextra
dependency on lineno
, since it only needs a few lineno
features, and lineno
can conflict with several packages. I'll have to look into this more the next time I'm working on fvextra
.
I'm not sure which package is to “blame,” here, as any subset of two seems to work just fine, so it's sort of arbitrary that I chose to post the issue here (mainly because the bug appeared as I tried to use
pythontex
along with my existing.sty
files).Here's an example document:
The ordering of the three packages doesn't seem to matter, but if one of them is removed, or if the
perpage
option is removed fromfootmisc
, the error goes away.And the error is: