From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KIsuLZAisWBFDwAAgWs5BA (envelope-from ) for ; Fri, 28 May 2021 19:04:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id JZmkKJAisWCeTQAAB5/wlQ (envelope-from ) for ; Fri, 28 May 2021 17:04:16 +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 2040EDF3C for ; Fri, 28 May 2021 19:04:11 +0200 (CEST) Received: from localhost ([::1]:52378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmfu3-00088L-TC for larch@yhetil.org; Fri, 28 May 2021 13:04:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmfsm-00087w-JT for emacs-orgmode@gnu.org; Fri, 28 May 2021 13:02:48 -0400 Received: from mout01.posteo.de ([185.67.36.65]:37959) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmfsk-0004Vh-4U for emacs-orgmode@gnu.org; Fri, 28 May 2021 13:02:48 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 7C1A0240026 for ; Fri, 28 May 2021 19:02:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1622221362; bh=XaWD2HBK7vZG7nJWDvIssgAzvJhMn0WJVqygMuwSRxQ=; h=From:To:Cc:Subject:Date:From; b=WaW4aJ3y5nBrolqCyQwWgxcbhafiwrbohpiWJ+9i8GApS7GKDr5TWrgGatc4cjrA9 EVGubntdukcN3BhVemqTVsuJAofgUUiYqauDn+m0/yBeI93l47ykAlReUcjYQuEr11 fGMsr72SfnisQkYM1zlZDGed2GoT21ds9nCQM55N6thTsDwXkO0udPMTROeBa/x7D2 HzXGQlcqC7V/s4v69JbD/khvsXo7Ppd+vCHltxq2OzChuZsjqRUGbdYWZ+1GEeX23q TAksz0GiGZzX5TmIelQ2MIcVvtFJn5M+jTpq21BxEGg0Gi57r6RFKRy+f+ZzUTtZW6 OH9QiJmaMeH0w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Fs9wd6Gw2z9rxD; Fri, 28 May 2021 19:02:41 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: =?utf-8?Q?Andreas_G=C3=B6sele?= Subject: Re: Smart quotes not working correctly with single quotes References: <87bl8vr2j2.fsf@hfph.mwn.de> <87wnrjf9sg.fsf@posteo.net> <871r9qrhj3.fsf@sju.edu> Date: Fri, 28 May 2021 17:02:40 +0000 In-Reply-To: <871r9qrhj3.fsf@sju.edu> ("Andreas =?utf-8?Q?G=C3=B6sele=22's?= message of "Fri, 28 May 2021 11:42:56 -0400") Message-ID: <87h7imkczz.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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=1622221451; 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=UM6Yt+sVqcQPg9tdxrASHkPehoGAG68N5jZuDcAD7Jg=; b=k6lKPoIV8H3/+05RZeQPhyVaRXj1SGG22ayiWArv8075e5S1sr7OBfYCbEmx662oitCehP ex0Q7o1sVYGmkIg9ZpEVymTBZAEVDNkSFagYJR5cWZrKaGCD5leIbR5DJ9cL+78ZL3Vef2 IrUHmB5vxh+Uqp2l79X9/boHNSqyWhnCdKiJkpZplFfbo2dhJY4aS2mhSTMuLd18mNqpB7 rgS6M//dQ2ZxqznRGNSoi3ZaS0TCtto5ZK3w3Ag6In6lJBU0k9IfXiEtLLkgu9zgiDrnKz 1GKyOOw6B7xG6mYXjkZlayhqe7hAxz72626+muHxPb8ppGDHkWqdqEPtZU5FlQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622221451; a=rsa-sha256; cv=none; b=R7woGl1xo3MX1cp5WhaA480kiTJIz3b3/pEiJVxtx17prCLGHLmDhHg6zIbShEhrGGr9ak gDfHPe5Qt2MplsgrGh/xnlu89BuRfm2Qalo+988MfNM7VYpNfyOfFH2es4K/GGLWfghHZi vRyBZgtMjU3l/N1+515rSk5RSX1ZQGtemSfx1vARiFxJBgBLO0P3AHGwYrom7YxbRyJihp YEnsV/TEiqNuweBGrYB8OTPmIqaxU6Ihq92iqNQAvjJ4kWGzF3WqvwDxVhvU8nULwsrvWg 7mmqolIFHNbKGUnEWrdxeAo75X4nbwXSMoS6gTrgDstOVNpmWR6acB+7pvx6tw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=WaW4aJ3y; 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: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=WaW4aJ3y; dmarc=pass (policy=none) header.from=posteo.net; 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: 2040EDF3C X-Spam-Score: -3.13 X-Migadu-Scanner: scn1.migadu.com X-TUID: HqTC0FSj50OP 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 exampl= e): #+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=3Dquote= s]{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 into >>> 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 >>>