emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Smart quotes not working with some languages?
@ 2013-11-13 21:11 Daniil Frumin
  2013-11-13 23:15 ` Rasmus
  0 siblings, 1 reply; 4+ messages in thread
From: Daniil Frumin @ 2013-11-13 21:11 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org Mode

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

Hi! I am using the latest org from git and I can't get org to export (I
need LaTeX export particularly) files with smart quotes.

The following example silently fails to produce smart quotes:

#+OPTIONS: ':t
#+LANGUAGE: ru
This is a 'test' "file".

* Headline with 'quotes'
** Subheading with "quotes".
   This is "some" 'text'.

Using 'fr' yields different quotes, for example. Is there a way to use
standard "english" smart quotes with different language? Right now my
example is producing bad LaTeX.

-- 
Sincerely yours,
-- Daniil Frumin

[-- Attachment #2: Type: text/html, Size: 771 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Smart quotes not working with some languages?
  2013-11-13 21:11 Smart quotes not working with some languages? Daniil Frumin
@ 2013-11-13 23:15 ` Rasmus
  2013-11-14 14:23   ` Daniil Frumin
  0 siblings, 1 reply; 4+ messages in thread
From: Rasmus @ 2013-11-13 23:15 UTC (permalink / raw)
  To: emacs-orgmode

Hi Daniil,

Daniil Frumin <difrumin@gmail.com> writes:

> Hi! I am using the latest org from git and I can't get org to export (I
> need LaTeX export particularly) files with smart quotes.

You need to add it to the variable org-export-smart-quotes-alist
defined in ox.el.  Put your cursor on the variable and do C-h v to
read about it.  Once you have added support for Russian, please make a
patch and submit it here so that other people can benefit from your
labor.

Thanks,
Rasmus

-- 
Dung makes an excellent fertilizer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Smart quotes not working with some languages?
  2013-11-13 23:15 ` Rasmus
@ 2013-11-14 14:23   ` Daniil Frumin
  2013-11-14 14:51     ` Rasmus
  0 siblings, 1 reply; 4+ messages in thread
From: Daniil Frumin @ 2013-11-14 14:23 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode@gnu.org Mode


[-- Attachment #1.1: Type: text/plain, Size: 720 bytes --]

Thanks!


I prepared a patch as you've suggested (attached).


On Thu, Nov 14, 2013 at 3:15 AM, Rasmus <rasmus@gmx.us> wrote:

> Hi Daniil,
>
> Daniil Frumin <difrumin@gmail.com> writes:
>
> > Hi! I am using the latest org from git and I can't get org to export (I
> > need LaTeX export particularly) files with smart quotes.
>
> You need to add it to the variable org-export-smart-quotes-alist
> defined in ox.el.  Put your cursor on the variable and do C-h v to
> read about it.  Once you have added support for Russian, please make a
> patch and submit it here so that other people can benefit from your
> labor.
>
> Thanks,
> Rasmus
>
> --
> Dung makes an excellent fertilizer
>
>
>


-- 
Sincerely yours,
-- Daniil

[-- Attachment #1.2: Type: text/html, Size: 1271 bytes --]

[-- Attachment #2: 0001-Adding-support-for-russian-to-smart-quotes-exporter.patch --]
[-- Type: application/octet-stream, Size: 1704 bytes --]

From d3ad2794088cdd284bf13f2a42a0326d5cb42643 Mon Sep 17 00:00:00 2001
From: Daniil Frumin <difrumin@gmail.com>
Date: Thu, 14 Nov 2013 18:15:16 +0400
Subject: [PATCH] Adding support for russian to smart quotes exporter

---
 lisp/ox.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lisp/ox.el b/lisp/ox.el
index 56c24c0..7837b17 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -4969,6 +4969,18 @@ Return a list of src-block elements with a caption."
      (opening-single-quote :utf-8 "‘" :html "&lsquo;" :latex "`" :texinfo "`")
      (closing-single-quote :utf-8 "’" :html "&rsquo;" :latex "'" :texinfo "'")
      (apostrophe :utf-8 "’" :html "&rsquo;"))
+    ("ru"
+     ;; http://ru.wikipedia.org/wiki/%D0%9A%D0%B0%D0%B2%D1%8B%D1%87%D0%BA%D0%B8#.D0.9A.D0.B0.D0.B2.D1.8B.D1.87.D0.BA.D0.B8.2C_.D0.B8.D1.81.D0.BF.D0.BE.D0.BB.D1.8C.D0.B7.D1.83.D0.B5.D0.BC.D1.8B.D0.B5_.D0.B2_.D1.80.D1.83.D1.81.D1.81.D0.BA.D0.BE.D0.BC_.D1.8F.D0.B7.D1.8B.D0.BA.D0.B5
+     ;; http://www.artlebedev.ru/kovodstvo/sections/104/
+     (opening-double-quote :utf-8 "«" :html "&laquo;" :latex "<<"
+    			   :texinfo "@guillemetleft{}")
+     (closing-double-quote :utf-8 "»" :html "&raquo;" :latex ">>"
+    			   :texinfo "@guillemetright{}")
+     (opening-single-quote :utf-8 "„" :html "&bdquo;" :latex "\"`"
+    			   :texinfo "@quotedblbase{}")
+     (closing-single-quote :utf-8 "“" :html "&ldquo;" :latex "\"'"
+    			   :texinfo "@quotedblleft{}")
+     (apostrophe :utf-8 "’" :html: "&#39;"))
     ("sv"
      ;; based on https://sv.wikipedia.org/wiki/Citattecken
      (opening-double-quote :utf-8 "”" :html "&rdquo;" :latex "’’" :texinfo "’’")
-- 
1.7.12.4 (Apple Git-37)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Smart quotes not working with some languages?
  2013-11-14 14:23   ` Daniil Frumin
@ 2013-11-14 14:51     ` Rasmus
  0 siblings, 0 replies; 4+ messages in thread
From: Rasmus @ 2013-11-14 14:51 UTC (permalink / raw)
  To: difrumin; +Cc: emacs-orgmode

Caio Daniil,

Daniil Frumin <difrumin@gmail.com> writes:

> I prepared a patch as you've suggested (attached).

Are the unicode entities correct?  In my UTF8-Emacs they look like,
e.g, "\302\253".  It could be OK, though and I could just be missing a
font that has these glyphs.

Also, please change the commit message as described here

      http://orgmode.org/worg/org-contribute.html#sec-5

(Hint: git rebase -i origin/master (probably you already know more git
then me, but in the off chance that you don't I've included a suitable
command)).

If you haven't signed FSF papers you should end the patch with
TINYCHANGE.

When resubmitting append your message with [PATCH].

Thanks again,
Rasmus

-- 
⠠⠵

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-14 14:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-13 21:11 Smart quotes not working with some languages? Daniil Frumin
2013-11-13 23:15 ` Rasmus
2013-11-14 14:23   ` Daniil Frumin
2013-11-14 14:51     ` Rasmus

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