I have a problem with org smart-quotes. There are two cases that don't seem to be covered by the standard regexps to identify quotes, namely in the case '" and the case "'. The double quote in both examples is not identified and left as it is. I'm wandering if that's a bug to signal.

I don't know if there is a use-case for the second case, but the first is common for exemple in french: L'assise d'"opinions" muettes... But to make a general point I did a general example. For a working example, use virgin emacs with #+OPTIONS: ':t and that's all

The lines in org:

"Lorem" ipsum 'dolor' sit "'amet' consectetur" adipiscing "elit 'sed'" 
do '"eiusmod" tempor' incididunt 'ut "labore"' et dolore magna aliqua. 

become exported in tex as:

``Lorem'' ipsum `dolor' sit ``'amet' consectetur'' adipiscing ``elit `sed''' 
do '"eiusmod'' tempor' incididunt `ut ``labore"' et dolore magna aliqua. 

and so in the pdf it reads:

“Lorem” ipsum ‘dolor’ sit “’amet’ consectetur” adipiscing “elit ‘sed” ’ 
do ’"eiusmod” tempor’ incididunt ‘ut “labore"’ et dolore magna aliqua.

So everything works fine except the cases that I mentioned.

A minimal exemple easier to follow:

L'assise d'"opinions" muettes

in org becomes in tex:

L'assise d'"opinions'' muettes

My guess is that the double quote in these cases is not covered in the regexps used by smart-quotes and is overlooked. The standard regexps in org-export-smart-quotes-regexps are


I'm not a programmer so to me this is gibberish. Could somebody good at regexps tell me how to modify it to cover my orimary case? Or if someone had another solution, that would evidently be as good.

Unfortunately the Documentation of org-export-smart-quotes-regexps is "brief" and doesn't say how the regexps are used. It says only:

List of regexps matching a quote or an apostrophe. In every regexp, quote or apostrophe matched is put in group 1.

So one would have to identify which regexp is interesting here and how to modify it.


  • I'm having a hard time following your example. Please provide the shortest possible example including the expected outcome. In this case that seems to be L'assise d'"opinions" muettes. In org-8.3 I get something like L'assise d'``opinions'' muettes when exporting via ox-latex. If this is wrong, please report the error on the org mailing list. Thanks. – rasmus May 19 '15 at 13:55
  • No, I get L'assise d'"opinions'' muettes... But I checked and I'm using standard elpa org-8.2 I will check if this has been fixed in 8.3 – mat May 21 '15 at 8:18
  • You're right by the way, my example is probably overly complicated. I added the easier minimal example to the description. – mat May 21 '15 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.