Comments (5)
There is an issue with Pygment's LaTeX formatter that prevents the upquote
package from working since Pygments 1.6. I opened a Pygments issue nearly a year ago, but so far nothing has been done (although there are comments indicating some recent work).
When you say "(+ a small workaround)", I'm guessing you are doing something like this, redefining the quote character macro:
\def\PYZsq{\textquotesingle}
This approach doesn't work with the current alpha, because \PYZsq
is now \PYG<style_name>Zsq
. (Currently, a separate set of macros is created for each style, with the style in the name, since this allows formatting macros to be created only once, rather than on each use as in minted 1.7.) So for the alpha you would want something like this for the default
style:
\def\PYGdefaultZsq{\textquotesingle}
If Pygments doesn't incorporate a fix soon, then I will probably hard-code one into minted
as I try to close all open issues later this summer.
from minted.
Tim is actually waiting for me to fix the issue, but I got sidetracked by the RTF formatter and my own work. The pull request (#215) I submitted last year made too many changes, and was thus rejected. Sometime within the next month I will begin to make incremental changes to the LaTeX formatter, and upquote compatibility is early on the list of changes.
I will be posting changes to a wiki, and would love any help and feedback as I make these changes.
In short: a fix is on the way.
from minted.
You're exactly right regarding the "small workaround" I was using. I just
replaced it with your new, suggested one:
\def\PYGdefaultZsq{\textquotesingle}
and it's now working perfectly with minted 2.0a. Thanks!
On Wed, Jun 11, 2014 at 10:56 AM, Geoffrey Poore [email protected]
wrote:
There is an issue with Pygment's LaTeX formatter that prevents the upquote
package from working since Pygments 1.6. I opened a Pygments issue
https://bitbucket.org/birkenfeld/pygments-main/issue/889/single-quote-character-in-latex-formatter
nearly a year ago, but so far nothing has been done (although there are
comments indicating some recent work).When you say "(+ a small workaround)", I'm guessing you are doing
something like this
http://tex.stackexchange.com/questions/46880/in-the-minted-package-how-do-i-enforce-straight-single-quotes/47451#47451,
redefining the quote character macro:\def\PYZsq{\textquotesingle}
This approach doesn't work with the current alpha, because \PYZsq is now
\PYG<style_name>Zsq. (Currently, a separate set of macros is created for
each style, with the style in the name, since this allows formatting macros
to be created only once, rather than on each use as in minted 1.7.) So for
the alpha you would want something like this for the default style:\def\PYGdefaultZsq{\textquotesingle}
If Pygments doesn't incorporate a fix soon, then I will probably hard-code
one into minted as I try to close all open issues later this summer.—
Reply to this email directly or view it on GitHub
#34 (comment).
from minted.
@jambonrose Thanks for the update! Good to hear that progress is being made.
from minted.
I've just modified things so that if the upquote
package is loaded, and the problematic Pygments macro is used, then minted
will automatically patch the macro to \textquotesingle
. This should make things much simpler.
from minted.
Related Issues (20)
- [show-&-tell] ad-hoc adoptations from a different style to another one. HOT 1
- [feature] Support for PDDL programming language HOT 2
- [bug][compatibility] `Verbatim` environment generated by `minted` with `mathescape` broken with `babel`'s `magyar.ldf` (Hungarian 🇭🇺 language) HOT 1
- JSX highlighting is not working in overleaf HOT 1
- breaksymbolleft flush with line numbers HOT 2
- Write env content to file HOT 2
- Failed Compilation with MikTeX on windows HOT 19
- Overfull hbox with `mintinline` and `breakanywhere` in enumerate environment HOT 1
- Escapeinside content is misplaced in pygtex file for nodejsrepl type HOT 7
- Because of changes in one of the most popular Python installer on Mac, doc needs an improvement (`pip3 install Pygments` doesn't work anymore) HOT 2
- file extension `lol' cannot be used twice HOT 3
- autogobble option not working for me HOT 12
- Can not compile via latexmk in Windows HOT 5
- Missing Pygments output; \inputminted... HOT 2
- [Feature request] named code segments HOT 1
- Get full timestamp in XeTeX through \creationdate HOT 1
- Error : Missing Pygments Output HOT 9
- Feature request - mintinline max. depth and height HOT 3
- a line break tetxt has no bgcolor HOT 5
- Autumn theme breaks code wrapping HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minted.