From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31673 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?V=C3=ADt_Novotn=C3=BD?= Newsgroups: gmane.text.pandoc Subject: Re: Plain TeX writer Date: Wed, 2 Nov 2022 07:35:55 -0700 (PDT) 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/mixed; boundary="----=_Part_1633_1098771479.1667399755893" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32020"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDONFQGBUMIRBTEARKNQMGQEVQ5XW4I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Nov 02 15:36:01 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f187.google.com ([209.85.167.187]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oqEqW-00083M-7e for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 02 Nov 2022 15:36:00 +0100 Original-Received: by mail-oi1-f187.google.com with SMTP id bh28-20020a056808181c00b0035522358734sf7931724oib.10 for ; Wed, 02 Nov 2022 07:36:00 -0700 (PDT) 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-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=387AUeWMztYeQGpbvdSlK21zIaDaDL4ZL4m5ubk9Xtg=; b=jsW2L4kv12XML1VVvpxZ7QGGnzKkxGEH038PhXY56YYaFSFDHiup6/qMGjGnMlozg8 0vCd6C2XSnYsYtNOL0+BePpp9J7hGO8xdMocqhoF9Lupi0bvwOXQ4EryW7T+oxG94FmI JhfupHRNGLJEoepAu/6ZplrKQHaSbkqJVZ52TylpppD0NJTuLkQwx9rxnBoQ/54UU7VA n8sdUzXNfzve/dgQQEUD2FaKsV8rK1gIfZcAdKM1Q4/5yl5rNA0iFHG/JH4B7XNy2yhp e13XklH6H7wY50ov3MPYgapUzSsxkd1mA5SAqZMS+5M8vSenw5O67HpkbF55gQAT5U3/ NRdg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=387AUeWMztYeQGpbvdSlK21zIaDaDL4ZL4m5ubk9Xtg=; b=TkF9wBtUSIIX4CFWhyOaW0hD8GXDU0akSVJ61HCbIfFBolyQhtUGnsj9xUccid2N4U Ml+/8cFskvH2YFl9GqNFB/+4R2xCa+SijuU0jkNIXY7zpxC3MG9+pe9zkB2c6ReRJaSR TUfz4M8aIJv7Q0iXzg8/xS8lgAQulumQkBQwvTul5daGDTHxv4GZcUXUkA+RrCuuPF+W sljfXkBmmOQns3i0x1MQgUGnu034c8ogwc+EcQ34zcrrA7V0SCHRNj/N3U88a4gpioao wtlayXzmiWRrTxvVpbXznXpVC7LlXSuXcGKgxPr2fJ5nWftmbDSMVDUQaT6zR7NQyhhI gJHQ== 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-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=387AUeWMztYeQGpbvdSlK21zIaDaDL4ZL4m5ubk9Xtg=; b=ATXYtgFnuQucv5CIFx0rmdl7jQtYSZ9QeW1TorX/gYPbKI12Lrd2IN0ngLZeFb2ayi lEOBtvpp0fUarBG+BAD9Ii9WF6fWKt2x1/7XSiuXkH0EqkFTZFStTn2W4LQ7swOPHThB nwVExnBVqdpi46/pPVKNptLSUSBmU54j/NrsvuLLnorpCynSQ7HcNzTtaXPkcZor4TKE 4a2IA8Gvloih6Q96HRG0tzuahpfvexMeGGgO3A+SVUVHEcGmT8iH2FpcidHht3DWX8yP R2tD9kH1YlYsTyvuDcvhUpClLo5pAK3a0Oh7DuUHh9PrKBYHCvQ8B8TUyle+VdOxujnX bNcA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf087YKznXUKATIc3L8DON3S1Fyg9NuZu09c3NSBgAvbODK9tMiV V53mMjvi58D36a7LJmSi6DI= X-Google-Smtp-Source: AMsMyM6B67zOy8wQQB3D3dfTTY0AwCXWH8P9v8MwZ5qNbqVX0d4BeE/rvZ/fmWsKUH6ReLbbWP4V4g== X-Received: by 2002:aca:f2c4:0:b0:35a:4212:2aa6 with SMTP id q187-20020acaf2c4000000b0035a42122aa6mr1145102oih.8.1667399759104; Wed, 02 Nov 2022 07:35:59 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:b1d1:b0:132:8229:a3d7 with SMTP id x17-20020a056870b1d100b001328229a3d7ls538099oak.6.-pod-prod-gmail; Wed, 02 Nov 2022 07:35:56 -0700 (PDT) X-Received: by 2002:a05:6870:a913:b0:12c:55d6:968 with SMTP id eq19-20020a056870a91300b0012c55d60968mr25249536oab.244.1667399756492; Wed, 02 Nov 2022 07:35:56 -0700 (PDT) In-Reply-To: X-Original-Sender: witiko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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:31673 Archived-At: ------=_Part_1633_1098771479.1667399755893 Content-Type: multipart/alternative; boundary="----=_Part_1634_1200492922.1667399755893" ------=_Part_1634_1200492922.1667399755893 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=20 support an option to control whether to generate ASCII space or=20 \pandocSpace (perhaps with a default of generation ASCII spaces)? The https://ctan.org/pkg/markdown package is just a rendering backend for= =20 the various *\pandoc** macros. The decision to produce an ASCII space=20 instead of the *\pandocSpace* macro falls on the plain TeX writer=20 *pandoc-to-markdown.lua* from https://github.com/drehak/pandoc-to-markdown/= .=20 The option could be passed to the writer easily enough through metadata. Dne st=C5=99eda 2. listopadu 2022 v 15:23:55 UTC+1 u=C5=BEivatel=20 wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org napsal: > Would it be feasible for the https://ctan.org/pkg/markdown package to=20 > support an option to control whether to generate ASCII space or=20 > \pandocSpace (perhaps with a default of generation ASCII spaces)? > > On Wed, 2 Nov 2022 at 14:17, V=C3=ADt Novotn=C3=BD wro= te: > >> > So, for example, you couldn=E2=80=99t make Spaces appear as visible = =E2=90=A0=20 >> characters, and you couldn=E2=80=99t make SoftBreaks create hard breaks = in the=20 >> output. >> >> Replacing *\pandocSpace* with ASCII spaces makes it difficult to=20 >> reprogram spaces on the top level of the document, but we can definitely= =20 >> substitute spaces in parameters of commands such as *\pandocCode*,=20 >> which would cover many (if not most) use cases. >> >> The following example LaTeX document produces the text=20 >> *we=E2=90=A3want=E2=90=A3visible=E2=90=A3spaces=E2=90=A3here* in a monos= paced font: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> *\documentclass{standalone}\usepackage{xparse}\ExplSyntaxOn\ProvideDocum= entCommand =20 >> { \pandocCode } { m } { \pandoc_code:n { #1 } }\cs_new:Nn =20 >> \pandoc_code:n { \tl_set:Nn \l_tmpa_tl { #1 } =20 >> \regex_replace_all:nnN { \s } { \c{textvisiblespace} } =20 >> \l_tmpa_tl \texttt { \l_tmpa_tl } =20 >> }\ExplSyntaxOff\begin{document}\pandocCode{we want visible spaces=20 >> here}\end{document}* >> >> > There may also be line breaks in the source that don't correspond to= =20 >> SoftBreak. >> >> Any lines that end with a comment character (%) will skip over the=20 >> newline character. Therefore, we can have newlines in the source code th= at=20 >> 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 = =20 >>> wrote:=20 >>> >=20 >>> > Fortunately, it is possible by making the space and the newline=20 >>> characters active in TeX! (Provided that a SoftBreak is rendered as a l= ine=20 >>> break in the TeX output.) This is how \obeylines and \obeyspaces work.= =20 >>> >>> But this might not be what you want; after all there are going to be=20 >>> spaces in code blocks, and you might not want to treat them the same wa= y=20 >>> (they do not correspond to pandoc Space elements). There may also be li= ne=20 >>> breaks in the source that don't correspond to SoftBreak.=20 >>> >>> >>> --=20 >> You received this message because you are subscribed to the Google Group= s=20 >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n=20 >> email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/9dfc8b26-3fda-4882-93b7= -06d44671ef7fn%40googlegroups.com=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 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/d2933f0d-4a51-4fd4-bb4f-32b5da362ab9n%40googlegroups.com. ------=_Part_1634_1200492922.1667399755893 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 con= trol whether to generate ASCII space or \pandocSpace (perhaps with a defaul= t of generation ASCII spaces)?

The https://ctan.org/pkg/markdown package is= just a rendering backend for the various \pandoc* macros. The = decision to produce an ASCII space instead of the \pandocSpace = macro falls on the plain TeX writer pandoc-to-markdown.lua from = ;https://github.c= om/drehak/pandoc-to-markdown/. The option could be passed to the writer= easily enough through metadata.

Dne st=C5=99eda 2. listopadu 2022=C2= =A0v=C2=A015:23:55 UTC+1 u=C5=BEivatel wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org napsal:
Would it be feasible for the https://= ctan.org/pkg/markdown package to support an option to control whether t= o generate ASCII space or \pandocSpace (perhaps with a default of generatio= n ASCII spaces)?

On Wed, 2 Nov 2022 at 14:1= 7, V=C3=ADt Novotn=C3=BD <wit= ...@gmail.com> 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-discus...@googleg= roups.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/d2933f0d-4a51-4fd4-bb4f-32b5da362ab9n%40googlegroups.= com.
------=_Part_1634_1200492922.1667399755893-- ------=_Part_1633_1098771479.1667399755893--