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 IES5GZ0vsWDkOQAAgWs5BA (envelope-from ) for ; Fri, 28 May 2021 19:59:57 +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 yKErFZ0vsWDFbQAAB5/wlQ (envelope-from ) for ; Fri, 28 May 2021 17:59:57 +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 932D4F7EA for ; Fri, 28 May 2021 19:59:56 +0200 (CEST) Received: from localhost ([::1]:33976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmgm3-0005Oe-LG for larch@yhetil.org; Fri, 28 May 2021 13:59:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmgka-0003l7-IP for emacs-orgmode@gnu.org; Fri, 28 May 2021 13:58:24 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:56254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1lmgkX-0005eM-Rl for emacs-orgmode@gnu.org; Fri, 28 May 2021 13:58:24 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4FsC8f59PJzQk28; Fri, 28 May 2021 19:58:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id 6dUmuK2AePPb; Fri, 28 May 2021 19:58:08 +0200 (CEST) References: <87bl8vr2j2.fsf@hfph.mwn.de> <87wnrjf9sg.fsf@posteo.net> <871r9qrhj3.fsf@sju.edu> From: Albert Krewinkel To: emacs-orgmode@gnu.org Subject: Re: Smart quotes not working correctly with single quotes Date: Fri, 28 May 2021 19:55:29 +0200 Message-ID: <87mtsespym.fsf@zeitkraut.de> In-reply-to: <871r9qrhj3.fsf@sju.edu> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain X-MBO-SPAM-Probability: ** X-Rspamd-Score: 2.85 / 15.00 / 15.00 X-Rspamd-Queue-Id: 3E00C1810 X-Rspamd-UID: f07fdf Received-SPF: pass client-ip=80.241.56.171; envelope-from=albert+org-mode@zeitkraut.de; helo=mout-p-201.mailbox.org X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, 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: Juan Manuel =?us-ascii?Q?=3D=3Futf-8=3FQ=3FMac=3DC3=3DADas=3F=3D?= 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=1622224796; 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; bh=T8gwzK/tk4PciPRAfK6TFMnsQ3D+4mUl2/URoqmPhl8=; b=si56ZdIaqLHpfLORz/b84VzOCIyxgNiloUonFfShbv6LnH7BGLKVQ6UZtgrnQYxsoAfV3s aejDSGrzCbJoKKdRTJ9kC9NrQYJ7C6EGd4XEtSFzshoRwuTUG/TJoUHaB+j+1auf+CqB4v wFoTgeg+IoGcauyapX5rJ3yOm45lGQb7KQqNoxoiJSxp9WCtO2gx5/17TSwt1bmml/ks+t JvfrbjMHzgDE8e8vhgqaIoGfW8miLgpcMdAt5TpEFmMvwPJBHDeAo1NvDJlVKq/sSHqHA7 Y+M/GA7NXYtACUeVqgItNbXk71NnN1Q5ZwuAUwBuXVvWP2y00gTkQq/RyF3+Kg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622224796; a=rsa-sha256; cv=none; b=cLi1q75vxL7fsH7ru69FpmnBwq0R60rCu+m/fvnnIPTKzzgeJH0zJyoxWIkwG3p0UjmbY4 rgmU6OUjYrHCjZY9eX6l4Umhn0gdgnF0c1jGMwNwnFXIvmWLAmu4zyngnUq8dBYgktfsG5 CZLJkP/jnWh6YijpoS6cVxIPZCW0gW8G8Hr9Rh+apCgIqkwgUehZHkT98DnhFUFam2UNX/ ip4tfTC0HYxktm8Frq24Xt+SfIrtBxYJI0y2hxRYWK/XC2bz3EXXlQteZQ9WgVNmBtECh8 LcUmN5UESI39Q7D3VBtUSM6mytNV9SrgXj0W5rKP6UQkjKjf0jLhUZGFYLMm7Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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: 1.27 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: 932D4F7EA X-Spam-Score: 1.27 X-Migadu-Scanner: scn1.migadu.com X-TUID: UO62wj0XI5HF Andreas G=C3=B6sele writes: > [...] 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. I apologize for the non-Emacs solution, but you can use pandoc in combination with the following Lua filter to get the desired result: https://github.com/pandoc/lua-filters/tree/master/pandoc-quotes.lua For LaTeX output, you can also pass -Vcsquotes as a parameter to force pandoc to make use of the csquotes package. Both should give you the desired results. HTH > 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 >> >> 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 >>> -- Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124