-
Notifications
You must be signed in to change notification settings - Fork 634
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
Fix #1735 pull request #1736
Closed
Closed
Fix #1735 pull request #1736
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Anteru sorry for oversight on my part. |
jfbu
added a commit
to jfbu/pygments
that referenced
this pull request
Mar 5, 2021
This reverts already merged pygments#1735 (after a commit from pygments#1736 to fix it) and applies the first envisioned method discussed in pygments#1734. The reason is that the pygments#1735-pygments#1736 method only partially repairs the minted compatibility. Minted queries from Pygments the stylesheet with a command prefix equal to the style name, which may contain (at least, so far) characters such as - and _, which are not normally allowed in LaTeX macros. So it modifies the meaning of - and _ before telling LaTeX to input the Pygments provided stylesheet. Thus, retoring the normal meaning of - e.g. must be done slightly differently than in be defined using the weird minted -. The pygments#1735-pygments#1736 method did fix compatibility with minted but *only* for those style names not using a -, and it creates another issue if used with style "paraiso-dark" e.g. which has a - character in its name. "De guerre lasse", I feel it is simpler to use the somewhat strange very localized hotfix of prefixing - by \string at the one spot where we need it to be its normal self. Hence this PR. Fix pygments#1734.
jfbu
added a commit
to jfbu/pygments
that referenced
this pull request
Mar 5, 2021
This reverts already merged pygments#1735 (after a commit from pygments#1736 to fix it) and applies the first envisioned method discussed in pygments#1734. The reason is that the pygments#1735-pygments#1736 method only partially repairs the minted compatibility. Minted queries from Pygments the stylesheet with a command prefix equal to the style name, which may contain (at least, so far) characters such as - and _, which are not normally allowed in LaTeX macros. So it modifies the meaning of - and _ before telling LaTeX to input the Pygments provided stylesheet. Thus, restoring the normal meaning of - e.g. must be done slightly differently than in be defined using the weird minted -. The pygments#1735-pygments#1736 method did fix compatibility with minted but *only* for those style names not using a -, and it creates another issue if used with style "paraiso-dark" e.g. which has a - character in its name. "De guerre lasse", I feel it is simpler to use the somewhat strange very localized hotfix of prefixing - by \string at the one spot where we need it to be its normal self. Hence this PR. Fix pygments#1734.
jfbu
added a commit
to jfbu/pygments
that referenced
this pull request
Mar 5, 2021
This reverts already merged pygments#1735 (after a commit from pygments#1736 to fix it) and applies the first envisioned method discussed in pygments#1734. The reason is that the pygments#1735-pygments#1736 method only partially repairs the minted compatibility. Minted queries from Pygments the stylesheet with a command prefix equal to the style name, which may contain (at least, so far) characters such as - and _, which are not normally allowed in LaTeX macros. So it modifies the meaning of - and _ before telling LaTeX to input the Pygments provided stylesheet. Restoring the normal meaning of - from inside the stylesheet must be carefully localized: at top and bottom of stylesheets some macros will use in their names the - and there the - must be the weird minted one, not the normal one. The pygments#1735-pygments#1736 method thus does fix compatibility with minted but *only* for those style names not using a -, but it creates another issue if used with e.g. style "paraiso-dark" which has a - character in its name. "De guerre lasse", I feel it is simpler to use the somewhat strange very localized hotfix of prefixing - by \string at the one spot where we need it to be its normal self. Hence this PR. Fix pygments#1734.
Anteru
pushed a commit
that referenced
this pull request
Mar 6, 2021
* Fix #1735 pull request * LaTeX: workaround to ensure compatibility with minted This reverts already merged #1735 (after a commit from #1736 to fix it) and applies the first envisioned method discussed in #1734. The reason is that the #1735-#1736 method only partially repairs the minted compatibility. Minted queries from Pygments the stylesheet with a command prefix equal to the style name, which may contain (at least, so far) characters such as - and _, which are not normally allowed in LaTeX macros. So it modifies the meaning of - and _ before telling LaTeX to input the Pygments provided stylesheet. Restoring the normal meaning of - from inside the stylesheet must be carefully localized: at top and bottom of stylesheets some macros will use in their names the - and there the - must be the weird minted one, not the normal one. The #1735-#1736 method thus does fix compatibility with minted but *only* for those style names not using a -, but it creates another issue if used with e.g. style "paraiso-dark" which has a - character in its name. "De guerre lasse", I feel it is simpler to use the somewhat strange very localized hotfix of prefixing - by \string at the one spot where we need it to be its normal self. Hence this PR. Fix #1734.
Anteru
added a commit
that referenced
this pull request
Mar 6, 2021
* Fix #1735 pull request * LaTeX: workaround to ensure compatibility with minted This reverts already merged #1735 (after a commit from #1736 to fix it) and applies the first envisioned method discussed in #1734. The reason is that the #1735-#1736 method only partially repairs the minted compatibility. Minted queries from Pygments the stylesheet with a command prefix equal to the style name, which may contain (at least, so far) characters such as - and _, which are not normally allowed in LaTeX macros. So it modifies the meaning of - and _ before telling LaTeX to input the Pygments provided stylesheet. Restoring the normal meaning of - from inside the stylesheet must be carefully localized: at top and bottom of stylesheets some macros will use in their names the - and there the - must be the weird minted one, not the normal one. The #1735-#1736 method thus does fix compatibility with minted but *only* for those style names not using a -, but it creates another issue if used with e.g. style "paraiso-dark" which has a - character in its name. "De guerre lasse", I feel it is simpler to use the somewhat strange very localized hotfix of prefixing - by \string at the one spot where we need it to be its normal self. Hence this PR. Fix #1734.
This was referenced Mar 8, 2021
This was referenced Mar 12, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I apologize for the trouble. I made a mistake in #1735, with
\makeatother
too early.