Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clash with footmisc and thmtools #105

Open
mlhetland opened this issue Jul 24, 2017 · 5 comments
Open

Clash with footmisc and thmtools #105

mlhetland opened this issue Jul 24, 2017 · 5 comments

Comments

@mlhetland
Copy link

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:

\documentclass{article}

\usepackage[perpage]{footmisc}
\usepackage{thmtools}
\usepackage{pythontex}

\begin{document}
Foo.
\end{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 from footmisc, the error goes away.

And the error is:

TeX capacity exceeded, sorry [parameter stack size=10000].
\aliasctr@f@llow #1#2\@nil #3->
                               \ifx #1\@elt \noexpand #3\else \expandafter \...
l.7 \begin{document}
@gpoore
Copy link
Owner

gpoore commented Jul 24, 2017

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.

@mlhetland
Copy link
Author

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 :-))

@gpoore
Copy link
Owner

gpoore commented Jul 25, 2017

I will at least add a note in the pythontex and/or fvextra documentation before closing this.

@mlhetland
Copy link
Author

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 :-)

@gpoore
Copy link
Owner

gpoore commented Jul 27, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants