public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: controlling smart typography with org or markdown
Date: Sun, 26 Sep 2021 22:36:25 +0200	[thread overview]
Message-ID: <87ee9b6pme.fsf@zeitkraut.de> (raw)
In-Reply-To: <siqibs$2h1$1@ciao.gmane.io>

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 <simon-jbxitMBJ2LLQT0dZR+AlfA@public.gmane.org> writes:

> G'day all!
>
> As someone documenting command line software, I never want `smart` typography.
> Still, Pandoc lets me control it, right ? In the end, yes.. but I must share
> some notes. Perhaps I'm getting confused between readers and writers ? Any
> 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 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=org
> -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
> –version
>
> 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 investigated:
>
> 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
> –version
>
> 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

-- 
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 email 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.


  reply	other threads:[~2021-09-26 20:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26 19:40 Simon Michael
2021-09-26 20:36 ` Albert Krewinkel [this message]
2021-09-27 23:35 ` John MacFarlane
     [not found]   ` <4331fc4f-e662-4ea0-89c0-c62b0c0228e1n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-09-28  0:04     ` Ophir Lifshitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ee9b6pme.fsf@zeitkraut.de \
    --to=albert+pandoc-9eawchwdxg8hfhg+jk9f0w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).