[-- Attachment #1: Type: text/plain, Size: 1040 bytes --] Hi everyone, I've noticed that when I use quotation marks in conjunction with an em dash (—), org-export-smart-quotes gets confused and forgets to activate smart quotes for the closing quotation mark. If my org-mode file contains a sentence like this... A [[ http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract][new study]] published in Psychological and Personality Science has found that helping other people---what scientists call being "prosocial"---increases your odds of finding a long-term relationship. ...then it exports to HTML like this: A new study <http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract> published in Social Psychological and Personality Science has found that helping other people—what scientists call being “prosocial"—increases your odds of finding a long-term relationship. Note the non-smart closing quotation mark. Does anyone know a fix for this? Thanks! Jay --- Jay Dixit jaydixit.com (646) 355-8001 Jay Dixit [-- Attachment #2: Type: text/html, Size: 3608 bytes --]
Jay Dixit <dixit@aya.yale.edu> writes:
> Hi everyone,
>
> I've noticed that when I use quotation marks in conjunction with an em dash (—), org-export-smart-quotes gets confused and forgets
> to activate smart quotes for the closing quotation mark.
>
> If my org-mode file contains a sentence like this...
>
> A [[http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract][new study]] published in Psychological and
> Personality Science has found that helping other people---what scientists call being "prosocial"---increases your odds of finding a
> long-term relationship.
>
> ...then it exports to HTML like this:
>
> A new study published in Social Psychological and Personality Science has found that helping other people—what scientists call
> being “prosocial"—increases your odds of finding a long-term relationship.
>
> Note the non-smart closing quotation mark. Does anyone know a fix for this?
>
The regexps are probably looking for spaces - try
... people --- what scientists call being "prosocial" --- increases
Nick
[-- Attachment #1: Type: text/plain, Size: 1734 bytes --] Hi Nick, Thanks for the suggestion. Putting extra spaces in the original solves the smart quotes issue, but creates unwanted spaces on either side of the em dash: A new study <http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract> published in Social Psychological and Personality Science has found that helping other people — what scientists call being “prosocial” — increases your odds of finding a long-term relationship. Thanks, Jay --- Jay Dixit jaydixit.com (646) 355-8001 Jay Dixit On Fri, Mar 27, 2015 at 2:45 PM, Jay Dixit <dixit@aya.yale.edu> wrote: > Hi everyone, > > I've noticed that when I use quotation marks in conjunction with an em > dash (—), org-export-smart-quotes gets confused and forgets to activate > smart quotes for the closing quotation mark. > > If my org-mode file contains a sentence like this... > > A [[ > http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract][new > study]] published in Psychological and Personality Science has found that > helping other people---what scientists call being "prosocial"---increases > your odds of finding a long-term relationship. > > ...then it exports to HTML like this: > > A new study > <http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract> published > in Social Psychological and Personality Science has found that helping > other people—what scientists call being “prosocial"—increases your odds of > finding a long-term relationship. > > Note the non-smart closing quotation mark. Does anyone know a fix for > this? > > Thanks! > > Jay > > --- > Jay Dixit > jaydixit.com > (646) 355-8001 > Jay Dixit > > [-- Attachment #2: Type: text/html, Size: 6673 bytes --]
Jay Dixit <dixit@aya.yale.edu> writes:
> Thanks for the suggestion. Putting extra spaces in the original solves
> the smart quotes issue, but creates unwanted spaces on either side of
> the em dash:
>
I understand but I can't really help. If I'm right that the regexps are
looking for a space[fn:1] (and that's a big if), then the only way to
fix it is to modify one or more of them (see
org-export-smart-quotes-regexps, which btw is a defconst, so not really
meant to be modified), but I'm not up to that task.
Let's hope that I'm wrong and somebody comes up with a simpler solution.
Nick
Footnotes:
[fn:1] or, rather, for something that the dash does not
satisfy
Hello,
Jay Dixit <dixit@aya.yale.edu> writes:
> Thanks for the suggestion. Putting extra spaces in the original solves the
> smart quotes issue, but creates unwanted spaces on either side of the em
> dash:
>
> A new study
> <http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract>
> published
> in Social Psychological and Personality Science has found that helping
> other people — what scientists call being “prosocial” — increases your odds
> of finding a long-term relationship.
I updated the algorithm for "smart" quotes. It's not perfect, but should
at least DTRT in your example.
Regards,
--
Nicolas Goaziou