From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31605 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Plain TeX writer Date: Thu, 20 Oct 2022 08:05:39 +0000 Message-ID: References: <51539828-c876-437b-bb1e-a5efcf752762n@googlegroups.com> <84C142C7-20EF-411E-AF94-D0AA008FA9DA@gmail.com> <5e9dfe75-ea0e-4287-a6a0-47842700f292n@googlegroups.com> 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="28277"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRB64CYSNAMGQEZHHUGHY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Oct 20 10:06:24 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f187.google.com ([209.85.208.187]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1olQZM-0007BJ-9f for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 20 Oct 2022 10:06:24 +0200 Original-Received: by mail-lj1-f187.google.com with SMTP id q5-20020a2e84c5000000b0025ec9ff93c8sf8110184ljh.15 for ; Thu, 20 Oct 2022 01:06:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666253183; cv=pass; d=google.com; s=arc-20160816; b=tmsXuL4OPxf0zotx0R2P7ogEyUmkH2IBAqUYGoFHQc4SwEYKx2DEzP6FappXsmZ7e+ mn+ha8tapT5RFVkjS2vhazjVy+l/W38W6scDZ120cIt+OBCtzSj4IJK/EO8ciwO88/bB JDxueDj2l2sG+a00pJDosB+uKJFKOkGQVWzmjc7SbNDnVh/YOvL8cdvxu3AdpwJzQ2tC EUeTInosysHHTh7tX0UR0BDEXx5jMkGH+No7Dn20PQVrabEWdUSmiiyzALmGUL3StV48 /ExXRMDG2QdZHBhVRgiQKJRSR78DLGz+fps5ZSJjzYevGh9at/3r/rNx5cOxeXrC4k26 +fXQ== 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=4iC8Rvc6gs0qx5vpsTXe4p6U0aMJpSlX/IeRPy3fDKY=; b=JrTzxQdNc3uhDalsg7xlD6NActwLEPKYcTQ8yfLVg5ccZa0bv9lLSMrmlT3zTVYtJo qLU+AQyir/XLPdfIwlEIZmgIzJ/m3qXUuU6mPPCMoSt3lyGtwPH/ngJB+K0X2Dw1Y14n RAlAPa+QPIdkSl9Pc/i5VKndfrAMwMYK38xRvwtgLh+5ipLt9O1ZTZozMhsK7spsOZpj j4QxkZUbjvX6W/UL22I2qS9glQtghZ3gu3TxAJkQY6/UZXGIk63Wmj8+PQYEPlid5gp0 F9pE41ILulmq5AWh9mzbQLYHrIozkcciX4Ppn+FmTtrz00nRKx0tE5l8P4u/8Jbqb5Ia miXw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=PqefHlVj; 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=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=4iC8Rvc6gs0qx5vpsTXe4p6U0aMJpSlX/IeRPy3fDKY=; b=mQd42S+RFT1ZkokpT0CQeG9UL+FKkto+HXchiopXc++f3/PLwpDAS80nLWFCZGI0t3 GDaF5qRv8OZNipUsUif/EAa/N6hBR9rGRxmZtXHJGGYpib0loqgnuoIEizP2Yud9knfV kfjyLJzjjV3GT1MdQjJcb3Uyrk9JDrkl02ne/q4sOM6cxXAQHdVJ2vMTNlrAlMRDIg9F Nbzkpi7Mhu+JjUMvSqgqi5h/M7/Wq6F5wJyGxS4doOqSTab048vL18MYg0C3Ok0Fts0q tvShYIUKCt6cYS1vSVWLLfm/mIFiDC1a9jGuJ1wGtFGx4 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=4iC8Rvc6gs0qx5vpsTXe4p6U0aMJpSlX/IeRPy3fDKY=; b=kIZzgdHpJfvRYxezNcgIeXP8v+zlshPRUeKBnIDgruATxl2MPq260YNdFqMsygOt9x TQ+3KdRt5YT/xPfKZSsMGlK0Wvqj/MwdlvljMoKdfBuMQ79R8eGAkMgm+tg1rOYvAH9d c3gP/D7x0BQrPRoAP5xpGEdNXznz+mkFDwsnIULKe2dbU5/kp6cW6ahucOYI/JbYcRN0 blkkyu2VQPFN3heZC3HG5oFyjJbUDXxuIY7E1W/gnfXi4I1pAV/c0DUEj6XQzgjHonws Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf3I7V5qUNv2kZxDd1tUm70nEqvkxLV3s6Auzv2t1dqF/08d2EF3 OqhSTbdEEC9l2RfZQ2oZkug= X-Google-Smtp-Source: AMsMyM6dJSFL6jzR12nPtJblFc6ZH2Fs20HcbSkOMTIikuGuih0G0BPaBXxb8Bw+XA846VEDU3e99g== X-Received: by 2002:ac2:51bc:0:b0:4a4:712d:1b83 with SMTP id f28-20020ac251bc000000b004a4712d1b83mr4096033lfk.345.1666253183497; Thu, 20 Oct 2022 01:06:23 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:202e:b0:49a:b814:856d with SMTP id s14-20020a056512202e00b0049ab814856dls378928lfs.1.-pod-prod-gmail; Thu, 20 Oct 2022 01:06:18 -0700 (PDT) X-Received: by 2002:a05:6512:4003:b0:4a2:3dc3:89b5 with SMTP id br3-20020a056512400300b004a23dc389b5mr4696306lfb.394.1666253178020; Thu, 20 Oct 2022 01:06:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666253178; cv=none; d=google.com; s=arc-20160816; b=T9yPxnwrxILr5j22jP97rtSvd6sCtP+TLrxVjp6KCSibauLC0PQg7nc7kOaCg+XEoq LnSG2ruKsznuxtYThxsiyQkV0saRQSfhXE703JDGVfvOeqjqVpgVoZKSg7/awRWqHjg1 2BPOsw5ADjDAnWzheecH5zWaphQs4wN4GIwSJmVMkRucu+C4pOZDZLNvioJ5UIZxAo/K 86J03W8CVyiY73n/gkvWCpPqJQFQTvhOwSwwMulHpoXhqFP/hebmm3iCMFI+H7uSR87w cqES/WntpRwfnH2LX8LT8TDPjgQjmCxAvANlbYCnOeeB8I5feM4eCBDnTHroUxGkCO95 Kh1g== 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=kxzwcoGEyoJx+KhIUnA8QQjaFyXyo5xUz2Qj6vqP3WQ=; b=Ir+by1EKw5j1Qfv/oh6HYHhmPI+wBgD0G2hoJmhfJq4kquDNgNjpFqwI1+ncaE48Q4 H88tlc07eNmlwDE9gOdyVjHVKGMSokTBVmeYn1IbM91g+WkFdqX5CZixduMPA8UEu5Aj vwCYYPGayfmGyXxF6E/qxirquUvyWusWWzfXON7BzleojRntp5aZab+sihLRv3xc7Bgf 5U4PaBeaWwqZPySqHlVgwXzwS90Yr4O8f5FmN18edew4wPcXUlk7kbfboQHPN1sNcU8t w5UrV5q6n7Wz1oOtaW+SN1mV1I2+DwOuUx6Lh859jLTUZgMGEGZYZ1ZI1y1dvlJgR27R 5qJw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=PqefHlVj; 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 f14-20020a056512360e00b0048b12871da5si608589lfs.4.2022.10.20.01.06.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 01:06:17 -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 [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 229A2240104 for ; Thu, 20 Oct 2022 10:06:16 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MtKtJ0bMgz9rxQ for ; Thu, 20 Oct 2022 10:06:16 +0200 (CEST) Content-Disposition: inline In-Reply-To: <5e9dfe75-ea0e-4287-a6a0-47842700f292n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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=PqefHlVj; 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:31605 Archived-At: That looks very promising. I contemplated to write such a filter to be able= to define my own stylesheet more flexibly and possibly to work with other = TeX formats, so thank you both for having undertaken this task. Some person= al thoughts follow. I don't understand either the rationale for \pandocSpace and \pandocLinebre= ak. Since Markdown and TeX agree on handling simple line breaks and repeate= d spaces like single spaces, in what cases would it be useful? As for spans and divs, why not generate macros according to their classes? = It would only require defining in the header which attributes are related t= o which classes. For instance: ```md --- classes: - term: - lem - def: - lem - domain --- [Pandoc]{.term .def lem=3D"pandoc" domain=3D"software"} is a Haskell librar= y for converting from one markup format to another, and a command-line tool that uses this l= ibrary. [Pandoc]{.term lem=3D"pandoc"} can convert between numerous markup and word= processing formats, including, but not limited to, various flavors of Markdown, HTML, LaTeX and= Word docx. ``` would be converted to (stripping the markup for spaces and soft line breaks= ): ```tex \pandocSpTerm[lem=3Dpandoc]{\pandocSpDef[lem=3Dpandoc, domain=3Dsoftware]{P= andoc}} is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. \pandocSpTerm[lem=3Dpandoc]{Pandoc} can convert between numerous markup and word processing formats, including, but not limited to, various flavors of Markdown, HTML, LaTeX and Word docx. ``` Thanks to the package xkeyval, the key-value argument could be handled quit= e easily in all formats that include Plain TeX. Le Wednesday 19 October 2022 =C3=A0 09:21:09AM, V=C3=ADt Novotn=C3=BD a =C3= =A9crit : > Dne st=C5=99eda 19. =C5=99=C3=ADjna 2022 v 17:43:31 UTC+2 u=C5=BEivatel f= iddlosopher napsal: >=20 > What would you think about replacing \pandocSpace with a regular spac= e > character? IT would make the output a lot more readable. Similarly, > SoftBreak could be a regular newline character. >=20 >=20 > The input processor of TeX will fold one or more spaces into a single spa= ce and > consume all spaces at the end of a line. Making spaces and soft breaks in= to > commands avoids this at the cost of lesser readability. > =20 >=20 > It would be nice to see some examples involving arguments and attribu= tes, > e.g. links and headers. >=20 >=20 > As stated in my original post, attributes are currently discarded by the > writer. However, the Markdown package supports [1]attributes on headers a= nd [2] > attributes on divs and spans, [3]links, images, and inline code as well a= s [4] > raw attributes are planned for the next release (2.18.0). Therefore, addi= ng > support for attributes on many types of elements should be straightforwar= d. > =20 >=20 > Why is the package called "pandoc-to-markdown"? That would lead me to > expect that it produces markdown output. >=20 >=20 > The implementation rests on [5]my Markdown package for TeX, which provide= s > formatting for most elements of the Pandoc AST across different TeX forma= ts > such as plain TeX, LaTeX, and ConTeXt. Dominik's proof of concept bridges > Pandoc with the Markdown package and hence the (somewhat confusing) name. > =20 >=20 > John >=20 >=20 > Best, > Vit=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 [6]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [7]https://groups.google.com/d/m= sgid/ > pandoc-discuss/5e9dfe75-ea0e-4287-a6a0-47842700f292n%40googlegroups.com. >=20 > References: >=20 > [1] https://witiko.github.io/markdown/#header-attributes > [2] https://github.com/Witiko/markdown/issues/126 > [3] https://github.com/Witiko/markdown/issues/123 > [4] https://github.com/Witiko/markdown/issues/173 > [5] https://ctan.org/pkg/markdown > [6] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [7] https://groups.google.com/d/msgid/pandoc-discuss/5e9dfe75-ea0e-4287-a= 6a0-47842700f292n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter --=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/Y1EBU0Ch0HHr2geB%40localhost.