From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31672 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "'William Lupton' via pandoc-discuss" Newsgroups: gmane.text.pandoc Subject: Re: Plain TeX writer Date: Wed, 2 Nov 2022 14:23:40 +0000 Message-ID: References: <51539828-c876-437b-bb1e-a5efcf752762n@googlegroups.com> <84C142C7-20EF-411E-AF94-D0AA008FA9DA@gmail.com> <24c01860-2f35-4ff0-9d31-63d10f764f79n@googlegroups.com> <1EC34FB9-2344-40AC-91CD-22B3D9069EE6@gmail.com> <9dfc8b26-3fda-4882-93b7-06d44671ef7fn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f2686205ec7d96c7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8816"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCS4HJ6WSAHBB6H2RGNQMGQE6WBSWAI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Nov 02 15:23:56 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qk1-f191.google.com ([209.85.222.191]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oqEep-00028l-Ts for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 02 Nov 2022 15:23:55 +0100 Original-Received: by mail-qk1-f191.google.com with SMTP id w4-20020a05620a444400b006fa24b2f394sf9074242qkp.15 for ; Wed, 02 Nov 2022 07:23:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1667399035; cv=pass; d=google.com; s=arc-20160816; b=DANMPGsuk3XV1LzW6HkfK+5q4pw0OSg3KjIgYRhfvLjzjX0uJ+dqXCuhzdOEs+Uk5l wCan55q8Qd6U9MM/zlyg9bGm8lFcxkfecNSUhURzRMDvYJCaOTP+3hbhrHSN5jnw06sO 2IUWsJEhRsqfdcGucSnAHyp2FsR1n4OBkfza16UrGIIMhRirM1WEIbgE4JV9nlNOrcV1 PTixv8md1/+viZHBD65804G6dRuF7jJVjk1wR7Jmkwb61YMDrbyg1OYGHGtMfRTm8+Ws 9NPdMQjcFRe4DVOiHOs4OXJ/Lvuk09Tj1JF8dwblMLAM/U4SdBVA8YdIuZtBDrTzPDNv mdSg== 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:to:subject:message-id:date :from:in-reply-to:references:mime-version:dkim-signature; bh=uPd8qTgFtnUR//OV5CdoouoajkWq3baHTLu1F9Meapw=; b=kLfBQCkuGIuG6QBiYDhKQNwBT6q89hobmaIau8TWsz/D348j34Ki2h7rsX1Qz1cLDw lsdkCKdW/nRa/Th6xsKOIEpnQi4HgSu+Wg3s/crzUikUJrYUw6bTF2bT8KpMwXvczbSR VNIi+s59s3FldvKmBd5NBbuHCwoZmsyGtPJx44098nmjzviybmdLVwl4d+csnK8IdFnY zox6c+Hwd/oj8gHnlnXX+uXSA+XWk2JQm/O1rI0JCHrRtTHSSgpgVMZmvC9Pnig0andh JQIUEprKWAgNTLRnnlg7C8MfkucoqpOCrWpY2OrTmEGEdXdPnASEjih0mhuqXe7Htvwr f8tg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=kQjDIsUJ; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b31 as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org 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:to:subject :message-id:date:from:in-reply-to:references:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=uPd8qTgFtnUR//OV5CdoouoajkWq3baHTLu1F9Meapw=; b=GtxphaJ0NirCfWumzTLl48t7RDwETMLy+FqSIg2dwz1fqxmARExDlYd8OhqsJyhi39 +ONbYPGA4d4xvEcHZTKw81B+S4GLLqpJ2MPVMGwlEwCw8rPevdRtiKX0U9sH6RFXyNwm IIYRyENYC8Mh1GZMWtm2L7wZ9VaQeVJqy6OCSbZ1dpEXELfXEB9OgqyR5ohk8+7TSS0r n3xPpyqzWSfODgh56Akuwb2YHlaD122r0QJSNbXc1L8U0XLnAhXpv9Vr4uX/Ru0wTYg9 dmGwQDQAtAHFuLplO9vbkuHprO29marNIsgy4cB+buwEeKuBDkZ8uGkE1zDJ3I9WpalA FPbA== 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:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uPd8qTgFtnUR//OV5CdoouoajkWq3baHTLu1F9Meapw=; b=28Paj6W16PKGFJVwB/O3m3QkLA6+dVCLJDKjJLg1qUDKdCJlajkAVcp6i7noxtbcXc nAvNN1LqAkCeHnoo+1evFLxLEE44RVPmocHFv9BYiZ/Jd+igjc4DXtYbLzAZD7682964 YkmzMGHC9FSQAa/2Ioe4xCB5R5OFuskH8M2SqaUv+1ad4tYN6tpoEgQ6zNd9CL7tAaY5 WU/OKzDSQNdnlRiyH/dxiGc2+RqjaT+/86z6qIYI9PDLjH+3UFvqSDgUfvnrVJjRna3v Q0adVG5pewr7A+IxqJqeqy/JDgNWfGHJ77HAoyXjh9aBycP5MJGJvXPOSucq8m/ X-Gm-Message-State: ACrzQf1Z3O6vtSVbMCE/HfYwXMngacW2MCH8JyxxrYaA77mbyNlcr/BL UBejpezLmhHUvY/TQG+8wp4= X-Google-Smtp-Source: AMsMyM7b2XqI/ScmXmlFjMkixaw6tHNyLCbpZyKNiLtb83U3aou2IE/pb3iaDfCTlRIrHkhVeMeTmQ== X-Received: by 2002:a05:620a:166d:b0:6fa:35db:653 with SMTP id d13-20020a05620a166d00b006fa35db0653mr9993291qko.328.1667399034947; Wed, 02 Nov 2022 07:23:54 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ae9:e908:0:b0:6f7:ed97:3d4d with SMTP id x8-20020ae9e908000000b006f7ed973d4dls9575722qkf.11.-pod-prod-gmail; Wed, 02 Nov 2022 07:23:52 -0700 (PDT) X-Received: by 2002:a37:6945:0:b0:6f4:ae0f:648b with SMTP id e66-20020a376945000000b006f4ae0f648bmr17289703qkc.329.1667399032533; Wed, 02 Nov 2022 07:23:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667399032; cv=none; d=google.com; s=arc-20160816; b=SCsJsaMXefaKqpxkykGrHnKstdbnL2eOUyJyTeWbBZC6NnaETHFcy0DZ1wu8TPsRcY hH9bV0AbRSZTfvjZyAbfvg9HdWyvBGnOMOxOkQjHqZqM/Nysvk/5H3ix77kh7JYybA19 OFDgatAeeXxLiQ4guiy4RlQSoL94/ZZHMb4noks1ZmtPWNaaMzeycB9mZkhQkkonTE5y h9iS0RGGurCEeNbEwisyuiNV8v2cYW+gPgb5G7rVUJrHyFC74EfqYd9tyAg1as8Wjia/ CBXtekHyo+VkZhw5ssP2fwKRUuatGrMLuiLUfDAkBmComZ1jIvDJ+pTSz1AVZf0zc3Pg mTAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=rGTWK+zzvWpzTt8J8itU9WzSdoUovD/8/WStOb50hYA=; b=KfDI25aCya7eVxac4RHWHc/CYtPPPqNpSTqd63Gc7pmmhYKiCbwnO1wKbMoMgwTbnc 9kZSzWO6GjnKiNuvCZbLOprjjAbOrigaTMUneHyVB/2FKOGm1pCXFWLux7fw2DnJCxDO JggSd8jnQzQO6Ll+W15qcl+BpPmkILf1DWkT8StJW/KECVUAambzvvI5o32jpnf9HU6I 6CZ176L+VaOIuVDJvJwDxhBJevEJHLOq7kzrByd4/T877bBsYgWOe9ro77lcCk637oHT b3sPD5TP0/qbnqIIfNWm9mGXNECJP7RTTYZ8j6SUDAXJaRtDXV8bmcyVwsL5UU0NO1TU 775g== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=kQjDIsUJ; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b31 as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org Original-Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com. [2607:f8b0:4864:20::b31]) by gmr-mx.google.com with ESMTPS id e15-20020a37ac0f000000b006ec80b54a06si531123qkm.1.2022.11.02.07.23.52 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Nov 2022 07:23:52 -0700 (PDT) Received-SPF: pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b31 as permitted sender) client-ip=2607:f8b0:4864:20::b31; Original-Received: by mail-yb1-xb31.google.com with SMTP id n130so21304753yba.10 for ; Wed, 02 Nov 2022 07:23:52 -0700 (PDT) X-Received: by 2002:a25:8c88:0:b0:6cc:54cb:6e5a with SMTP id m8-20020a258c88000000b006cc54cb6e5amr21496399ybl.379.1667399031081; Wed, 02 Nov 2022 07:23:51 -0700 (PDT) In-Reply-To: <9dfc8b26-3fda-4882-93b7-06d44671ef7fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=kQjDIsUJ; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b31 as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org X-Original-From: William Lupton 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:31672 Archived-At: --000000000000f2686205ec7d96c7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Would it be feasible for the https://ctan.org/pkg/markdown package to support an option to control whether to generate ASCII space or \pandocSpace (perhaps with a default of generation ASCII spaces)? On Wed, 2 Nov 2022 at 14:17, V=C3=ADt Novotn=C3=BD wrote= : > > So, for example, you couldn=E2=80=99t make Spaces appear as visible = =E2=90=A0 > characters, and you couldn=E2=80=99t make SoftBreaks create hard breaks i= n the > output. > > Replacing *\pandocSpace* with ASCII spaces makes it difficult to > reprogram spaces on the top level of the document, but we can definitely > substitute spaces in parameters of commands such as *\pandocCode*, which > would cover many (if not most) use cases. > > The following example LaTeX document produces the text > *we=E2=90=A3want=E2=90=A3visible=E2=90=A3spaces=E2=90=A3here* in a monosp= aced font: > > > > > > > > > > > > > > > > > > > > > > *\documentclass{standalone}\usepackage{xparse}\ExplSyntaxOn\ProvideDocume= ntCommand > { \pandocCode } { m } { \pandoc_code:n { #1 } }\cs_new:Nn > \pandoc_code:n { \tl_set:Nn \l_tmpa_tl { #1 } > \regex_replace_all:nnN { \s } { \c{textvisiblespace} } > \l_tmpa_tl \texttt { \l_tmpa_tl } > }\ExplSyntaxOff\begin{document}\pandocCode{we want visible spaces > here}\end{document}* > > > There may also be line breaks in the source that don't correspond to > SoftBreak. > > Any lines that end with a comment character (%) will skip over the newlin= e > character. Therefore, we can have newlines in the source code that wouldn= 't > trigger the active newline character. > > The following example plain TeX document produces the text *foo bar baz*: > > *\catcode`\^^M=3D13* > > > *\def^^M{ bar }%foobaz%* > *\bye* > > Dne =C4=8Dtvrtek 27. =C5=99=C3=ADjna 2022 v 19:09:30 UTC+2 u=C5=BEivatel = fiddlosopher napsal: > >> >> > On Oct 27, 2022, at 12:07 AM, Bastien DUMONT >> wrote: >> > >> > Fortunately, it is possible by making the space and the newline >> characters active in TeX! (Provided that a SoftBreak is rendered as a li= ne >> break in the TeX output.) This is how \obeylines and \obeyspaces work. >> >> But this might not be what you want; after all there are going to be >> spaces in code blocks, and you might not want to treat them the same way >> (they do not correspond to pandoc Space elements). There may also be lin= e >> breaks in the source that don't correspond to SoftBreak. >> >> >> -- > 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/9dfc8b26-3fda-4882-93b7-= 06d44671ef7fn%40googlegroups.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/CAEe_xxiYD8Y5KJVB7WiKOo5xHbFWPq010rMXJEYsu_XNd-hX4A%40mail.g= mail.com. --000000000000f2686205ec7d96c7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Would it be feasible for the https://ctan.org/pkg/markdown package to support an option= to control whether to generate ASCII space or \pandocSpace (perhaps with a= default of generation ASCII spaces)?

<= div dir=3D"ltr" class=3D"gmail_attr">On Wed, 2 Nov 2022 at 14:17, V=C3=ADt = Novotn=C3=BD <witiko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org&g= t; wrote:
>= =C2=A0 So, for example, you couldn=E2=80=99t make Spaces appear as visible =E2=90= =A0 characters, and you couldn=E2=80=99t make SoftBreaks create hard breaks= in the output.

Replacing \pandocSpace with ASCII= spaces makes it difficult to reprogram spaces on the top level of the docu= ment, but we can definitely substitute spaces in parameters of commands suc= h as=C2=A0 \pandocCode, which would cover many (if not most) use cases.

The following example LaTeX document produces the text we=E2=90=A3want=E2=90=A3visible=E2=90=A3spaces=E2=90=A3here=C2=A0in a = monospaced font:

\documentclass{standalone}
= \usepackage{xparse}
\ExplSyntaxOn
\ProvideDocumentCommand
=C2=A0 {= \pandocCode }
=C2=A0 { m }
=C2=A0 { \pandoc_code:n { #1 } }
\cs_n= ew:Nn
=C2=A0 \pandoc_code:n
=C2=A0 {
=C2=A0 =C2=A0 \tl_set:Nn \l_t= mpa_tl { #1 }
=C2=A0 =C2=A0 \regex_replace_all:nnN
=C2=A0 =C2=A0 =C2= =A0 { \s }
=C2=A0 =C2=A0 =C2=A0 { \c{textvisiblespace} }
=C2=A0 =C2= =A0 =C2=A0 \l_tmpa_tl
=C2=A0 =C2=A0 \texttt { \l_tmpa_tl }
=C2=A0 }\ExplSyntaxOff
\begin{document}
\pandocCode{we want visible spaces = here}
\end{document}


>=C2=A0 There may also be line breaks in the source that don't correspond to So= ftBreak.

Any lines that end with a comment charact= er (%)=C2=A0will skip over the newline character. Therefore, we can have ne= wlines in the source code that wouldn't trigger the active newline char= acter.

The following example plain TeX document pr= oduces the text foo bar baz:

\catcode`\^^M=3D13=
\def^^M{ bar }%
foo
baz%
\bye

Dne =C4=8Dtvrtek 27. =C5=99=C3=ADjna 2022=C2=A0v=C2=A019:09= :30 UTC+2 u=C5=BEivatel fiddlosopher napsal:

> On Oct 27, 2022, at 12:07 AM, Bastien DUMONT <bastien...-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org> wrote:
>=20
> Fortunately, it is possible by making the space and the newline ch= aracters active in TeX! (Provided that a SoftBreak is rendered as a line br= eak in the TeX output.) This is how \obeylines and \obeyspaces work.

But this might not be what you want; after all there are going to be sp= aces in code blocks, and you might not want to treat them the same way (the= y do not correspond to pandoc Space elements). There may also be line brea= ks in the source that don't correspond to SoftBreak.


--
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/9dfc8b26-3fda-4882-93b7-06d4467= 1ef7fn%40googlegroups.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/CAEe_xxiYD8Y5KJVB7WiKOo5xHbFWPq010rMXJEYs= u_XNd-hX4A%40mail.gmail.com.
--000000000000f2686205ec7d96c7--