From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29766 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: What might be a good way to process macro's in markdown Date: Sun, 12 Dec 2021 10:12:38 -0800 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36575"; mail-complaints-to="usenet@ciao.gmane.io" To: Pum Walters , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBJHX3CGQMGQE55AHWSQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Dec 12 19:12:54 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-vk1-f184.google.com ([209.85.221.184]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mwTLC-0009IY-GH for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 12 Dec 2021 19:12:54 +0100 Original-Received: by mail-vk1-f184.google.com with SMTP id t193-20020a1f78ca000000b002f7fbb56d22sf7755353vkc.17 for ; Sun, 12 Dec 2021 10:12:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1639332773; cv=pass; d=google.com; s=arc-20160816; b=LECovpykK1FeiaHW2QsMZiJpTHVJB9hBthXihkAHs3HMKdUZ4UkaWi+XDAu1AsLDYx /O5xIFVUcv8YA2S/bvLTCSlEHZuh0a0WBZgYNPYah9B+e7qHAgwg+nv9+OMLqdd/OSO7 Nds3djNijHPaPEAxk/EqN1V89VG9QOrZheb2FMrZ8Jmht8OKDKYa7p1k8VUBh5e1izKY +cA14+mZ4wnH5I2tTA5H74dRsEg3un6bc7EgBnYK79RragmA8r9+zYj001ZiUXWY7GS+ I1jhy6al1gyLUxH2uPagItoRSxUxmRQ9fxVNQ62hUo1tIi97RgH0f2oNseMwOmC0QZfx Nhvg== 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:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=nHiqHjI0EDnDomVe5WaZdwUIIi14q1LfZsNiQhiK+N8=; b=LiqGMzvtfOEfr5tZ8IkI9Jf1vTzi85ewHDI0ize0WChVesuRsPYANG7CBwWejxTLRC NeHL9m872NqxW+XRZMMdB+zkZvelBHNHFWJO+fu/WIGZVzsAvqaHSejfnY7d8LJADAPB bn6nsZWmIgXnD0YpIV0qpu+dGRdfbykdx1tr7qR5F+zjWxizGObWEaEPrPHoc0zg7SMj l2CrcgbnW7qqMpDtBcy7OZ28A/7HkD7/wXua5XvzXTZkMIiNdiehZTu4iwWOeTSDQQ5k LVlAeFqdjiI/Czu9V98wt5b/iPKaCbSu4lthODkeAmwgd9WYUNuffxvhsdXUmuYaPY2m 07Sg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=F7tLtN6d; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1036 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version: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=nHiqHjI0EDnDomVe5WaZdwUIIi14q1LfZsNiQhiK+N8=; b=j5b0mLy1U3+IcFmT/Rp5PG9gE/skuKYnTRA3/jSQNgVHShngNsWU/wWRhUCy3WKEqC SovZ4KdBFKS6zj5N+UGnYTHIiiOeLOgQ7AAuoLOpxpJVnyZcZ8wPjRbKsMwRGeqB9G8F SEmSWRTRCBWS7A4n95egvWpQbjmPQW16gi5b4LKVMUjMdQOyap1KbEg65VOHJsoEc7xo 9rRflXE1guZfb1wxOnCJ1Rq34jEPXAcyHsZ7DEYdQlfjxqZesNp8AawRUM2j2XOtAFU9 ehfqlh9yULhjIa4uScnmu1n4K0qnHn5Jsf1JvjJ55BX4t08ygxuYrOh4t8KqqEpjK1gO rfcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version: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=nHiqHjI0EDnDomVe5WaZdwUIIi14q1LfZsNiQhiK+N8=; b=f0b8EEp0LA8zI13FKTUyZork79aiD7XBFsVmrpdeFuT9bnnwBlELRbtqyb9O6Aakcm ChL1ex2ojq0GMzCINI8bOKwYpSJDkhkmlA/+4WNuZxQ55hh6vCFtdPYGXun22obz+LfS 2qQ9NkLNX8g+l3YSMn7YuFDf73G5rWwYkHv1v1sQ52PcEftDSCUARxRmsiyxBbPakF2/ GBRz/RdDLsT/081/NUfvW5gYcz85MwMa/0IgV98USZ46UJpFFnG5tqtcJOuYmDkisa1Z P+HEc6iZVFPc19FlavwGM7pdp+nMuJcwHRjgFzImvhJ4MoITkiqfW4jbTZGSXF/OpUf5 4Zrw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533j/araCbl/bv/KOEzKp8QZ9rketNMEaD8SGinm6OKQ1H8Avldc 1qpFBYSi+8B+80nfExQ7lao= X-Google-Smtp-Source: ABdhPJyb3RQJmWXJw10NOR+dah28IJZh5296gRwYA/hJen3s9suYAe+uihcv5Ybq5AqIdan+1nBoOg== X-Received: by 2002:ab0:7e8e:: with SMTP id j14mr38276326uax.84.1639332773476; Sun, 12 Dec 2021 10:12:53 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a67:bc14:: with SMTP id t20ls4403120vsn.11.gmail; Sun, 12 Dec 2021 10:12:51 -0800 (PST) X-Received: by 2002:a67:62c4:: with SMTP id w187mr24976328vsb.70.1639332771762; Sun, 12 Dec 2021 10:12:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639332771; cv=none; d=google.com; s=arc-20160816; b=VCueqmRCJo/Xjw96uRGhGfOAucF686O5Yn4lTPm0nN5x6zjxx+renLxDcdkS08jhWd YwDZZKGl5H2LSR8kiWWeSg4EROQnsgclc5F+QmjArU4AY5WvV9+0HnBz/H876nMz1Bmf chxCT8dIUxzldoMqqlWvPXS24pDAeO50+Z0zFyUpczG2rPnDDGlmNsHyCJX2QlrF5Bu+ toq7kxOVv96EoNsSrK8vd4PpCFKMxwlLZcTEc7biYtv1L/DlfLQfPWqK7kXgTwSQ6hnB RJPoNSkC06rws/ZjPb5SKUKjvvZ5Pv+dlVwyFF0tGnsTySNechznXtB3qzJOHdL+coYA 91Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=cLvD9cFHsCKBVmjA5rXeLrsG/WwodNgB3VVCbLeA05w=; b=jDRP38NAOJZ6F2md4/Rk7zEhM2nk/UF08AzBwcsZJiQr2VEYP2BfSqf5wWuBaIRwJt 1ysRgCXiEC9jULSqgyeEDv8W02HBpPZJtBwZ34qs6T8NWO0ZhhBdaFDqAMyNgmz42PAL b+gU2nS5AV8fQHycxsz8imriDkKPxwiLwRZnaQoYHdQAtMFHW6K0apJwS5EOWI4CpyXI ldYaDV3UIeY763Z8hM1JS9TMU08WHj533nBAtF18LrLpoYVlPXyW+oHDKm2qv/0+EV6t HgdbFqK5TwOL6NPavbU6MuxxGEFNZsxyfwi/LiEUkinf6xPzGgEPywspe57PfPAmqHUC dv1g== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=F7tLtN6d; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1036 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com. [2607:f8b0:4864:20::1036]) by gmr-mx.google.com with ESMTPS id f7si801143uan.1.2021.12.12.10.12.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Dec 2021 10:12:51 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1036 as permitted sender) client-ip=2607:f8b0:4864:20::1036; Original-Received: by mail-pj1-x1036.google.com with SMTP id f18-20020a17090aa79200b001ad9cb23022so11570554pjq.4 for ; Sun, 12 Dec 2021 10:12:51 -0800 (PST) X-Received: by 2002:a17:90a:2a47:: with SMTP id d7mr7703371pjg.155.1639332770509; Sun, 12 Dec 2021 10:12:50 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id t38sm9843866pfg.218.2021.12.12.10.12.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Dec 2021 10:12:49 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 9329EA1D6; Sun, 12 Dec 2021 13:12:38 -0500 (EST) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=F7tLtN6d; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1036 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:29766 Archived-At: You might have a look at http://christophe.delord.free.fr/upp/ One could also use the new "custom reader" capability, creating a Lua custom reader that preprocesses the content, resolving macros, then uses pandoc.read to parse the result using pandoc's regular parser. Pum Walters writes: > 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.