public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Support for Gitlab Flavored Markdown
Date: Mon, 16 Oct 2017 10:58:25 -0700	[thread overview]
Message-ID: <20171016175825.GA14267@protagoras> (raw)
In-Reply-To: <1fc1546b-3bb4-4140-b6ae-4b4d57f354ca-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

You could actually write a pandoc filter that handled the
nonstandard math formats.

You'd intercept inline Math and strip off the leading and
trailing backticks.

And you'd intercept code blocks with class "math" and turn
them into paragraphs with a display Math inline.

See the "Scripting with pandoc" tutorial on the website,
or if you want to use Python instead of Haskell, look at the
examples in the pandocfilters or panflute repositories.

For adding to pandoc, we'd need to add another extension,
something like `gitlab_math`, and the markdown reader would need
to be made sensitive to this.

+++ Ognyan Moore [Oct 16 17 10:49 ]:
>   I know KaTeX was already supported (Thanks for that!) but yeah the
>   ```math business was a bit surprising.  I'm not a gitlab expert but for
>   the most part they seem to have gone with feature parity with other
>   products, and having their own version of markdown was a bit of a head
>   scratcher; no idea why they decided to implement that.
>   I have no idea what kind of work is involved with getting this
>   implemented; I would be happy to test; or I can make an attempt at a
>   pull request based on existing markdown flavors.
>   Thanks again for developing an awesome product!
>   On Monday, October 16, 2017 at 9:46:21 AM UTC-7, John MacFarlane wrote:
>
>     We support KaTeX.  (--katex)
>     I had a quick look at the page on gitlab-flavored markdoown.
>     Pandoc has extensions for
>     multiple underscores in words (+intraword_underscores)
>     URL auto-linking (+autolink_bare_uris)
>     Code and syntax highlighting (+backtick_code_blocks)
>     Not supported:
>     multiline blockquote
>     inline diff
>     special gitlab references
>     task lists
>     videos
>     special gitlab references
>     gitlab's special format for specifying math:
>       $`x`$ inline
>       ```math
>       block
>       ```
>     If you'd like, you can add an enhancement request to the
>     issue tracker for these features (please give the details
>     above).
>     But, part of me dies inside at the thought of supporting
>     yet another syntax for specifying math in Markdown (I thought
>     the three we already supported were enough!).
>     +++ Ognyan Moore [Oct 16 17 09:31 ]:
>     >   I have a feature request, to support [1]gitlab flavored
>     markdown.  The
>     >   need in my case came from using gitlab at my academic
>     institution, and
>     >   it I create pdfs of my markdown documents routinely.
>     >   Gitlab flavored markdown uses KaTeX for math, which I understand
>     Pandoc
>     >   current does support.  The main issues I've noticed with
>     pandoc/gitlab
>     >   flavored markdown compatibility has been with the use of math
>     (although
>     >   there may be other issues I have not encountered).
>     >   Thanks,
>     >   Ogi
>     >
>     >   --
>     >   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 [2][1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     >   To post to this group, send email to
>     >   [3][2]pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     >   To view this discussion on the web visit
>     >   [4][3]https://groups.google.com/d/msgid/pandoc-discuss/
>     fe1c8b88-6faa-484f-
>     >   a488-ae73a9982f14%[4]40googlegroups.com.
>     >   For more options, visit [5][5]https://groups.google.com/
>     d/optout.
>     >
>     >References
>     >
>     >   1. [6]https://docs.gitlab.com/ee/user/markdown.html
>     >   2. mailto:[7]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     >   3. mailto:[8]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     >   4. [9]https://groups.google.com/d/msgid/pandoc-discuss/fe1c8b88-
>     6faa-484f-a488-ae73a9982f14-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=
>     email&utm_source=footer
>     >   5. [10]https://groups.google.com/d/optout
>
>   --
>   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 [11]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [12]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [13]https://groups.google.com/d/msgid/pandoc-discuss/1fc1546b-3bb4-4140
>   -b6ae-4b4d57f354ca%40googlegroups.com.
>   For more options, visit [14]https://groups.google.com/d/optout.
>
>References
>
>   1. javascript:/
>   2. javascript:/
>   3. https://groups.google.com/d/msgid/pandoc-discuss/fe1c8b88-6faa-484f-
>   4. http://40googlegroups.com/
>   5. https://groups.google.com/d/optout
>   6. https://docs.gitlab.com/ee/user/markdown.html
>   7. javascript:/
>   8. javascript:/
>   9. https://groups.google.com/d/msgid/pandoc-discuss/fe1c8b88-6faa-484f-a488-ae73a9982f14-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>  10. https://groups.google.com/d/optout
>  11. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>  12. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>  13. https://groups.google.com/d/msgid/pandoc-discuss/1fc1546b-3bb4-4140-b6ae-4b4d57f354ca-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>  14. https://groups.google.com/d/optout


  parent reply	other threads:[~2017-10-16 17:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-16 16:31 Ognyan Moore
     [not found] ` <fe1c8b88-6faa-484f-a488-ae73a9982f14-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-10-16 16:46   ` John MACFARLANE
2017-10-16 17:49     ` Ognyan Moore
     [not found]       ` <1fc1546b-3bb4-4140-b6ae-4b4d57f354ca-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-10-16 17:58         ` John MACFARLANE [this message]
2017-10-22  2:52     ` Ognyan Moore
     [not found]       ` <fb1ebd48-5552-40d1-b8a9-f2dba65c9d7f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-10-22  4:23         ` John MacFarlane
     [not found]           ` <20171022042325.GD2743-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2017-10-22  4:38             ` Ognyan Moore

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=20171016175825.GA14267@protagoras \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@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).