From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29764 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pum Walters Newsgroups: gmane.text.pandoc Subject: What might be a good way to process macro's in markdown Date: Sun, 12 Dec 2021 06:46:45 -0800 (PST) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_4388_930097362.1639320405690" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1575"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC657GFMTILRBVUW3CGQMGQEYI2ECEY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Dec 12 15:46:51 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f56.google.com ([209.85.161.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mwQ7k-0000Fg-UU for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 12 Dec 2021 15:46:48 +0100 Original-Received: by mail-oo1-f56.google.com with SMTP id y123-20020a4a4581000000b002c282d3ab49sf9113504ooa.14 for ; Sun, 12 Dec 2021 06:46:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=cAdk+vuzr4WZmLzC/6Ai0Vu+uFJ1zUE314f3oM2VmBI=; b=YBp5MK4o2ZEKPzAMhYmBZVe6vQoxjr1OTmkfEhOua7k5DlWj8pCP6/7JbtUQG9D+Fw 6iYNXE5qurl9GaTVnYw1XrShOsr47/qKFYI4hbshSWHwrgj2n2BI1HE6+MwkXlfesKNt jnCDtkMwcw2+SHHM9EFKuBhT1CEe3BNgWNSI8KTu1GxT04PQjuKZ56vsZ7ihqYWBgcd0 dLo2cNTXTwnZzYxtQBwIt1W7Y4Kap1IljH52rFW6q/67Hu2LlTuo4DUfTiHU7IDYqc2M OsEY5q19LdPRkT19M7kdP4cH02hrVwEOp709u/u1qMKggQKasIw6fTC5fhQ5y5EuU2ah AtpA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=cAdk+vuzr4WZmLzC/6Ai0Vu+uFJ1zUE314f3oM2VmBI=; b=gCEc9OtXWD2PzwWl/QYBVoqR9p5JV+eRYAADms5+5fmxJjr1LJz6sO3UZUpSPkXm4M D5pPgG9mAvTdIwBdk77uLH38pru6/fIwulSPy4gGqYc4+wJ+w6uDZleR4QXp0DNa2Rab kbDLPuavHSwVbwsDCOQarlZYJnlx6c87GVltPEC/PzxzdatcoR0zrPEsHwJxldoNiomT jEHpVE03EIzj4tsI01SbVf++hnNKeg7yIyXHRNoGKfW4KLOjugppLCsCIL0bHzkmOwQh GdKbuyb7JBtJnwx5FRShCPcEOSNQGkfVSZx3npC9wHiYlR14K68BfaVmNrYrHqT3jHsa y/VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=cAdk+vuzr4WZmLzC/6Ai0Vu+uFJ1zUE314f3oM2VmBI=; b=UnxNjds1W5L8WKqbrGLnUtykEEjJ2weLlKydHndyIqmaaHx/taMy3SegjbGtVzgaxC uxWrE4YSunke68a590uWUPG6PzDlX9z3qoX0HF56Qh1hqtkGZwSdUn259AQH29s0Cyjf pXpHtAGok0BEoKDCtZ+pKbC+eTculasW3XsyfQGYygZvOb4WJnlaO9s61TGPCQ8rlvKr e0H7Np9TK6vieEmwqU0n8aufQtu3eHIg5hHDlBn5fWnr+HhF7HFIDUQOVue9g+x5hZr3 Bz1HEEFi1JTV6+zS/MuKnMcn88SbMT3ZzfM0vHhEaKDifBmFC+YNM4hFQ43r0LalthQr NOvg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5339PL/Di9vjESL5mkWQizEMKprPq/Rf4cCnBrEaHTvI/zfKjBYd F/D14reAXGHlsCnMDTWx6IM= X-Google-Smtp-Source: ABdhPJx8uziSViVd/PnjWrifuJM4cc6YTtDtNFghdNtAyFdn7/mUj3mzVNryvSrjwuW44PBvKaXtCQ== X-Received: by 2002:a05:6830:138b:: with SMTP id d11mr20755121otq.235.1639320407898; Sun, 12 Dec 2021 06:46:47 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:3245:: with SMTP id y66ls4274598oiy.3.gmail; Sun, 12 Dec 2021 06:46:46 -0800 (PST) X-Received: by 2002:a05:6808:300b:: with SMTP id ay11mr22777056oib.120.1639320406165; Sun, 12 Dec 2021 06:46:46 -0800 (PST) X-Original-Sender: pum.walters-Re5JQEeQqe8AvxtiuMwx3w@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:29764 Archived-At: ------=_Part_4388_930097362.1639320405690 Content-Type: multipart/alternative; boundary="----=_Part_4389_7062349.1639320405690" ------=_Part_4389_7062349.1639320405690 Content-Type: text/plain; charset="UTF-8" What might be a good way to use and process macro's in Markdown. The docs have an example of variable-substitution, but not of more general macro's. A macro might look something like * ... ordinary markdown ...* * <<* name args >> * * ...body... * * <>* * ... ordinary markdown ...* where: - the name is an identifier - each arg is an identifier, number or string in quotes - the body is arbitrary text - Obviously, the parentheses <<*, <> could be anything that the parser could recognise Ideally, processing can be done in Lua, and the result of the macro is to be processed further, to generate Markdown, LaTeX, HTML or other languages. Any thoughts? -- 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/ea6c613e-6f98-4db4-b714-3b2fce85c090n%40googlegroups.com. ------=_Part_4389_7062349.1639320405690 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
What might be a good way to use and process macro's in Markdown. The d= ocs have an example of variable-substitution, but not of more general macro= 's.

A macro might look something like  &= nbsp; 
  ... ordinary ma= rkdown ...
    ...body...
=
  <<= / name >>
  ... ordinary markdown ...

=
where:
  • the name is an identifier
  • each arg is= an identifier, number or string in quotes
  • the body is arbitrary te= xt
  • Obviously, the parentheses <<*, <</ and >> cou= ld be anything that the parser could recognise
Ideally, p= rocessing can be done in Lua, and the result of the macro is to be processe= d further, to generate Markdown, LaTeX, HTML or other languages.
=
Any thoughts?

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/ea6c613e-6f98-4db4-b714-3b2fce85c090n%40googlegroups.= com.
------=_Part_4389_7062349.1639320405690-- ------=_Part_4388_930097362.1639320405690--