From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Quotes for LaTeX export Date: Tue, 04 Feb 2014 17:05:32 -0500 Message-ID: <87a9e6v8ib.fsf@alphaville.bos.redhat.com> References: <87eh3iftc7.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAo7q-0004op-1k for emacs-orgmode@gnu.org; Tue, 04 Feb 2014 17:05:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAo7l-0005oK-9Y for emacs-orgmode@gnu.org; Tue, 04 Feb 2014 17:05:50 -0500 Received: from plane.gmane.org ([80.91.229.3]:46758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAo7l-0005o1-3H for emacs-orgmode@gnu.org; Tue, 04 Feb 2014 17:05:45 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WAo7i-0004B9-Vz for emacs-orgmode@gnu.org; Tue, 04 Feb 2014 23:05:43 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Feb 2014 23:05:42 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Feb 2014 23:05:42 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Rasmus writes: > Hi Laurens, > > Laurens Van Houtven <_@lvh.io> writes: > >> I'm writing a book using org-mode. On export, org-mode turns double quotes >> like "hello" into ``hello''. Some modern LaTeXes no longer support that >> form, instead preferring semantic markup. (The reasoning being that the >> markup implies a particular quote style, whereas quotation style is >> language-dependent.) > > This is not true. Quotes depend on your LANGUAGE-cookie. See > org-export-smart-quotes-alist. > > >> As a result, I get >> >> The preferred way to do that these days is, in the preamble: >> >> \usepackage{csquotes} >> >> ... and then later: >> >> \enquote{something} > > But this would require us to load an extra package. Org is quite > capable of handling this on the lisp side (and Org ≠ LaTeX). Clearly, > we could have a org-export-user-smart-quote-alist taking priority over > the predefined one. > >> I think it would make sense to support this for org, and perhaps eventually >> make it default behavior. FWIW: I had no idea about this until it bit me >> when my LaTeX document suddenly had bogus quotes in it. > > This has never happened to me, despite extensive usage of LaTeX for > almost ten years. > >> If there is no interest to add this to org, how do I hack org so that this >> is what it does? > > The cleanest way would be a filter, probably > org-export-filter-quote-block-functions and filter-plain-text. > > The easiest way would be a macro or simply redefining > org-export-smart-quotes-alist to suit your needs. > > Hope it helps. > IIRC, there was support for csquotes in the old exporter[fn:1] but I guess it went away when the new exporter came along. Nick Footnotes: [fn:1] e.g. see http://thread.gmane.org/gmane.emacs.orgmode/21588 and the following commit which applies to the *OLD* latex exporter: ,---- | commit 2b9afb9e63d2fd60a3bb09e33c9d4abb01586339 | Author: Bastien Guerry | Date: Mon Jul 11 15:10:00 2011 +0200 | | org-latex.el: New defcustom `org-export-latex-quotes' to control quotes. | | * org-latex.el (org-export-latex-quotes): New defcustom. | (org-export-latex-quotation-marks): Use it. | | This allows users to define what quotes they want to use as a | replacement of english double-quotes while exporting to LaTeX. | | In particular, if you use the csquote package, you can configure | Org to output something like \endquote{some quoted text} instead | of "some quoted text". | | Thanks to Frederik for bringing this issue up, and to Thomas S. | Dye, Nick Dokos and Stefan Nobis for elaborating this solution. `---- although I cannot find the thread of that discussion on gmane.