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

Update fancyhdr.sty #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update fancyhdr.sty #22

wants to merge 1 commit into from

Conversation

TerraAr
Copy link

@TerraAr TerraAr commented Jan 10, 2025

Bug fixes.

Added package needed for command \NewDocumentCommand in old line 720

@TerraAr TerraAr closed this Jan 10, 2025
@TerraAr TerraAr reopened this Jan 10, 2025
@pietvo
Copy link
Owner

pietvo commented Jan 10, 2025

How old is your LaTeX version?

@FrankMittelbach
Copy link

Older than 2020 I would say. xparse was added to core LaTeX in 2020-10-01 release (see texdoc ltnews). I don't think xparse should be loaded. If at all, I would suggest adding a \NeedsTeXFormat{LaTeX}[2020-10-01] in the package.

@pietvo
Copy link
Owner

pietvo commented Jan 10, 2025

@FrankMittelbach
Or I could load it conditionally, like

\ifdefined\NewDocumentCommand\else\RequirePackage{xparse}\fi

Until now I have tried to support older LaTeX versions, if they are not excessively old.
Could there be a problem with using \RequirePackage inside an \if?

@FrankMittelbach
Copy link

@FrankMittelbach Or I could load it conditionally, like

\ifdefined\NewDocumentCommand\else\RequirePackage{xparse}\fi

Until now I have tried to support older LaTeX versions, if they are not excessively old. Could there be a problem with using \RequirePackage inside an \if?

please don't. That leads to really messy code and overall it is a maintenance nightmare. It is ok to try to support a couple of releases back, but in my opinion the limit should be low. Otherwise you introduce all kind of dependencies with other packages that then have to behave conditionally based on what you do etc.

In my opinion 2020 or even 2022 is a clear cutoff point, because so much new stuff got added to LaTeX in the recent years.

It adds a lot of burden to the few people that keep LaTeX alive and kicking if users run with really old versions but expect to add packages that have been written with features in mind that were provided many years later.

but if you want conditional processing I would organize that by LaTeX release, ie

\IfLaTeXFormatAtLeastTF{2020-10-01}{true}{false}

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

Successfully merging this pull request may close these issues.

3 participants