From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurens Van Houtven <_@lvh.io> Subject: Re: Quotes for LaTeX export Date: Wed, 5 Feb 2014 12:30:35 +0100 Message-ID: References: <87eh3iftc7.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf301af77310bdb204f1a717da Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <_@lvh.cc>) id 1WB0h3-0000zf-Ex for emacs-orgmode@gnu.org; Wed, 05 Feb 2014 06:31:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <_@lvh.cc>) id 1WB0gy-0000py-Gs for emacs-orgmode@gnu.org; Wed, 05 Feb 2014 06:31:01 -0500 Received: from mail-yk0-f175.google.com ([209.85.160.175]:56062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <_@lvh.cc>) id 1WB0gy-0000pu-B3 for emacs-orgmode@gnu.org; Wed, 05 Feb 2014 06:30:56 -0500 Received: by mail-yk0-f175.google.com with SMTP id q200so576933ykb.6 for ; Wed, 05 Feb 2014 03:30:55 -0800 (PST) In-Reply-To: <87eh3iftc7.fsf@gmx.us> 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: Rasmus Cc: emacs-orgmode@gnu.org --20cf301af77310bdb204f1a717da Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Rasmus, On Tue, Feb 4, 2014 at 10:42 PM, Rasmus wrote: > 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. > To more accurately: *my* org-mode is turning double quotes into ``something'' when I export to LaTeX. I do not have an explicit language cookie set. That is the part you objected to, not the LaTeX part, right? > > 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 =E2=89=A0 LaTeX). Cle= arly, > we could have a org-export-user-smart-quote-alist taking priority over > the predefined one. > A package that, IIUC, is quite commonly available. Plus, the consequence is that on a bunch of new setups, you get busted quotes, whereas the csquote + enquote approach AFAIK works on pretty much any reasonable LaTeX installation. That said, if org does it, that's fine by me too. > 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 m= e > > 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. > This is a fairly new occurrence, and it is not true for all LaTeXes currently available. The motivation is the one that I have given above: quotations are language-specific and semantic markup is preferable. I don't have an exact list of which, but e.g. in ConTeXt MkIV it is now the default, and it is also the default for me on the current TeX Live when using lualatex or xelatex. This leads me to believe that perhaps it is not a *common* issue, but it Here is an example: https://f.cloud.github.com/assets/97816/2078835/cac687b6-8dc2-11e3-8b6a-00c= 1a8175c94.png > If there is no interest to add this to org, how do I hack org so that thi= s > > 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. > thanks! lvh --20cf301af77310bdb204f1a717da Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Rasmus,

On Tue, Feb 4= , 2014 at 10:42 PM, Rasmus <rasmus@gmx.us> wrote:
Hi Laurens,

Laurens Van Houtven <_@lvh.i= o> writes:

> I'm writing a book using org-mode. On export, org-mode turns doubl= e quotes
> like "hello" into ``hello''. Some modern LaTeXes no = longer support that
> form, instead preferring semantic markup. (The reasoning being that th= e
> markup implies a particular quote style, whereas quotation style is > language-dependent.)

This is not true. =C2=A0Quotes depend on your LANGUAGE-cookie. =C2=A0= See
org-export-smart-quotes-alist.

To more = accurately: *my* org-mode is turning double quotes into ``something'= 9; when I export to LaTeX. I do not have an explicit language cookie set. T= hat is the part you objected to, not the LaTeX part, right?
=C2=A0
> 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. =C2=A0Org is quit= e
capable of handling this on the lisp side (and Org =E2=89=A0 LaTeX). =C2=A0= Clearly,
we could have a org-export-user-smart-quote-alist taking priority over
the predefined one.

A package that, IIU= C, is quite commonly available. Plus, the consequence is that on a bunch of= new setups, you get busted quotes, whereas the csquote + enquote approach = AFAIK works on pretty much any reasonable LaTeX installation.

That said, if org does it, that's fine by me too.

> I think it would make sense to support this for org, and perhaps event= ually
> 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.

This is a = fairly new occurrence, and it is not true for all LaTeXes currently availab= le. The motivation is the one that I have given above: quotations are langu= age-specific and semantic markup is preferable. I don't have an exact l= ist of which, but e.g. in ConTeXt MkIV it is now the default, and it is als= o the default for me on the current TeX Live when using lualatex or xelatex= . This leads me to believe that perhaps it is not a *common* issue, but it =
=C2=A0

> 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.

thank= s!
lvh
--20cf301af77310bdb204f1a717da--