* babel, beamer: Prevent apostrophe/single quote mangling, so examples can be reused from PDF
@ 2011-11-12 1:35 Mikhail Titov
2011-11-12 2:20 ` Eric Schulte
0 siblings, 1 reply; 3+ messages in thread
From: Mikhail Titov @ 2011-11-12 1:35 UTC (permalink / raw)
To: emacs-orgmode
Hello!
I’ve 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’t reuse text from pdf by copy-pasting 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’m not sure if mailing list can pass all these unchanged. I’m getting ’ instead of ' in the output.
What shall I look at to fix this? I really want all text to be easily reusable.
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: babel, beamer: Prevent apostrophe/single quote mangling, so examples can be reused from PDF
2011-11-12 1:35 babel, beamer: Prevent apostrophe/single quote mangling, so examples can be reused from PDF Mikhail Titov
@ 2011-11-12 2:20 ` Eric Schulte
2011-11-12 3:17 ` Mikhail Titov
0 siblings, 1 reply; 3+ messages in thread
From: Eric Schulte @ 2011-11-12 2:20 UTC (permalink / raw)
To: Mikhail Titov; +Cc: emacs-orgmode
"Mikhail Titov" <mlt@gmx.us> writes:
> Hello!
>
> I’ve 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’t reuse text from pdf by copy-pasting
> 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’m not sure if mailing list can pass all these unchanged. I’m getting
> ’ instead of ' in the output.
>
> What shall I look at to fix this? I really want all text to be easily reusable.
>
> 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 "’" "'")))
Hope this helps -- Eric
>
>
>
>
--
Eric Schulte
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: babel, beamer: Prevent apostrophe/single quote mangling, so examples can be reused from PDF
2011-11-12 2:20 ` Eric Schulte
@ 2011-11-12 3:17 ` Mikhail Titov
0 siblings, 0 replies; 3+ messages in thread
From: Mikhail Titov @ 2011-11-12 3:17 UTC (permalink / raw)
To: 'Eric Schulte'; +Cc: emacs-orgmode
> -----Original Message-----
> From: Eric Schulte [mailto:schulte.eric@gmail.com]
> Sent: Friday, November 11, 2011 8:21 PM
> To: Mikhail Titov
> Cc: emacs-orgmode@gnu.org
> Subject: Re: [O] babel, beamer: Prevent apostrophe/single quote mangling,
> so examples can be reused from PDF
>
> 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 "’" "'")))
>
> Hope this helps -- Eric
Probably it was another issue. I've double checked in another text editor that I'm getting correct apostrophes in tex output. I tried with or without your code in dot emacs (I restarted emacs). It is something in LaTeX or some package that triggers it:(
I've came across this http://www.cs.sfu.ca/~ggbaker/reference/characters/#single . It says that for typewriter font LaTeX won't substitute apostrophe with closing single quote. However I thought that verbatim as produced by babel implies typewriter font.
Mikhail
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-12 3:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-12 1:35 babel, beamer: Prevent apostrophe/single quote mangling, so examples can be reused from PDF Mikhail Titov
2011-11-12 2:20 ` Eric Schulte
2011-11-12 3:17 ` Mikhail Titov
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).