From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28670 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.text.pandoc Subject: AW: I suggest adding setupitemize and setupenumerate variables to the default context template Date: Mon, 21 Jun 2021 15:02:16 +0000 Message-ID: References: <3ed3e1c40e2040db86789428aa9e68d4@unibe.ch> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_ae59265511394a88b77e647090e3b368unibech_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10253"; mail-complaints-to="usenet@ciao.gmane.io" To: Original-X-From: pandoc-discuss+bncBCZ27W53TUFBB66TYKDAMGQED5GIN5Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jun 21 17:02:22 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f55.google.com ([209.85.221.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lvLRN-0002TG-Mo for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 21 Jun 2021 17:02:21 +0200 Original-Received: by mail-wr1-f55.google.com with SMTP id x9-20020adfffc90000b02901178add5f60sf8557363wrs.5 for ; Mon, 21 Jun 2021 08:02:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1624287741; cv=pass; d=google.com; s=arc-20160816; b=mKOU4hp6Wj8iO6kNVqFPFLSCf0DiFcCgbIO76xzdsExDiq04GLW1C6PN+19iPCh8xW JDe6X72wlT7+hIwWcofMIrDvQvlUMKHuRxwg7e75FWltnJ2RRwUMJZVtNRCBeMjKUzx6 pdJPcmEXO7VRDfquT/D36VJHQze2thniEL6eH7Eg0dYtb7wbzvcDktvO/goRSOm07jop ptP54bwLB1Ds3OJ9SN11YjYzY3CQFUWHYaccSA+fOF65TO8SwsJXK4YJbZvVi2wVJT56 pRzD5fzyBeD50pdw5R+p/XG/ensnMIsm8MtNLjOpjwXNFgZSDKuuDPc/r4AVCc6G9/6y +OIQ== 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 :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:from:sender :dkim-signature; bh=T1/ByBOtSllqcUU7upvM5O4Izn1Fg8YtIxda4+pBGDU=; b=Cqso4tI2Zs8+y8qJa64BPRtR/FsKdHA7QV9e0TNjjNPKOvk4aCJW1w4aMc3fxeFhw6 r0rWl82OcIbga/26lnYgyRgtnUzbbHY+3l1Y+cKj7p7/BWei7VI1KxOVBZNx+8F+ezEx sx2OD47K/TdAxkxHfHC9R7yLqc/kr0QAiT2n6Dgo6yGYF0dno3ofYaARNmNfBRyR7zxs 7sXq9A4nNFq4UTUpbjb21FAOxTCNHQINpGXVY5SZJ7aErdVlLdkcHipY+iTrHp+/5T+8 671TLxbicNRaR2yKnmor2HOqviplMUIMGYbqzlqslOrwcV9iRn5Blt7Kwa+KtsAXS0W2 NuuQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.83 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:thread-topic:thread-index:date:message-id :references:in-reply-to:accept-language:content-language :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=T1/ByBOtSllqcUU7upvM5O4Izn1Fg8YtIxda4+pBGDU=; b=WOX8C7IhlBAJO3UAe6pqIh9kwzwqOZtV7Ts0uugRVCkwpayHnmJJd/4k/ys+JvjQdE N0kNiMsXl1zJKiBnVDLeXrd2MV57Rg42U7gxZTzeFNfFcJfuM90+w00LlWN4VsSPXzd0 igvoD/QHejQkzM+0yE5TF2rxNQxCGsLfljmuJ0a+b66pxjnnS8Mjdk17VGeoMvEY/J3A cN0rMRT/sFHSjCvvO/G/nTuau6jx6ZGZNEfuknLWR6elPWHfKsivq1W/D7LTI6J1k1cq Evqd9joBOsPQEkKX9YkRk9BGCSXrlX7Sa9c+0zFt+RQhx4FKbiP/hyGqUODGkSsP3l+M hhUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:thread-topic:thread-index :date:message-id:references:in-reply-to:accept-language :content-language: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=T1/ByBOtSllqcUU7upvM5O4Izn1Fg8YtIxda4+pBGDU=; b=D87cvHCf4csWHLO/tz7acf4ZqJonD8ppJVrP3BpADVUhxtSzkcmy7du6zXdzcDtCSH Kq+rs53lwIVjTYQZ5c87H9NRBUH82CSRgbYW6JbBWPvu/2bb7MfdFFbBXmGUDOw3Nw5f v2bjdilJVGVGFw4xMPaCfI9oiwSMdaR4kbKCwV9GOUhsnObrtx7yn4oZ16CYl9n6bRDt aynAj+psvwxcZiSOUaksWKLzeKTgcG9Aseq4kHI1NktOX3SGsnLUv9qwOblSDwRUP9ko B/uoAt27vdBLuooCYAWV5qKnCJK4lJj Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530YuSU2/NcAGhJESGbdWKtJtEAmdlFilHoxdSKqsdpdHt4EEP3T Fw4OApkdHllQ7njgQup6QvI= X-Google-Smtp-Source: ABdhPJw1V0vAbqwt6hJmx372gj2Js+jLAn+PVc1o8LAhiSEmkmomD/Gju8/oN7Jm0PEhD/DNdfEDLw== X-Received: by 2002:a1c:4682:: with SMTP id t124mr24047132wma.161.1624287741369; Mon, 21 Jun 2021 08:02:21 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a5d:6945:: with SMTP id r5ls772387wrw.2.gmail; Mon, 21 Jun 2021 08:02:19 -0700 (PDT) X-Received: by 2002:adf:f48c:: with SMTP id l12mr28992631wro.194.1624287738986; Mon, 21 Jun 2021 08:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624287738; cv=none; d=google.com; s=arc-20160816; b=fYHG4rnL8s5lX3g0vaduGnMaMb7CjzP6aQ2oil2wesFwkLXQJwX7w/HYScmu+JlH0A jrqB96Gik3Wbh5enmFNmR3KWma58HkZu0ls9gb4bq8gJYoia8aK+XeMHBdpu6jCtDCC/ Cb++5XQsNATyzKKB9gQbvC7uvCU2cpk5v3rXD3Ixves4vvcYjlT0v11fqWg3HQGz4xh/ jvdyf5Q+upHr2Ok9fA63eXlucr3VOswr0tM21beNHeaTUn7cwPnBm8+SPhxUZuqEgWZf RnlKwTtGwHs50QhAXztxzfY2z+PvHWkCM48hLzZjORw2Go9n2H6aByER0OYZaZURIfkE 8Odg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:to :from; bh=rRvxcN5OZyJsU0CmG0abr6AyffZFUKKPWOQz2GbiCqQ=; b=omWmxbbbc6bg+iVW5fsrOlTx01nkDRIW8PX7GSaQYhLc5Tzsb2hIB1YGHq3z77Cfoa HlSMoHrstfdTxCnm7vUJeZ5vRDOcgC7Bc9i+AAAUU0TqgDDxcZai7PFyttRbTMVkunJ9 1jIs6S0+zOMbCHpY2xJc6wnFDhTgYe2mjbgyQ8k1W9iIDKxgiO2CtYGbEg5thYG2hyQX 9zGV56POWRUHOLwENdAzK1tusV6R8H+mFBdDTrIzdi1DQ2c2G5FYBJtEsE8lvBQV3UdM adlsK2vY5WuResif/NEVCw5H34vd7zfgwpt/jI9ypS9q+OkdQCy/0a+dksUw2i7TEYK6 lX/A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.83 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch Original-Received: from mailhub-lb2.unibe.ch (mailhub-lb2.unibe.ch. [130.92.0.83]) by gmr-mx.google.com with ESMTPS id q22si458454wrz.3.2021.06.21.08.02.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 08:02:18 -0700 (PDT) Received-SPF: pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.83 as permitted sender) client-ip=130.92.0.83; X-Virus-Scanned: By University of Bern - MGW Original-Received: from mail.campus.unibe.ch (aai-edge-03.campus.unibe.ch [130.92.13.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailhub-lb2.unibe.ch (Postfix) with ESMTPS id 3CBF15000C1 for ; Mon, 21 Jun 2021 17:02:17 +0200 (CEST) Thread-Topic: I suggest adding setupitemize and setupenumerate variables to the default context template Thread-Index: AQHXY4xiGd+kMHGZPEWCpTX3VADOMasYTtgAgABxuxCAAR/ogIAALOFtgAEfsxCAAEATgIADKEjQ In-Reply-To: Accept-Language: de-CH, en-US Content-Language: de-DE x-originating-ip: [172.18.72.2] X-Original-Sender: denis.maier-NSENcxR/0n0@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.83 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch 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:28670 Archived-At: --_000_ae59265511394a88b77e647090e3b368unibech_ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hmmm, I guess it should be possible to make this work as well, but I fear i= t won=E2=80=99t be smooth. It=E2=80=99s perhaps better to have to distinct = options. Any other comments? Should I open a PR? Denis Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Im A= uftrag von T. Kurt Bond Gesendet: Samstag, 19. Juni 2021 18:48 An: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Betreff: Re: I suggest adding setupitemize and setupenumerate variables to = the default context template Would using setupitemgroup as the option still allow setting the values dif= ferently for enumerate and itemize? On Sat, Jun 19, 2021 at 7:02 AM > wrote: Ok: this here should work: ``` \defineitemgroup[enumerate] $if(setupenumerate)$ $for(setupenumerate)$ \setupitemgroup[$setupenumerate.level$][$for(setupenumerate.options)$$setup= enumerate.options$$sep$, $endfor$] $endfor$ $else$ \setupitemgroup[enumerate][option=3Dfit,itemalign=3Dleft,distance=3D.5em,st= yle=3D{\feature[+][default:tnum]}] $endif$ ``` Input: ```md --- setupenumerate: - level: enumerate options: - option=3Dfit - itemalign=3Dleft - level: 'enumerate:1' options: 'options=3Dfit, itemalign=3Dleft' --- bla ``` Result: ```tex \defineitemgroup[enumerate] \setupitemgroup[enumerate][option=3Dfit, itemalign=3Dleft] \setupitemgroup[enumerate:1][options=3Dfit, itemalign=3Dleft] ``` I guess we can make this even more generic by calling the yaml metadata var= iable `setupitemgroup` instead. Then, the same parameter could be used for = customizing `itemize` blocks as well. WDYT? Denis > -----Urspr=C3=BCngliche Nachricht----- > Von: Maier, Denis Christian (UB) > Gesendet: Freitag, 18. Juni 2021 19:50 > An: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > Betreff: AW: I suggest adding setupitemize and setupenumerate variables t= o > the default context template > > Not so quick. I may have an idea. I need to test, but I think I can make = it work. > > ________________________________________ > Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im Auftrag von= T. Kurt Bond > > > Gesendet: Freitag, 18. Juni 2021 19:08:27 > An: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > Betreff: Re: I suggest adding setupitemize and setupenumerate variables t= o > the default context template > > Hmm. After considering, I think you are right: these are better done in > header-includes, if only because these itemgroup based setups are more > complicated than changing the whitespace. I retract my suggestion. > > On Thu, Jun 17, 2021 at 6:02 PM > >> wrote: > Hmm, yes that should be configurable. > > But if you look at the current template the definition of enumerate consi= sts > of multiple parts : > > \setupenumerate[each][fit][itemalign=3Dleft,distance=3D.5em,style=3D{\fea= ture[+ > ][default:tnum]}] > > So, I'm wary of adding a simple > $if(setupenumerate)$ > \setupenumerate[$setupenumerate$] > $endif$ > as I'm not sure this will do what is needed. > > I was actually thinking you can add these kind of customizations into `he= ader- > includes`. > > Am I missing something? > > WDYT? > > Denis > > Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>> > Im Auftrag von T. Kurt Bond > Gesendet: Donnerstag, 17. Juni 2021 19:11 > An: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > Betreff: Re: I suggest adding setupitemize and setupenumerate variables t= o > the default context template > > And you really need to be able to setup the lines environment as well whe= n > you change the spacing between paragraphs with the whitespace template > variable. > > Here's a modified patch: > > --- default.context 2021-06-17 11:01:32.458435275 -0400 > +++ changed.context 2021-06-17 13:09:13.773558143 -0400 > @@ -97,9 +97,19 @@ > > \setupitemize[autointro] % prevent orphan list intro > \setupitemize[indentnext=3Dno] > +$if(setupitemize)$ > +\setupitemize[$setupitemize$] > +$endif$ > > \defineitemgroup[enumerate] > > \setupenumerate[each][fit][itemalign=3Dleft,distance=3D.5em,style=3D{\fea= ture[+ > ][default:tnum]}] > +$if(setupenumerate)$ > +\setupenumerate[$setupenumerate$] > +$endif$ > + > +$if(setuplines)$ > +\setuplines[$setuplines$] > +$endif$ > > \setupfloat[figure][default=3D{here,nonumber}] > \setupfloat[table][default=3D{here,nonumber}] > > And I've attached it as well, just in case. > > On Thu, Jun 17, 2021 at 11:20 AM T. Kurt Bond > >> wrote: > I'd like to be able to change the setup of the itemize and enumerate > environments in pandoc's ConTeXt output. I suggest adding setupitemize > and setupenumerate variables to the default context template, like this: > > --- default.context 2021-06-17 11:01:32.458435275 -0400 > +++ changed.context 2021-06-17 11:11:53.961951947 -0400 > @@ -97,9 +97,15 @@ > > \setupitemize[autointro] % prevent orphan list intro > \setupitemize[indentnext=3Dno] > +$if(setupitemize)$ > +\setupitemize[$setupitemize$] > +$endif$ > > \defineitemgroup[enumerate] > > \setupenumerate[each][fit][itemalign=3Dleft,distance=3D.5em,style=3D{\fea= ture[+ > ][default:tnum]}] > +$if(setupenumerate)$ > +\setupenumerate[$setupenumerate$] > +$endif$ > > \setupfloat[figure][default=3D{here,nonumber}] > \setupfloat[table][default=3D{here,nonumber}] > > This is often necessary if you change the spacing between paragraphs usin= g > the existing whitespace variable. > > I've attached a file with the above patch, which is against the default c= ontext > template in pandoc 2.14.0.2, just in case mail messes the inline version = up. > -- > T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, > https://tkurtbond.github.io > > > -- > T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, > https://tkurtbond.github.io > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc- > discuss/CAN1EhV9ZzincsBYJLFe- > AHoHW3_CYTr_bOeKMVZK%3DWm7Ypp6fg%40mail.gmail.com ps.google.com/d/msgid/pandoc-discuss/CAN1EhV9ZzincsBYJLFe- > AHoHW3_CYTr_bOeKMVZK%3DWm7Ypp6fg%40mail.gmail.com?utm_mediu > m=3Demail&utm_source=3Dfooter>. > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc- > discuss/e26e45614f514bdeb867c9dd08c99652%40unibe.ch oogle.com/d/msgid/pandoc- > discuss/e26e45614f514bdeb867c9dd08c99652%40unibe.ch?utm_medium=3De > mail&utm_source=3Dfooter>. > > > -- > T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, > https://tkurtbond.github.io > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc- > discuss/CAN1EhV_U99iAUUTY3_60ESsueFOTehMGR5u9zWLbU0QShJwiVg% > 40mail.gmail.com discuss/CAN1EhV_U99iAUUTY3_60ESsueFOTehMGR5u9zWLbU0QShJwiVg% > 40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter>. -- 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 e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/3ed3e1c40e2040db86789428aa9e68d4%40unibe.ch. -- T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkur= tbond.github.io -- 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 e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/CAN1EhV9u6AB%3DbfDamRjb5fvO_coy3237Xw2EyJtqm_ZQB-aNRQ%40mail= .gmail.com. --=20 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 e= mail 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/ae59265511394a88b77e647090e3b368%40unibe.ch. --_000_ae59265511394a88b77e647090e3b368unibech_ Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hmmm, I g= uess it should be possible to make this work as well, but I fear it won=E2= =80=99t be smooth. It=E2=80=99s perhaps better to have to distinct options.=

&nbs= p;

Any other comments? Should I open a PR?

 

Denis

 

Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von T. Kurt Bond
Gesendet: Samstag, 19. Juni 2021 18:48
An: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Betreff: Re: I suggest adding setupitemize and setupenumerate variab= les to the default context template

 

Would using setupitemgroup as the option still = allow setting the values differently for enumerate and itemize?<= /p>

 

On Sat, Jun 19, 2021 at 7:02 AM <denis.maier-NSENcxR/0n0@public.gmane.org> wrote:

Ok: this here should work:

```
\defineitemgroup[enumerate]
$if(setupenumerate)$
$for(setupenumerate)$
\setupitemgroup[$setupenumerate.level$][$for(setupenumerate.options)$$setup= enumerate.options$$sep$, $endfor$]
$endfor$
$else$
\setupitemgroup[enumerate][option=3Dfit,itemalign=3Dleft,distance=3D.5em,st= yle=3D{\feature[+][default:tnum]}]
$endif$
```

Input:

```md
---
setupenumerate:
- level: enumerate
  options:
  - option=3Dfit
  - itemalign=3Dleft
- level: 'enumerate:1'
  options: 'options=3Dfit, itemalign=3Dleft'
---

bla
```

Result:

```tex
\defineitemgroup[enumerate]

\setupitemgroup[enumerate][option=3Dfit, itemalign=3Dleft]
\setupitemgroup[enumerate:1][options=3Dfit, itemalign=3Dleft]
```

I guess we can make this even more generic by calling the yaml metadata var= iable `setupitemgroup` instead. Then, the same parameter could be used for = customizing `itemize` blocks as well.

WDYT?

Denis




> -----Urspr=C3=BCngliche Nachricht-----
> Von: Maier, Denis Christian (UB)
> Gesendet: Freitag, 18. Juni 2021 19:50
> An: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> Betreff: AW: I suggest adding setupitemize and setupenumerate variable= s to
> the default context template
>
> Not so quick. I may have an idea. I need to test, but I think I can ma= ke it work.
>
> ________________________________________
> Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-
> discuss@= googlegroups.com> im Auftrag von T. Kurt Bond
> <tkurtbond= @gmail.com>
> Gesendet: Freitag, 18. Juni 2021 19:08:27
> An: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> Betreff: Re: I suggest adding setupitemize and setupenumerate variable= s to
> the default context template
>
> Hmm.  After considering, I think you are right: these are better = done in
> header-includes, if only because these itemgroup based setups are more=
> complicated than changing the whitespace.  I retract my suggestio= n.
>
> On Thu, Jun 17, 2021 at 6:02 PM
> <denis.ma= ier-NSENcxR/0n0@public.gmane.org<mailto:denis.maier-NSENcxR/0n0@public.gmane.org>> wrote:
> Hmm, yes that should be configurable.
>
> But if you look at the current template the definition of enumerate co= nsists
> of multiple parts :
>
> \setupenumerate[each][fit][itemalign=3Dleft,distance=3D.5em,style=3D{\= feature[+
> ][default:tnum]}]
>
> So, I'm wary of adding a simple
> $if(setupenumerate)$
> \setupenumerate[$setupenumerate$]
> $endif$
> as I'm not sure this will do what is needed.
>
> I was actually thinking you can add these kind of customizations into = `header-
> includes`.
>
> Am I missing something?
>
> WDYT?
>
> Denis
>
> Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-
> discuss@= googlegroups.com> <pandoc-
> discuss@= googlegroups.com<mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>>
> Im Auftrag von T. Kurt Bond
> Gesendet: Donnerstag, 17. Juni 2021 19:11
> An: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-
> discuss@= googlegroups.com>
> Betreff: Re: I suggest adding setupitemize and setupenumerate variable= s to
> the default context template
>
> And you really need to be able to setup the lines environment as well = when
> you change the spacing between paragraphs with the whitespace template=
> variable.
>
> Here's a modified patch:
>
> --- default.context 2021-06-17 11:01:32.458435275 -0400
> +++ changed.context 2021-06-17 13:09:13.773558143 -0400 > @@ -97,9 +97,19 @@
>
>  \setupitemize[autointro]    % prevent orphan list intr= o
>  \setupitemize[indentnext=3Dno]
> +$if(setupitemize)$
> +\setupitemize[$setupitemize$]
> +$endif$
>
>  \defineitemgroup[enumerate]
>
> \setupenumerate[each][fit][itemalign=3Dleft,distance=3D.5em,style=3D{\= feature[+
> ][default:tnum]}]
> +$if(setupenumerate)$
> +\setupenumerate[$setupenumerate$]
> +$endif$
> +
> +$if(setuplines)$
> +\setuplines[$setuplines$]
> +$endif$
>
>  \setupfloat[figure][default=3D{here,nonumber}]
>  \setupfloat[table][default=3D{here,nonumber}]
>
> And I've attached it as well, just in case.
>
> On Thu, Jun 17, 2021 at 11:20 AM T. Kurt Bond
> <tkurtbond= @gmail.com<mailto:tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> wrote:
> I'd like to be able to change the setup of the itemize and enumerate > environments in pandoc's ConTeXt output.  I suggest adding setupi= temize
> and setupenumerate variables to the default context template, like thi= s:
>
> --- default.context 2021-06-17 11:01:32.458435275 -0400
> +++ changed.context 2021-06-17 11:11:53.961951947 -0400 > @@ -97,9 +97,15 @@
>
>  \setupitemize[autointro]    % prevent orphan list intr= o
>  \setupitemize[indentnext=3Dno]
> +$if(setupitemize)$
> +\setupitemize[$setupitemize$]
> +$endif$
>
>  \defineitemgroup[enumerate]
>
> \setupenumerate[each][fit][itemalign=3Dleft,distance=3D.5em,style=3D{\= feature[+
> ][default:tnum]}]
> +$if(setupenumerate)$
> +\setupenumerate[$setupenumerate$]
> +$endif$
>
>  \setupfloat[figure][default=3D{here,nonumber}]
>  \setupfloat[table][default=3D{here,nonumber}]
>
> This is often necessary if you change the spacing between paragraphs u= sing
> the existing whitespace variable.
>
> I've attached a file with the above patch, which is against the defaul= t context
> template in pandoc 2.14.0.2, just in case mail messes the inline versi= on up.
> --
> T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<mailto:tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
> https://tkur= tbond.github.io
>
>
> --
> T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<mailto:tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
> https://tkur= tbond.github.io
> --
> You received this message because you are subscribed to the Google Gro= ups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send= an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-
> discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-
> discuss/CAN1EhV9ZzincsBYJLFe-
> AHoHW3_CYTr_bOeKMVZK%3DWm7Ypp6fg%40mail.gmail.com<https://grou
> ps.google.com/d/msgid/pandoc-discuss/CAN1EhV9ZzincsBYJLFe-
> AHoHW3_CYTr_bOeKMVZK%3DWm7Ypp6fg%40mail.gmail.com?utm_mediu
> m=3Demail&utm_source=3Dfooter>.
>
> --
> You received this message because you are subscribed to the Google Gro= ups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send= an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-
> discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-
> discuss/e26e45614f514bdeb867c9dd08c99652%40unibe.ch<https://groups.g
> oogle.c= om/d/msgid/pandoc-
> discuss/e26e45614f514bdeb867c9dd08c99652%40unibe.ch?utm_medium=3De
> mail&utm_source=3Dfooter>.
>
>
> --
> T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<mailto:tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
> https://tkur= tbond.github.io
>
> --
> You received this message because you are subscribed to the Google Gro= ups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send= an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-
> discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-
> discuss/CAN1EhV_U99iAUUTY3_60ESsueFOTehMGR5u9zWLbU0QShJwiVg%
> 40mail.gmail.com= <https://groups.google.com/d/msgid/pandoc-
> discuss/CAN1EhV_U99iAUUTY3_60ESsueFOTehMGR5u9zWLbU0QShJwiVg%
> 40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter>.

--
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 pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/3ed3e1c40e2040db86789428aa= 9e68d4%40unibe.ch.


 

--

--
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 pandoc-d= iscuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV9u6AB%3DbfDamRjb5fv= O_coy3237Xw2EyJtqm_ZQB-aNRQ%40mail.gmail.com.

--
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/ae59265511394a88b77e647090e3b368%40unibe.ch.
--_000_ae59265511394a88b77e647090e3b368unibech_--