From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SJfPFHBSsWD/iAAAgWs5BA (envelope-from ) for ; Fri, 28 May 2021 22:28:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id BppEEHBSsWA9NgAAbx9fmQ (envelope-from ) for ; Fri, 28 May 2021 20:28:32 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4754E1780C for ; Fri, 28 May 2021 22:28:31 +0200 (CEST) Received: from localhost ([::1]:48352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmj5p-0003tK-Ht for larch@yhetil.org; Fri, 28 May 2021 16:28:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmj5E-0003t8-VJ for emacs-orgmode@gnu.org; Fri, 28 May 2021 16:27:52 -0400 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]:38429) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lmj5C-0000N9-At for emacs-orgmode@gnu.org; Fri, 28 May 2021 16:27:52 -0400 Received: by mail-qv1-xf35.google.com with SMTP id k2so2551585qvc.5 for ; Fri, 28 May 2021 13:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sju-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=0v0B2TwhjRqd1s1OV7QV8Q6ghxbhKv2iycXuPZRaeVA=; b=oQTVDUMKUHVYOcnBYo2a0G+kCFfWShpyIfvsH86bDnRdHkpd6uwQVKHDRebiZhKu/e 9r24s/War3MN4nYUbfnqJ+qisrgAXSm6AP2AvPE4I7YUqiEgEtYO25AyOyHxZl4HQQml Tw2/y1hzxMHRLvKIvtrI7spO5jQID1pl2CB+NKTsnsomjCK4N4ER/d5Z1cSd4wDp0sgR 10tUz/ZC7nwvrmWRgGWyOrTZVtbYpxHSdg1O6NshbMsET4a/4sIwRdqAagOkUZg99tu5 0N3O2CkqmI+RK9wXJbuG8XR7VVnHZ47oBtOakHV4H0obqoAf7TPAMiJXzHIvSxeOZfbk Mg5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:organization:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=0v0B2TwhjRqd1s1OV7QV8Q6ghxbhKv2iycXuPZRaeVA=; b=PJ2xfleP0MlMXvlQt+Cq/inn2VdGpQ3Vlyer3HdvXFyoz/BdxsP62eYFGBWiRPP7nz mkAAhvSxqs9L6UBkkJz+9TEe804p0RTKr3U+jXilGJj3mYsJx1mZJnoiA0samopRwnId Rq1hbQUh01nARrl6UE2WqPc/MWKwBcaJIimXa4gsAuyf0iOupyNwDY9b1ZwXacBgtLSR l1HLR+/IyT4IiRElqN6sl+mR8FdEiPrPPll5w48YU0DZG9CuVscUR5r1bvinLO6yuEhp spt7ewK0OJEd1NEYdh4SqXY8uExA211M9PA7aqfzPbSoZzeCs0qgZ87vGvEFkthf33PU Kmfw== X-Gm-Message-State: AOAM53332UpVpN2NCBHuV0CyG0BtYvxRc3HKXKGU1e9qUpVfVb93sRyy 7jeVvjBOYeVT7J8IKMjaVZ+dtHx35s+Iug== X-Google-Smtp-Source: ABdhPJyM1Eynybe5di4zpZfWvWuFSq3SeJLZmoWSDljybcR1dL/c4UFNtbQrtTaMYM/Ct9X7Ifg82g== X-Received: by 2002:a0c:eb4d:: with SMTP id c13mr5983119qvq.48.1622233668679; Fri, 28 May 2021 13:27:48 -0700 (PDT) Received: from ag ([2603:301d:801:b400:ad9c:c76e:a230:2353]) by smtp.gmail.com with ESMTPSA id p11sm4210800qkj.3.2021.05.28.13.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 May 2021 13:27:48 -0700 (PDT) From: "Andreas =?utf-8?Q?G=C3=B6sele?=" X-Google-Original-From: Andreas =?utf-8?Q?G=C3=B6sele?= To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Subject: Re: Smart quotes not working correctly with single quotes Organization: Saint Joseph's University References: <87bl8vr2j2.fsf@hfph.mwn.de> <87wnrjf9sg.fsf@posteo.net> <871r9qrhj3.fsf@sju.edu> <87h7imkczz.fsf@posteo.net> Date: Fri, 28 May 2021 16:27:47 -0400 In-Reply-To: <87h7imkczz.fsf@posteo.net> ("Juan Manuel =?utf-8?Q?Mac=C3=AD?= =?utf-8?Q?as=22's?= message of "Fri, 28 May 2021 17:02:40 +0000") Message-ID: <87wnripprw.fsf@sju.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::f35; envelope-from=agoesele@sju.edu; helo=mail-qv1-xf35.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622233712; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=0v0B2TwhjRqd1s1OV7QV8Q6ghxbhKv2iycXuPZRaeVA=; b=Qz7JeQpncnwE3ZC8cJCQSuwJMyiZ/WXuaAcP8OjdaA0qcS0Kbb7lBNrQPxpkoD/2B4jtHG pNT8OdoVxBRe2jeFFl4vRB0IPiEN7VY8NGIOCIXElIUUvxhhcd84ewLpIuAx7Ol81jh3Dx Jd8oTgu4Y3GvDQPR9b/NXJgNYrFXiMLB6vr+KksKsb6o0jyqRszYTzx/LAth8bNDEqEeVI A7+2Rfgr9LSuXgJ4HfNtyKudzEjbAZFoY7Xkg1RqYvP1Ovu4AZoM6zZM8Lg8KAe+yzjrLV X6Q8TxJM7dC+eQ3Hwxvf8HZEIDkvcWR01KLoPqdgk0cRKxGCs8Natyl15e6vmw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622233712; a=rsa-sha256; cv=none; b=bBODxwNIm3pPrqYS+kCOB6PTBNoxMA3BOLt+3w+z1OsmKiexv5h0iSBaOSjEMqC7mAPIok FDGg8vGj1M/THEC53csJEdUkSHtC4JXCiqLry2HkjdAm6WLhqsYueWjqnbbaItLS6CPDPA Wp9xxGzvN0zPGMO/VuZ0pcOZzur/hf8WZaJ4uvDc11CmbjeadffAE4Z2nHqYKqdzq/Yt1H /ZTEpVu4KaeJ0WBfiv2zYjy4fu695MASbXtM5/Eq+F1V2M1F6qSkKpkpFQHsV2tPIrEMFE 8qSEcHu1LnyNKXEQ15BoaWqMyBv7t+GGkjjTYlhJMxZTgJ1tklMIis+GFetAnQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=sju-edu.20150623.gappssmtp.com header.s=20150623 header.b=oQTVDUMK; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=sju.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.53 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=sju-edu.20150623.gappssmtp.com header.s=20150623 header.b=oQTVDUMK; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=sju.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 4754E1780C X-Spam-Score: -2.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: DO1TcBTmO609 Thanks Juan Manuel! I tried it, but it doesn't work. It leaves the simple quotes untouched. Did you test it and did it work then? Best regards, Andreas Juan Manuel Mac=C3=ADas writes: > Hi Andreas, > > A quick fix (for LaTeX, odt and HTML), if you want to use second-level > quotes as first-level quotes in parts of your document, could be to > define a filter. You must put these quotes as =C2=B4 ... =C2=B4 (for exam= ple): > > #+LANGUAGE: de > #+OPTIONS: ':t > > #+BIND: org-export-filter-final-output-functions (single-quote-filter) > #+begin_src emacs-lisp :exports results :results none > > (defun single-quote-filter (text backend info) > (cond ((or (org-export-derived-backend-p backend 'html) > (org-export-derived-backend-p backend 'odt)) > (replace-regexp-in-string "=C2=B4\\([[:graph:]]+\\)" "=E2=80=9A\\= 1" > (replace-regexp-in-string "\\([[:graph:]]+\\)=C2=B4" "\\1=E2=80=98" > text))) > ((org-export-derived-backend-p backend 'latex) > (replace-regexp-in-string "=C2=B4\\([[:graph:]]+\\)" "=E2=80=9A\\= \\glq{}\\1" > (replace-regexp-in-string "\\([[:graph:]]+\\)=C2=B4" "\\1\\\\grq{}" > text))))) > #+end_src > > It's a =C2=B4test=C2=B4. "Please". > > Best regards, > > Juan Manuel=20 > > Andreas G=C3=B6sele writes: > >> Thanks Juan Manuel! >> >> Your suggestion works for LaTeX, but I need the other formats too. I >> tried to convert the LaTeX document with pandoc, tex4h and latex2html to >> odt and html but none of them produces the correct output. >> >> So I'm wondering whether there is any way to make org export to >> recognize single quotes also outside from double quote. It should be >> possible as inner quotes is not the only use of simple quotes. >> >> Thanks again! >> >> Andreas >> >> Juan Manuel Mac=C3=ADas writes: >> >>> Hi Andreas, >>> >>> I don't know if this is a bug, but I would say that in principle it's >>> the expected result. Single quotes are understood here as inner quotes >>> or second-level quotation marks, therefore they are only activated >>> nested in text with first level quotes: " ... '...' ... " >>> >>> lorem "ipsum 'dolor sit' amet" >>> >>> For LaTeX output, however, the csquotes package is a more powerful >>> option to control the correct quotation marks for each language. For >>> example: >>> >>> #+LaTeX_Header: \usepackage[german,english]{babel} >>> #+LaTeX_Header: \usepackage[babel=3Dtrue,autostyle=3Dtrue,german=3Dquot= es]{csquotes} >>> #+LaTeX_Header: \MakeOuterQuote{"} >>> #+LaTeX_Header: \MakeInnerQuote{=C2=B4} >>> >>> #+LaTeX: \selectlanguage{german}\EnableQuotes >>> It's a =C2=B4test=C2=B4. "Please". >>> >>> lorem "ipsum =C2=B4dolor=C2=B4 sit" amet >>> >>> Best regards, >>> >>> Juan Manuel=20 >>> >>> Andreas G=C3=B6sele writes: >>> >>>> Hi, >>>> >>>> even using "smart quotes", single quotes are not correctly exported in= to >>>> html, odt or latex. >>>> >>>> I have as document: >>>> >>>> | #+LANGUAGE: de >>>> | #+OPTIONS: ':t >>>> | #+OPTIONS: toc:nil >>>> | It's a 'test'. "Please". >>>> >>>> If I export it to html I get: >>>> >>>> | It’s a ’test’. „Please“. >>>> >>>> I should get: >>>> >>>> | It’s a ‚test‘. „Please“. >>>> >>>> If I export to latex I get: >>>> >>>> | It's a 'test'. "`Please"'. >>>> >>>> I should get: >>>> >>>> | It's a \glq{}test\grq{}. "`Please"'. >>>> >>>> If I export to odt I get: >>>> >>>> | It=E2=80=99s a =E2=80=99test=E2=80=99. =E2=80=9EPlease=E2=80=9C. >>>> >>>> I should get: >>>> >>>> | It=E2=80=99s a =E2=80=9Atest=E2=80=98. =E2=80=9EPlease=E2=80=9C. >>>> >>>> (The odt example outputs use utf8, I hope it gets transmitted.) >>>> >>>> So in all three cases apostrophes and double quotes are correctly >>>> exported, but not single quotes. Similar problem if I use "#+LANGUAGE: >>>> en". >>>> >>>> I have org-mode 9.3 with emacs 27.1. >>>> >>>> What could I do to get single quotes to be exported correctly? >>>> >>>> Thanks a lot! >>>> >>>> Andreas >>>>