From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28634 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Fenced Div to ConTeXt Environment (was: Markdown Fenced Div to LaTeX Environment) Date: Thu, 17 Jun 2021 11:44:12 +0000 Message-ID: References: <87pn1uwglb.fsf@zeitkraut.de> <20210616143731.GA29446@sokrates> <5db56b4f1d8d4ca2bec612bcebb7a525@unibe.ch> <493d0aa9-47f5-ca8d-2ef5-8e63f965c529@mailbox.org> <4396a9133ab74e4fbff486f09e22d254@unibe.ch> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29943"; mail-complaints-to="usenet@ciao.gmane.io" To: 'juh' via pandoc-discuss Original-X-From: pandoc-discuss+bncBDCINCES2QJRBNHLVSDAMGQEUYYEC6A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jun 17 13:44:54 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ej1-f59.google.com ([209.85.218.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ltqS6-0007bW-9G for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 17 Jun 2021 13:44:54 +0200 Original-Received: by mail-ej1-f59.google.com with SMTP id z6-20020a17090665c6b02903700252d1ccsf2047619ejn.10 for ; Thu, 17 Jun 2021 04:44:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1623930294; cv=pass; d=google.com; s=arc-20160816; b=lh57hrP24S3NGFZMCHiUMHLzHsZYzHKtfZIx1/wjzlaYTzHipgB3K+1qAPRxfU5QQo EHpkQCjf/4nyFLA+Jgfpsd586Ws0NDdz+zQ2e3wJk2WCCP5YElQ9c17doWjus8mtHXbZ a4vmEpKE6Xh4n9DvEB86ZSha8t6v9OHcv3krjl91U4/7HOMPsXYS2p9VFQCf64Kvt8VW 8x+XO6J+RWY3Kc3ZM10wqKsQdGze98fLhsrkUZYKZFW02Enz87OoF32oMVamyZDSADQP hDsyqTd098XE62HahvLAf/V1kNKzHOhYgG6dFQkOxZFr9Qv7M0w8FvgQczNIR04IrLYy d07A== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=DPtwMRXYWXtb9g0r1ZWe23rlY9+BTlA+6bvPelxUHa4=; b=deRZf7iXCJuhLlDa5Muti/F9otZ+ujsAoMAzC0aP8wxHPdp3SBnEEZT5uEkMJ4yTEb VTrWWtzytpFLt7wTl9uwaOiOwiROllurDZAr+/MEKLrR4RqgwXS2IJmw34kILFdFkOEr ZdR3+iRxg2j7c6joj2Iqwz8UbNUXW8u8jxU9TqkZ12sYo+GMadlLhFLlhi7+qXzdhpgy ADDxQg/EykqqaIgU/1hZfZf3XWtSDaj8wyxIx37h+yKgW8Dsa2bZqLchjd2Gv9jrdm4e 0RO/n/lqKtz3qwlkEfedW9xBsURbgO0UBNYn/JSln2w6gqmD6PEdfusLXMKQmNsWwmR4 wrFA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=jkLA+83P; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding: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=DPtwMRXYWXtb9g0r1ZWe23rlY9+BTlA+6bvPelxUHa4=; b=RuN//it8ZNWfRMhmov/pw0KSIBj6sgSvX+LK2AANs7TIutWirPMoCFD0qqgZcMOhRy gr3sAV3jxEeMyzchPtXi1/P3UIoYu2g2I1iARJoVtURgI9wtXJY1FARY2zPwhM1WYAqW LdrL8zHQJ94GddtYjIwTKw23dw/kjEmbdLO7c3heVLK9pSE7S8gJiJVaEtDrBYIeIGpH n28z447/h/Q7dh/mIgG0w7PCk5uQhdgMpuBxue8Za7kwMsmTKjTfoi3aq+dEizkRWlBg AYBRbB/b3Ag9EZ3PoY3wagHhZh+dHRtWgWPx0gfRrSTBktxYI6Dv6cuDwQ/8FpXsUO0N HzMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding: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=DPtwMRXYWXtb9g0r1ZWe23rlY9+BTlA+6bvPelxUHa4=; b=l1ISBGyzbT3AAJpq3gtEBwZUHAva/uVt8Q5XgZ5XkEhIc5AcjU+QmGwRvAx1QAdH5d KZrgEKcWzxoO1RB3xonbiUPKaw9gXwOr8Tmsu9DNFBHOzYzwHXOYzdg8qvccmFJm0M2N BLeLke+eXnczwPU9gkilDLizU/xwnesjquOtMYVg76WIAfa2S4CmGWMI0MVu8Fp7DuCc HViuudwkVR9//I50jkZFRwFG+1QqAxtdq+QhYLxhIw1UZX7GWPz0U3RcDuaocDpxDBnL /iNGGYvEUmN/oMUPojt+n7IV20lur1fcfoM3s/ECbuOe Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM53118yOFlAIEISmt7NagBTKnZRkwjmwd0ZQy1faqaQTYz3BCnBYp WlUsGR9T8yC+nhuVgllUBE4= X-Google-Smtp-Source: ABdhPJxGb4i/mrHe9FumT251CycHamjnPERF9gJKqkZzUxz/+wG+M20+bzbonPN2+8oxv3+rJTFbkg== X-Received: by 2002:aa7:d713:: with SMTP id t19mr5733529edq.83.1623930293942; Thu, 17 Jun 2021 04:44:53 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:906:1293:: with SMTP id k19ls2460464ejb.9.gmail; Thu, 17 Jun 2021 04:44:51 -0700 (PDT) X-Received: by 2002:a17:907:10d7:: with SMTP id rv23mr4705667ejb.163.1623930291297; Thu, 17 Jun 2021 04:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623930291; cv=none; d=google.com; s=arc-20160816; b=Eve/TF7fgf22pHkOFu94EY8CfhuKAJrhWcP65fHOZQ2rZ5DjqQcadMF+X3JWeg8/DX YQztHz4ZprZ5qjh8OSvY3jIvGduNqD5FtZLC7fZmyRPiP2gdexf3KO6ol2Q3cwZiwVQ0 1ZONf4+uUwFzizSedUd/wLuMcRWRVl1ahCTuG2BF+D722mlI0IBMSv/QYvcQNsc7GEDm DuqFTOp4CEXB3YSVJ+T2B21oXmkVLkO10SMeA+4DMBMmtcxLgi/ZkJYJkztTKUy0yYsg EpEEDbOwt8AJ05X7PsA2Li1XoMOv0nh3uVOAfWRsiOGbLgzxBM92EFUo+YF7e0rMwuGa vryQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=kF2xPdfBidsmeVHcG0tJpamuno7tBAPyWQbDShzvbP8=; b=bT8YCGTpkT6CbNVRm9Lo7C9fBhznYsD4/viIq8YUgA/jLMqhQh9RLPV/G8/Bns8mAn P326PaD1RJu6u2MI5i+TXuSdW4ZS+yNp5Eye3zx1arGKMB9QliNKK/WKzNPdSCa36i/D +RGCmSiQrR38ojUIfXFjqVWYPZmGYos1xQOj0h5CROVjoHHfycOKcrxoyFF67VBkYnWm 93f/G8Om/9xmSUWyxx0ZuK30G8ik+4UtaycajovBi6O4DOHVG7vWVlmsI7V/uMK/OouR iMGsC7+7c48cJQP0iAXJnQ4wncMlRO5ebGLDTGgMPLA7qYoZTUQTpu525wIxkJMnlqE8 68Lg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=jkLA+83P; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout02.posteo.de (mout02.posteo.de. [185.67.36.66]) by gmr-mx.google.com with ESMTPS id x10si262588ejy.0.2021.06.17.04.44.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 04:44:51 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) client-ip=185.67.36.66; Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id B0DD42400E5 for ; Thu, 17 Jun 2021 13:44:50 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4G5Kwf2PXyz6tmH for ; Thu, 17 Jun 2021 13:44:50 +0200 (CEST) Content-Disposition: inline In-Reply-To: X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=jkLA+83P; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:28634 Archived-At: I can't help you with this particular point, but as some people here use Ma= rkdown+Pandoc more or less as a frontend to TeX, don't hesitate to share yo= ur needs and thoughts. Someone may already have a solution, or something ap= proaching. Moreover it could prompt to the creation or publication of filte= rs that extend Pandoc's capabilities. I wrote myself a filter that enables = references to spans of text by page or note number in a variety of formats,= would you be interested in testing it? Le Thursday 17 June 2021 =C3=A0 12:20:05PM, 'juh' via pandoc-discuss a =C3= =A9crit : > Thanks a lot Bastien and Denis, >=20 > I go with this one: >=20 > ```lua > ENV_CLASSES =3D { 'intro', 'zitat', 'solution' } >=20 > local function context(s) > return pandoc.RawBlock('context', s) > end >=20 > local function get_env_class(elem) > if elem.classes then > for i =3D 1, #elem.classes do > for j =3D 1, #ENV_CLASSES do > if elem.classes[i] =3D=3D ENV_CLASSES[j] then return ENV_CLASSES[j]= end > end > end > else > error('function has_class used on an element of type ' .. > elem.t .. ' that cannot have classes.') > end > end >=20 > function Div(el) > local env_class =3D get_env_class(el) -- nil if there is none > if env_class then -- false if env_class is nil > return { context('\\startparagraph['.. env_class ..']'), el, > context('\\stopparagraph') } > end > end > ``` >=20 > ConTeXt is amazingly flexible in many ways and it is fun to create > individually designed documents. But I have to deploy it to an organizati= on > were people want to write content in Markdown. I am currently working on = a > proof of concept that we can meet all of our style ideas with ConTeXt whi= le > writing in markdown using pandoc. >=20 > I think that in the long run I will need some more filters. Eg. it is qui= te > easy to have a default width of images with >=20 > \setupexternalfigure[width=3D\textwidth] >=20 > so that the default image markup >=20 > \placefigure{My caption}{\externalfigure[image.jpg]} >=20 > works perfectly fine. >=20 > But I can imaging situations where I want to pass an argument to it like > this. >=20 > \placefigure{My caption}{\externalfigure[image.jpg][textwidth=3D6em]} >=20 > I'll try to figure out how to do this in a lua filter. A co-worker of min= e > has some programming skills and might help. >=20 > But in fact there might be another solution, if I put the image in an > special paragraph environment and redefine setupexternalfigure. >=20 > For now, thanks a lot! >=20 > juh >=20 > --=20 > Soziale Plastik. Die Kunst der Allmende > Essay zum 30. Todestag von Joseph Beuys > http://www.amazon.de/dp/1523458763/ > Taschenbuch, 130 Seiten, EUR 9,90 >=20 > --=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= email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/af60ed15-0d8c-5c51-5a34-a9c082e7fc89%40mailbox.org. --=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/YMs1jE5/RfL9h/Op%40localhost.