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

Suppress duplicated definition warnings for conditional compilation #3850

Closed
sehHeiden opened this issue Jan 15, 2025 · 1 comment
Closed
Labels
enhancement New feature or (non bug related) change to the program. wontfix Issue will be discarded by the development team.

Comments

@sehHeiden
Copy link

From my university I got an latex template.

It's multilingual in that sense, that it uses ifgerman and only uses one of the newcommands.

Still I get the warning: Command '\thesiskind' is defined multiple times

Code example:

\ifgerman{\newcommand{\thesiskind}{Masterarbeit}}{\newcommand{\thesiskind}{Master's Thesis}}

I assume this is not top priority.

@sehHeiden sehHeiden added enhancement New feature or (non bug related) change to the program. untriaged Issue type still needs to be triaged or verified. labels Jan 15, 2025
@PHPirates
Copy link
Collaborator

Thanks for the suggestion. We implemented similar things in #3760 and #3810, however this is not a built-in \if-like command, but it is defined as
\newcommand{\ifgerman}[2]{\ifx\@german\@undefined #2 \else #1 \fi}

which means that if we want to support this, we need to introspect the definition, and find that the \ifgerman command has two arguments which are mutually exclusive.
I don't see an easy way of doing that generally at the moment, and I don't want to spend too much time on it because there already exists a proper LaTeX way to do this: actually define \ifgerman as an if, with \newif\ifgerman, set it to false when appropriate, and then use the \ifgerman ... \else ... \fi construct, which we already support I believe.

@PHPirates PHPirates added wontfix Issue will be discarded by the development team. and removed untriaged Issue type still needs to be triaged or verified. labels Jan 28, 2025
@PHPirates PHPirates closed this as not planned Won't fix, can't repro, duplicate, stale Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or (non bug related) change to the program. wontfix Issue will be discarded by the development team.
Projects
None yet
Development

No branches or pull requests

2 participants