From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29300 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Simon Michael Newsgroups: gmane.text.pandoc Subject: controlling smart typography with org or markdown Date: Sun, 26 Sep 2021 09:40:42 -1000 Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5294"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCKYBFEGRAJRBSEZYOFAMGQEQDALYZY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Sep 26 21:40:59 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f60.google.com ([209.85.167.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mUa1C-00019G-W8 for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 26 Sep 2021 21:40:59 +0200 Original-Received: by mail-lf1-f60.google.com with SMTP id s8-20020ac25c48000000b003faf62e104esf13828965lfp.22 for ; Sun, 26 Sep 2021 12:40:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1632685258; cv=pass; d=google.com; s=arc-20160816; b=XSZ9oL6vzkyVhNf/TuQP355UV2N07CtZNiI5jBUZYepLxc0pf+lfWp0tFZy5tHSicX Aw1TIeJL9EzV1UOG6IWTb0stSUC9UIR3eXBqN8sWy+WHpJfhw9Jmbl/0VYk6hmzEBwpK o/GPjg95AQtGDH7lveEjmFf9XYX7S55UEx60vA8jpRzKLs0yusV+vc2cTLtifRPpClnh xauAvY56P+jCyKqAetRduKPuAiuzWPJhRF0+U1Qtc3kAJsAoUX8vJ7VZxxrAa8R81RiR JO/bMLE/aZ8e8CIykDje9ae7ibIzTPSlams3JryNlJIdliIm2V7oUReP/B5q3K+5kPDJ OMcg== 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-language :user-agent:content-transfer-encoding:mime-version:message-id:date :subject:from:to:sender:dkim-signature; bh=MZ4eGtJZtHPczyVd6M+JeI4aUdfWi/xsUDNRr6TuqpA=; b=EZHqpL0L6BQyKgojldsUjU+MmVpgUF8IQno374C+7piS/xLTCzRCBY4Lp7rR4IMG1s WfUnkzbSwfQ3YU2OTC+qETMlvxnNAINPkEE/0n6POS41yS+DkZIGi0afftZT0MYAT+Fo EULR+u7p67043+0Y0MA7YfpnBf4GQpAzDVdGdiSuG+LLLda90KDdrAbHdyilHMBNCo1F 6Hq2N1dVvapRaklb5G2HUoaS8nSBGeMOEMGIMJArq0mvWf39JVhuGQTCrDP8icsYiPIR 9GOV+snri8m4c3BB744UticbGAS46JGTuYniMcnbwfTYEKCoO5GTDsNCGWIBaERxFHQS j+Xw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of gtp-pandoc-discuss@m.gmane-mx.org designates 116.202.254.214 as permitted sender) smtp.mailfrom=gtp-pandoc-discuss@m.gmane-mx.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:to:from:subject:date:message-id:mime-version :content-transfer-encoding:user-agent:content-language :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=MZ4eGtJZtHPczyVd6M+JeI4aUdfWi/xsUDNRr6TuqpA=; b=XFTo9gG0ed4QoNHuItuhA/nx4YeyH5RaxR7g3qecxGPDD6NeB9yGClpUBqw5OfGPwU PlM98+hAayiYZ6y502D09hnNO2cYexfmHhlmxzxvGH3qc/7ejR5gxhykpKfgEhUg6Dvf LnyTJlu5zAh4nBACEu8dHrfnEynTBiKIr6LDwBnYfBxANtWvnPfzgkyRECvAlFxrUZ39 uaf2JpcR+Cu13ANMBdvqhUUnbM6Jm1MwwaHbQiksWxoRGnFX+ek/8mR/FLZkqFrG5gTG KnjRoPJ5LT1qxw/2HVTze1HzoZaGgjhOEk+dMkVNR2zRDwk7Ybg6r/R5z5XcyLfvZ5zh zzKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:to:from:subject:date:message-id :mime-version:content-transfer-encoding:user-agent:content-language :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=MZ4eGtJZtHPczyVd6M+JeI4aUdfWi/xsUDNRr6TuqpA=; b=3o5miuXbdStA0x7zAWNREhT/F9Rc5F903fFWhoqDj9Wz+9h8vsWbV+wwR+04epN8G3 ax5VR451t/n4ppLCODyM63G7kq0r/yO9uQEE7h5qjIMrzkxCdKGsUtECJNCdgpi47l2H 8w99ijzJLMY7JJw3Ld6yohY8sI+zFNZndRuPZhrXY/0NS3nbqmZiqBZ/RFKk8BCZPygU Xia8pPWndGqQUnsuZGAAVjFfYDgqsTKbN5K90KvEyOQOcoksGIxZ1W5t6PHYVpU/9SB6 ed+eUcDOlyw9yseAWFVxh5vmvOlqvoeZFwo55oX8Bhv7HAnlGUqo4RcVPSyZXyCd6g46 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530EGB8jfbh+V5DWeuF1XaTWmEK4eujH9eensjcqaUVGMmJtJ8ej KXzSl14eclOqcNf3msL9AIE= X-Google-Smtp-Source: ABdhPJzxDR5qOLHMV5g7SHeM2yhIztaiXtKNK2Pd7SKc5MKFZRa1xmR6OQy2Oy2Fj737Ag6NUQ2SmQ== X-Received: by 2002:a2e:8590:: with SMTP id b16mr3938716lji.265.1632685258520; Sun, 26 Sep 2021 12:40:58 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:a304:: with SMTP id l4ls3053819lje.7.gmail; Sun, 26 Sep 2021 12:40:55 -0700 (PDT) X-Received: by 2002:a2e:b74c:: with SMTP id k12mr23833813ljo.510.1632685255727; Sun, 26 Sep 2021 12:40:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632685255; cv=none; d=google.com; s=arc-20160816; b=qhA8S1MQ6qslexpqXIITk29T+clJvKtKAhRrdfe0fHAJ4w73X/DDE5MZzH9Zcd+Muc AR0xMACTWAF7yj66u8ya2LI9WFo9qVvXqdTPBekPuXRthP/R3tHPzQGzbs+vb1VXHI/D sIRbmxxH2Q2sQKGKwXp4ekSfQWtHTNSDr7fsGkKOOlMe2/ITJeJcBU868evpEn2R+PzG ULaUFN8EYHpeNdw+NymTtMjzRyKszCReqw8jkON3KA/zidjWWCm15i1kO6LxQeltGcqY YIysaAmEAEnHJeCwNKu01Bm/t/mMlQUzqBlZsOIdh5LXALMTWs6DumXRtVJfYlkyihxY P7BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:user-agent:content-transfer-encoding:mime-version :message-id:date:subject:from:to; bh=G++F4nfYt608UOZmST7HqbvjRKFyPprYY8Lfu+eFPVQ=; b=q4iFqEpkNU4ei3afx0WsRqKKhTPIAhXe/inzE3Vmfype4LBInaoVoo/ahn7KIGMRP7 9ZVo/di/DtdZLoh3qUaxduUE38M2QIWV/6xU4ertKItqxi5mNcbcmg/agJsdJpzQvHfg mS051F7DzVk50xkHmlS7i5MqXlpgFT/BK0H6LmOJnyOVYWlt2SbdFqBJsn/7pucJA8yW 2W1u/4Vehm6gm+HW+5TTijJcvkrkuPy3NKd0AbbAix+2zODKqykDC49PiAoxjNsLyHEz QZ5KLAM8bc4KUS4lvS0NZobdUjiMfC4XPyP6X8HcUn0YbtF4bFlT1QrN7/ka61MOFTuG AnWw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of gtp-pandoc-discuss@m.gmane-mx.org designates 116.202.254.214 as permitted sender) smtp.mailfrom=gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from ciao.gmane.io (ciao.gmane.io. [116.202.254.214]) by gmr-mx.google.com with ESMTPS id x16si418559ljp.5.2021.09.26.12.40.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Sep 2021 12:40:55 -0700 (PDT) Received-SPF: pass (google.com: domain of gtp-pandoc-discuss@m.gmane-mx.org designates 116.202.254.214 as permitted sender) client-ip=116.202.254.214; Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mUa17-0000zL-5M for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Sun, 26 Sep 2021 21:40:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ X-Mozilla-News-Host: news://news.gmane.io:119 Content-Language: en-US X-Original-Sender: gtp-pandoc-discuss@m.gmane-mx.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of gtp-pandoc-discuss@m.gmane-mx.org designates 116.202.254.214 as permitted sender) smtp.mailfrom=gtp-pandoc-discuss@m.gmane-mx.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:29300 Archived-At: G'day all! As someone documenting command line software, I never want `smart`=20 typography. Still, Pandoc lets me control it, right ? In the end, yes..=20 but I must share some notes. Perhaps I'm getting confused between=20 readers and writers ? Any comments welcome. 1. A small correction --------------------- > https://pandoc.org/MANUAL.html#extensions: "For example, --from=20 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=20 quotes as curly quotes, --- as em-dashes, -- as en-dashes, and ... as=20 ellipses. " 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=20 already disabling smart in the markdown writer I thought, but it was not=20 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=20 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=20 non-intuitive. 4. More --------------------------------------------------------- So it seems I have been *enabling* smart in my markdown web docs (with=20 -t markdown-smart) for years. But I haven't been seeing smart=20 quotes/dashes; apparently they were still being suppressed by other=20 means. I investigated: With the markdown reader, smart is enabled by default, and disabled with=20 -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=20 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. --=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/siqibs%242h1%241%40ciao.gmane.io.