From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29358 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "'juh' via pandoc-discuss" Newsgroups: gmane.text.pandoc Subject: Re: nested iteration over variables Date: Mon, 11 Oct 2021 14:54:19 +0200 Message-ID: References: <8fa0e255-4ed7-4db7-eb28-a9aaa8b55613@mailbox.org> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TnmwVisewJUMipK4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15646"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDO25H455QHRBAPISCFQMGQENR2BJFA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Oct 11 14:54:28 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 1mZup2-0003ty-K4 for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 11 Oct 2021 14:54:28 +0200 Original-Received: by mail-lf1-f60.google.com with SMTP id c42-20020a05651223aa00b003fd328cfeccsf12667980lfv.4 for ; Mon, 11 Oct 2021 05:54:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1633956868; cv=pass; d=google.com; s=arc-20160816; b=SY56t/YtxxPFVN8hh+j92Av9A4tpnhFAzLuOFcyvJryhQcGNi1Q3XEM5vn1BM5wsHg w6oNZYUKBAQjiqHZDyfYjkBkOJ+v8AQyznNpzBCCyJasBi0Vg/nehbVn08hWizFOQ5aK HyO1xzZHGAZsciI/sUeOJSz7fhkVarueZCYgN7qhQsDqEctKLsN4g0zA0eyELiypT8zF Ym7CElnxOl1H+hj0Sunb48EMfNQ3+RiOtd9bmtvIycLlJ1KOqEt4QJKMRsTUBzZ9DuG6 +4C5lLh3posMT+QXVV8WJJ5wL/0q0WtKXNf5Jw19WElGoYZgdQwOc/GlwLY2Cn638Hsh 6Fcg== 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:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:dkim-signature; bh=oGF1itby9m6gDvQuXPwsGRwvHlzqvbgnhUsOejq5im4=; b=WOjx+ij212FGZzYOWXFGlwdsXZHleXqg8NQm/6rbTq5QU9bWVXGAlzl8eQ82NaJmpe A2vIj4WQ8IYB/arqIbEsqfJGZVTi7FE41z3goA5295Ak/fTNzmQnGopSrAojKU+7JVsg JUnSi7zG7jeqnyCgG2PBaM8RtIg1+ZkwhGn1ZEW6gdXmGNdUDnSTXTdL39OuVkO/op2h eab/mo9aQ3Z20Huz6dZZ2m0WYZBZ3/c4axKxlK4fMz02wrHNEKY0SegxIyBw0VOlWA/t dMXs/J6AJRm82QPHNKK5PE/i/5udyq8M7CESHDclAPvYYSmZqFckZgQBjExMtdKP+6PW TGbA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=fail header.i=@mailbox.org header.s=mail20150812 header.b=sNjuTEfE; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=kiReW3ZF; spf=pass (google.com: domain of juh+pandoc-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org designates 2001:67c:2050::465:101 as permitted sender) smtp.mailfrom=juh+pandoc-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to: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=oGF1itby9m6gDvQuXPwsGRwvHlzqvbgnhUsOejq5im4=; b=rVk8iML74JFtjhTeCS7e8dmCt1ZHhDXVN51CmJfkWHo1eXQnTnzY3op9ujdVdQweYU crTMPIt4u/vf44hiaP0Yv3HOcro/cWcMnKPK3QQtldjDxCqAtzwVZxc9omek8jpgHZhI XjKdu3akjAUQSQ6C0sa8YwIaXdVLRJm0wBplYEg5NfNSuFCradsu9OiROlgFUo/T6fwn 3QCtJUSwqlH4fuFo9tsj/MqJj88xZWS8e8I9+QF5NkSpyhidTBK8SN4zmJX9VGv/hpfI hdJUpiC/R7sF2eAayZSZRibzmLhkjF+iM45Bb98ZSfdxNf+N1c2HHZvJtBwYPuaMj2zs UqAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to: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=oGF1itby9m6gDvQuXPwsGRwvHlzqvbgnhUsOejq5im4=; b=xfIT55OLv4l8DpIT6XWIT/fRd8o3FQLs0FuotAeVL2qYAX8hpLg9PEmpeelP7+VWou DFF6adyFzgobg/CRqd1+ZQAlX+TwyVUdDExhRux09bR52n26JlAcHXTT5NT7FiJKrrjj cILlCDxgaNBertyBgElYRnoAEmLqMeMMPVjmHkhJLYA61gcagmgX3w5Gnwrf5UL486mz QunatReUfkn0odeZYRr8Zwuu3JD6KkdJLbnKy7PKnMjaf6AzVLo3qKdFfXY8zC3LS5nY tf31mc/25gyKi9oOFCXpBNDQyqirTPt+j+fnAJ6lwDnpCFN1IRDfVli70702DEKp74X1 vxzA== X-Gm-Message-State: AOAM533VLPR5RnBe3v8kiPb0Osb8l7OAKzj/rdnthXznDb3HjDjw8lIc nPT/rJBLedsWOGjlWKusz5A= X-Google-Smtp-Source: ABdhPJw1v4VrBQOfsDCMaD8hKpTn/v1FY2T8guA3lb+0J5s2fGVytZ0xYgOgt3ldaAOnVdsLi9iCiA== X-Received: by 2002:a2e:a7d3:: with SMTP id x19mr9052569ljp.506.1633956867868; Mon, 11 Oct 2021 05:54:27 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:3a83:: with SMTP id q3ls255807lfu.2.gmail; Mon, 11 Oct 2021 05:54:25 -0700 (PDT) X-Received: by 2002:a05:6512:3181:: with SMTP id i1mr27827558lfe.29.1633956864949; Mon, 11 Oct 2021 05:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633956864; cv=none; d=google.com; s=arc-20160816; b=eTV2TA4XkIfNNYmQDEzIlq7NzxjrsVA7y4trIMd/hr55iHFcrfBtPANL3ThvSCUkXT LOg8qJFUDmRGpHKNCxmwIGED8TvHmA2xhiYzILBfdoOal0v3l4p84gPSGOLkn13OSt5/ UhUNzwmjSe/7zLz/GWlzfSSGKV6lPxGsY8L2vTzFuwf7jc9ME1UqNXzzoJe51JldlKnn Q8S5p9EVaFskcUkm1pDJLW7aOQXw/grJaSLqSXHicD+BTu8v34ILq8zAbpg+dDOfN2VQ yfK0mwoQJ67W4g8sI3ShH6BRQpWu0Rg/U/+ou++J2QhrAd5plHeLBT5kwRMIDrdS4p9a mM9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:dkim-signature:dkim-signature; bh=u5hUQ2v0wg5tuPlf8xU8QpAKHOrIrMyigg5zzUQo650=; b=fXa5CspTRhzNCa3kuUSPoAfzgoYYwtZ+HYYgWlg3MvQ/Dp8EeUJQbqcM8UemIS96uv hjlg08fkWvdILI2g5ReV66hlXbRe16zq6jQtK6qAHUntIcf+a6YFhdxZIhUjYpk71CBn AyB1IYhXiTENwH6weCRZgsgDuKhv9x6m/Zcs43tdq5aOwIYgiqAcN4cNIjuXQGPQ7dwu 7a1exogpuRris7zr0TNRYSBSMa1DtNGZ/chJ90foUhcak0wSRFI+k0zDNtRy4xpuUd8G XtHT7/6MJJsIw12dhYOlU1HMKhaQ8XvUERQBbGCjobQWsGx0MfgfsiVkgrEE0+7GbvHx IIWA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=fail header.i=@mailbox.org header.s=mail20150812 header.b=sNjuTEfE; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=kiReW3ZF; spf=pass (google.com: domain of juh+pandoc-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org designates 2001:67c:2050::465:101 as permitted sender) smtp.mailfrom=juh+pandoc-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.org Original-Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org. [2001:67c:2050::465:101]) by gmr-mx.google.com with ESMTPS id u26si567921ljg.7.2021.10.11.05.54.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 05:54:24 -0700 (PDT) Received-SPF: pass (google.com: domain of juh+pandoc-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org designates 2001:67c:2050::465:101 as permitted sender) client-ip=2001:67c:2050::465:101; Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4HSdzN07kzzQkm1 for ; Mon, 11 Oct 2021 14:54:24 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: E6A761838 X-Original-Sender: juh-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=fail header.i=@mailbox.org header.s=mail20150812 header.b=sNjuTEfE; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=kiReW3ZF; spf=pass (google.com: domain of juh+pandoc-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org designates 2001:67c:2050::465:101 as permitted sender) smtp.mailfrom=juh+pandoc-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.org X-Original-From: juh 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:29358 Archived-At: --TnmwVisewJUMipK4 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Dear John, thanks a lot. Am Thu, Oct 07, 2021 at 09:13:13AM -0700 schrieb John MacFarlane: > > Set up the metadata like this: > > ``` > --- > positions: > foo: > - name: Foo > feature: 2 > - name: Bar > feature: 3 > bar: > - name: Bar > feature: 55 > ... > ``` > > You can use the anaphoric variable name "it". > > ``` > $for(positions)$ > Foos: > $for(it.foo)$ > $it.name$, $it.feature$ > $endfor$ > Bars: > $for(it.bar)$ > $it.name$, $it.feature$ > $endfor$ > $endfor$ > ``` Additional question. Is it possible to use some logic in if-statements? $if(foo=2)$ Foo is Two. $elseif(foo=1)$ Foo is One. $else$ No Foo left. $endif$ TIA juh