From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: babel, beamer: Prevent apostrophe/single quote mangling, so examples can be reused from PDF Date: Fri, 11 Nov 2011 19:20:37 -0700 Message-ID: <8762iq13pm.fsf@gmail.com> References: <000301cca0db$5f5f60f0$1e1e22d0$@us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RP3D3-0000L9-9P for emacs-orgmode@gnu.org; Fri, 11 Nov 2011 21:20:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RP3D1-0000lZ-Jj for emacs-orgmode@gnu.org; Fri, 11 Nov 2011 21:20:45 -0500 Received: from mail-pz0-f47.google.com ([209.85.210.47]:32930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RP3D1-0000lU-CN for emacs-orgmode@gnu.org; Fri, 11 Nov 2011 21:20:43 -0500 Received: by pzk1 with SMTP id 1so4594013pzk.6 for ; Fri, 11 Nov 2011 18:20:42 -0800 (PST) In-Reply-To: <000301cca0db$5f5f60f0$1e1e22d0$@us> (Mikhail Titov's message of "Fri, 11 Nov 2011 19:35:33 -0600") 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: Mikhail Titov Cc: emacs-orgmode@gnu.org "Mikhail Titov" writes: > Hello! > > I=E2=80=99ve picked up some templates from orgmode tutorials and I can > successfully create PDF made of beamer slides with babelized R > code. The problem is that I can=E2=80=99t reuse text from pdf by copy-pas= ting > like SQL I used in RODBC examples. > > At some point all my single quotes are turned into something that is > not even on my keyboard and looks like reversed back quote. > > I=E2=80=99m not sure if mailing list can pass all these unchanged. I=E2= =80=99m getting > =E2=80=99 instead of ' in the output. > > What shall I look at to fix this? I really want all text to be easily reu= sable. > > I feel like it is a LaTeX related problem since I see tex file as it > is supposed to be. But there must be some workaround or at least > warning for babel users of org-mode. > > P.S. I typed in message in HTML mode and converted it to plain text > later. And it looks like even MS Outlook did this conversion in text > :( > > P.P.S. I have the following in output tex file if it makes any difference > > \usepackage[utf8]{inputenc} > \usepackage[T1]{fontenc} > > and I'm running MS Windows with latest org mode from git and MikTeX 2.9 . > > Mikhail > Hi Mikhail, I have seen a similar issue in which code *executed* by R returns weird nasty quotes. The following works for me to remove these quotes before the confuse TeX. ;; Replace nasty single-quotes returned by R. (add-hook 'org-export-latex-final-hook (lambda () (replace-regexp "=E2=80=99" "'"))) Hope this helps -- Eric > > > > --=20 Eric Schulte http://cs.unm.edu/~eschulte/