From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29301 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: controlling smart typography with org or markdown Date: Sun, 26 Sep 2021 22:36:25 +0200 Message-ID: <87ee9b6pme.fsf@zeitkraut.de> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6122"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBT5TYOFAMGQE2WEANBY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Sep 26 22:36:34 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f58.google.com ([209.85.221.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mUat0-0001NX-B1 for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 26 Sep 2021 22:36:34 +0200 Original-Received: by mail-wr1-f58.google.com with SMTP id l9-20020adfc789000000b00160111fd4e8sf12630565wrg.17 for ; Sun, 26 Sep 2021 13:36:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1632688593; cv=pass; d=google.com; s=arc-20160816; b=Yj5nKAOv5m2GqCSGchk8g9GLt3pBK72nXu2itrX1Rpjia39205WuEwDD0hYNXbZukY YMb3QHZQ2dsm4ZdxFB0GaUpsWtSiQyzAeoGJUCizqKGzbu9MHdazHlNXdOyvwnaedVOv mmXfy0Gk3GDMRE79MQYxTtAhb42Aby+ND9MMYQvqwW4ABzGp6jKVHPirpdONJSzJlOYE AZ+JPIWB2pJhq2mRG5/WPfpHOatTQHW2GqYpoP1hZ3oU1nBPq4F3eNFZ1EsHWG6JaJyn v1Iu9LTmyQeng5iL0Io0bqKE/9ToVP/rBfDUy3lXWpUY2UvuD9SOgrnQasiZ/UdzRaZI pMKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :mime-version:message-id:date:in-reply-to:subject:to:from:references :sender:dkim-signature; bh=6v3VpRwcO9O68lPamJTpgCMviTdz/2c5w0V/pZlEbqs=; b=N11Q/EpZcTGMVZp9lOPQfRMmLkVnjJdxoSQSnlDtDdr2QKv/+lABupcxZvuYQNm7we Ze0q4QS5ej/6yod+8opz7Fih2jPIt0dlzvT/dEU7WCyVFq/VRzGkszU23+BpSLRNoz4X fiF7Q7tR2+SHSG1YE2mYPJpEciCzQ4wNvIqIYEfhU1OBpSmJ1AYsCwkRiwQLe3Q3cCrT FlGu+nMAou4Ya+c/v74qrexPHvij5NDJjW0OhFz8igxAHr8elXZk0IsePOgG6B4oUYAp z0bLJ27VA62uMEbGiXbOhDByj3fPMcEUlKLlnjQrUmWymCez/CQ6KwWyxFyhcSXjn2pA cCcg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050::465:102 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:references:from:to:subject:in-reply-to:date:message-id :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=6v3VpRwcO9O68lPamJTpgCMviTdz/2c5w0V/pZlEbqs=; b=nMX3hgbuoRIwGnNlpNiP5gdBNa6xmL02sKgYfCB2SM4DWtdDwRAvfnMNWN7boSbE6S 4TCtLr8vAA1Do79mU6G5KKGy3CAdwWdJZGkVlJYaUue1Oh4qdpfanuFXNg9JDQCuq0G9 TzSRmicjDPvhCBRLmjp1ecmcYEeMLNyH7/QsjLsVDR1cY3acOxZWfSopdJlxKQT1q2qH CZdkysuoSRQ8wZQFsNSv6o4Y2sWipaYepbQX4yxUP4FrB3TkV9sbuFZ9lVf72WY17r56 9PFYSuEak52ekEOTQgeVLK7PyPak6qD1suUW/7nxWYbhUQP4FQuSOhF3SMBRj9lIxK3y sQiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:references:from:to:subject:in-reply-to :date:message-id:mime-version:content-transfer-encoding :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=6v3VpRwcO9O68lPamJTpgCMviTdz/2c5w0V/pZlEbqs=; b=RDZqq6RegBYpXio3WO34EBlKmbaBYdLhsrvBNk4N5FaT3lH8MLp0ti+iRqNc6W19pK aLmybpR/C791LJAVPF0SHQqC/UMTvLVuOtATLCAX2oqxGeH2ImwapLj9YJK8PvPCxWjF h3z8HDZx1FMNleCxXPbrtt2q5XPEaSDG2sSfdCMHts5jhOJd2ABq7r/sWrV6wgeur6tI swshdbZxLO2X2cHdIFX0AEQPQzpgi5c7Vnort6EWPCVjmQTraTa0Pi4Mf7e4G8J1bGTO CMFqRnPoni2xLOyNznFQsg+5m4IDQ8kdzGN92szoynGCeIFRpyHsGVK5lwmPekIrAOxc Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531H3y/5ArH1SI3JzQ3BjYf9lCRKqlJxhSA3ZGZqMLQIrSZSviUz lwbtt3YHdXTRqQO/GJSJl2Q= X-Google-Smtp-Source: ABdhPJz1q7C8d7CyF7gqRWqaygpUA5KbQpZMVHstuvAXK6UMcqZdEix22lSa/rohU6A8+ZSIPaa++Q== X-Received: by 2002:a05:600c:4e86:: with SMTP id f6mr13196939wmq.52.1632688593510; Sun, 26 Sep 2021 13:36:33 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:adf:c782:: with SMTP id l2ls2853916wrg.2.gmail; Sun, 26 Sep 2021 13:36:31 -0700 (PDT) X-Received: by 2002:adf:ef02:: with SMTP id e2mr23122294wro.401.1632688591064; Sun, 26 Sep 2021 13:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632688591; cv=none; d=google.com; s=arc-20160816; b=ziOP8dUmW5oUpXPfldM3Y101ro0hSwAC9jpyryVSeptIGLWweqwpltjlbhIwVmo0ZF 7Re5/KG76h87/ImOPuHYpksj6izflgfMeEm/BFdfCgA++VWlAuOLuP2dYyX73ibxMZq2 +CU81xAZ2wkqeD4Rj2iHOctqXWjz9mdTyR6GJTpof+o4cp8fA7riiVXXkAo9tCYajiJg FRu4GRxvx8j6rkL2zvykWbhZ2+blbd365ws8NFaMFTgJSoDOB3yfpsVX4rc4F6pCT6Bl QKrSD6klM/K29kcNcMSmQuSoyj89WwJdH+Us7RAY4BmoHtFoy7MzLddJPkEmgUyW8JdA cqbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:in-reply-to :subject:to:from:references; bh=kUWnMRqU8357tDueld0i3x87XJNlfoi7TUZ0UXoj2vE=; b=He1YZsWTzVLHtJbfyW+VVOhSc4amle88pTQ+wKsdF8JVy5CwqwiuqH/nzRd/7psW43 zMfg5g+wCg1VzjSLLYRPQGXMXWLvOSzN1Y3Lhlcnxauo30anMHfekCdHWS9+Hjx2Rg8j 8VJW0XjXFvollx5j/lYu1s3GysYYGbPrRPEGeAIwp3jCGdqPh/qygr/b2eI22tUW5feq rCFgxEa6CJTV1i+8Ll83Krm8yQbNdINg5oRas8hBobCsBlHEZwhaZZ7beANt1mmIObKH 2Us7KYo1nKGdwv/4wbP7OhMCAuaqpelwyJA0w3ERwO1Z4PE4c3AoZi1ebCBJv4Q3Hknv gqfw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050::465:102 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org. [2001:67c:2050::465:102]) by gmr-mx.google.com with ESMTPS id m12si75299wrb.5.2021.09.26.13.36.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Sep 2021 13:36:30 -0700 (PDT) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050::465:102 as permitted sender) client-ip=2001:67c:2050::465:102; Original-Received: from smtp202.mailbox.org (smtp202.mailbox.org [80.241.60.245]) (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-102.mailbox.org (Postfix) with ESMTPS id 4HHcxV5C1pzQjgR for ; Sun, 26 Sep 2021 22:36:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de In-reply-to: X-Rspamd-Queue-Id: 50FA8269 X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050::465:102 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:29301 Archived-At: I remember our [previous discussion] where I promised to think about a solution. Unfortunately, I still don't have any, ideas welcome. [previous discussion]: https://github.com/jgm/pandoc/issues/4788 There is a section on `smart` and the org extension on the website. Here, too, I'd welcome suggestions for improvements. https://pandoc.org/org.html#smart-extension Simon Michael writes: > G'day all! > > As someone documenting command line software, I never want `smart` typogr= aphy. > Still, Pandoc lets me control it, right ? In the end, yes.. but I must sh= are > some notes. Perhaps I'm getting confused between readers and writers ? An= y > comments welcome. > > > 1. A small correction > --------------------- > >> https://pandoc.org/MANUAL.html#extensions: "For example, --from > markdown_strict+footnotes is..." > > The underscore is a typo I think. > > > 2. With the org reader, smart can not be disabled > ------------------------------------------------- > >> https://pandoc.org/MANUAL.html#extension-smart: "Interpret straight > quotes as curly quotes, --- as em-dashes, -- as en-dashes, and ... as ell= ipses. > " > > This suggests smart is disabled by default for org (reader, or so I think= ): > > $ pandoc --version > pandoc 2.14.2 > Compiled with pandoc-types 1.22, texmath 0.12.3.1, skylighting 0.11, > citeproc 0.5, ipynb 0.1.0.1 > ... > $ pandoc --list-extensions=3Dorg > -ascii_identifiers > +auto_identifiers > +citations > -east_asian_line_breaks > -gfm_auto_identifiers > -smart > > But this shows it enabled by default: > > $ echo '--version' | pandoc -f org -t native > [Para [Str "\8211version"]] > > And enabling/disabling the extension has no effect: > > $ echo '--version' | pandoc -f org-smart -t native > [Para [Str "\8211version"]] > $ echo '--version' | pandoc -f org+smart -t native > [Para [Str "\8211version"]] > > > 3. With the markdown writer, smart is selected oppositely > --------------------------------------------------------- > > Since I am converting to markdown, maybe I could control it there. I was = already > disabling smart in the markdown writer I thought, but it was not working: > > $ echo '--version' | pandoc -f org -t markdown-smart > =E2=80=93version > > Then I found this: > >> "Note: If you are writing Markdown, then the smart extension has the > reverse effect: what would have been curly quotes comes out straight." > > Which indeed achieves my goal: > > $ echo '--version' | pandoc -f org -t markdown+smart > --version > > But.. why the reverse effect ? There must be a reason, but I found this > non-intuitive. > > > 4. More > --------------------------------------------------------- > > So it seems I have been *enabling* smart in my markdown web docs (with -t > markdown-smart) for years. But I haven't been seeing smart quotes/dashes; > apparently they were still being suppressed by other means. I investigate= d: > > With the markdown reader, smart is enabled by default, and disabled with = -smart > as one would expect (unlike the markdown writer): > > $ echo '--version' | pandoc -f markdown -t native > [Para [Str "\8211version"]] > $ echo '--version' | pandoc -f markdown-smart -t native > [Para [Str "--version"]] > > Here are the combinations of the markdown reader and markdown writer, as = I > understand them. > > A. from smart markdown to non-smart markdown: > > $ echo '--version' | pandoc -f markdown -t markdown > --version > > B. from smart markdown to smart markdown: > > $ echo '--version' | pandoc -f markdown -t markdown-smart > =E2=80=93version > > C. from non-smart markdown to non-smart markdown (why the backslash ?): > > $ echo '--version' | pandoc -f markdown-smart -t markdown > \--version > > D. from non-smart markdown to smart markdown (why no en-dash here ?) > > $ echo '--version' | pandoc -f markdown-smart -t markdown-smart > --version > > > And now I must go for a lie down. -- Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/87ee9b6pme.fsf%40zeitkraut.de.