From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29861 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Turn off headers for Mac OS clipboard content output in HTML? Date: Wed, 29 Dec 2021 11:23:05 -0800 Message-ID: References: <9ac6c67a-8aba-4a19-bde0-65e37340c5d6n@googlegroups.com> <60674d49-1a0d-485d-ac2f-ae6a8283dde9n@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="4591"; mail-complaints-to="usenet@ciao.gmane.io" To: "T. Kurt Bond" , pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBJ7LWKHAMGQEFGFLFMA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Dec 29 20:23:22 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-io1-f60.google.com ([209.85.166.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n2eXh-00010k-W2 for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 29 Dec 2021 20:23:22 +0100 Original-Received: by mail-io1-f60.google.com with SMTP id x11-20020a0566022c4b00b005e702603028sf9938458iov.2 for ; Wed, 29 Dec 2021 11:23:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1640805801; cv=pass; d=google.com; s=arc-20160816; b=QAjampunxETS/raXI9O1FtqynHMfKIfOJ4XyiPZJFkH8B/K0daYnRN1XkFuvOy/jhD YI2pv+O9OJ5XWmi5fQzLPnydnxdX06XxDlvwqLPJH7xRXEeF33Px0AtuZZlDOenz/W8d /FxCSfby0JpjOeC8wqeDVESWFLZVC+xW7Gb24xL9MmNIPSwzoa/EwO4hs9oI0aGI/7Hq daIL2ixO/+UY0s2ByF9xIu0h9605LlGhqDzHDg+QttK1K64CPHdc5qEk+gQ3cSMI9gAQ ymvZ5YNgJYmco/zP6hmKtq/H3wywGIa+Tmq+pi8PAnsKXluxHmVPHj97sM1Ozrt0t8d3 H0gQ== 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:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=CNSK1P3n8IrCgeKG89Ozifi6ynq6xATjH8ko5CrWkeQ=; b=GkEBf9JW3ZF/Dn+CKWN5B0wBd9zIFN93OXbUWv9yTi6VZIDrzLw3kQBRCVHedAavSB LGwNZ/9EJFC4h3GIHBIfvi1Erc6m6vIh5SfgT7De6ss8yfC16ortPk4ooqkv3V54Ghxj pLUi274eStp0lrdNWR3ql0DIqhseTlGY2WlSE1rfo8Lq+ZsEwTxaetG3uxuK+E1Ghgkr /LBUTChoLGRQ+vrfqu4Jjuhkdn9Qe2DL2aisBE4Xsr6wLijp96rdwon42QdyKagaeUye ylMzfOm9p4ffGSQKFVHZN3fVmqnMBx7dednTWrmtkv4smIjhiceN4WM7LwirNXdnokmt dYMQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=2NrAM8D+; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1036 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding: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=CNSK1P3n8IrCgeKG89Ozifi6ynq6xATjH8ko5CrWkeQ=; b=lSKFy737zm1aVYJPX2PXsI/edW7ijpLSGbhkYZqUYa0kiklR1AAKKzt4ov6zjePBvu 9QrWiKSTMEGxJf8g97xHsw5+Gxtjp/1zJGjtpKTb8+j/xfdodan8OGT+79z34lyLVR9f 3RuQmW0bA7OLbFLC18GHENh1TeYKRC+WNIfIY+gONBV9VaONwdlc2Otue7Qs7qNfMs9T 6//+kUSyAHnGAl5+uYokUlETKc3hCC2x1iah8zIboWZBjaNjUdThVgi919215OcVdI5t dcybWMGdWzb35PQEMhAzaBCTSGUu1z1crmu5Bn8Q+CdYvpi8OQABQCKxyiumH/Gd4THg y2kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding :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=CNSK1P3n8IrCgeKG89Ozifi6ynq6xATjH8ko5CrWkeQ=; b=0E2gVVD3RbZPz8loZEDnTE1Jk74j9oNXTJiskwD5AOJNr40jc8vwJgGHNGoSQl48Wf hMSFQ9iVNbu/9gaICRwz/3TCu/x3GBbjkWrbmY9kKuJvBDMMTX7V9RPC5UoX/MuGcV9I TA6lhfAPWzSRsEuzASZUkJSkNFSa/FFfKy32kbccLVJfTq0jHzNpb4zeZFMmts/FYZUN rSvj+Lg3426zWO5r2Y5amG8qenEuhuY6Rsw0EALtxkIXSwC0dxKgQVfB+awx58c69kNq CfjBnyinXmvBE1wqqX8TOJvtgBozY19avF/sibq6FgOIKSN4lFmSUlj0saNvmgHoJX3v Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533tDDEphaL//ERMmce2yEpJjVdfYxB/TZLg5oU5flRvPxhY+uXY 6WINux/OcnKC5nIGy58wNKE= X-Google-Smtp-Source: ABdhPJyhy8wzEunf1CUHsRyCh44qw/eyyslZcmD1osV+nAOzZjWsD1AXdcZrDbUgTO5q46IWmb8WFQ== X-Received: by 2002:a05:6602:1487:: with SMTP id a7mr12324893iow.57.1640805800592; Wed, 29 Dec 2021 11:23:20 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6e02:cb4:: with SMTP id 20ls2891036ilg.5.gmail; Wed, 29 Dec 2021 11:23:19 -0800 (PST) X-Received: by 2002:a05:6e02:1e07:: with SMTP id g7mr12213250ila.277.1640805799064; Wed, 29 Dec 2021 11:23:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640805799; cv=none; d=google.com; s=arc-20160816; b=eamlFrpzDgwlnqDo/lXT/nVnOAZ0AJytXGg5SOlsGzmyqPRQl7/z+qjxB/sBV1AzPL tblcHp7ZuT2MnYGeEVldaUizl4hMqUtTvhLqK8v3+WxtCHqSvoY8yVYgc/cI5kaNrBWV TDgvpyReGAfXSnPyq2aRPGUQi0EgpR4GbDYEcGnJg8pHIKTmw/BIgANwjqnNZLy5sQsp v7vZUp1QItK0L9hvn3sG48vln//piJ6W3A57I6p9Jle7lTEkQAE0qhvJ4gkj+G71Nyrl r9YfGU8afyJvBTx7O3Zz0IOAizCd3aT6CJaf8/p67lWZ+1zzF//ziapBRPGU4ROilM2z qXug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:dkim-signature; bh=APz8ycnjIRUY9rDJ4i5p8E6Yq4MFJAPBP4A+kmZYXow=; b=UgPCG2h/iE6JfJbod1R1cnpgHTCNnHv8gJPAjXr28epCGgvyTQNvVnbMK3WqZqYU2r fgx69ptNlt0ebC9mTh8rqv5z4/v7VSVT8Y0thRntmI4G+UGSdsf44mELpXYmXszg95+d LzuusalbVPB5Fd2y/HhVsASG2qK5DnzuhwBHPvaEQMADeb7mmpdL7sXcfJVoJz3Qew0F aTqROa6jmLmei0bVQ0+dl7cV86uol+YKx9xqqE3F916FsfTIbC//vobPSXLsv80uLwN9 IBB202byh96unDVgLqct8V13b0YV01HHR9sRgcDSIMeiJkzKOkFPpRmuuVuM94gfjlaz tlAA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=2NrAM8D+; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1036 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com. [2607:f8b0:4864:20::1036]) by gmr-mx.google.com with ESMTPS id g1si836224ila.1.2021.12.29.11.23.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Dec 2021 11:23:19 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1036 as permitted sender) client-ip=2607:f8b0:4864:20::1036; Original-Received: by mail-pj1-x1036.google.com with SMTP id f18-20020a17090aa79200b001ad9cb23022so20709056pjq.4 for ; Wed, 29 Dec 2021 11:23:19 -0800 (PST) X-Received: by 2002:a17:90a:e7c6:: with SMTP id kb6mr33908207pjb.200.1640805798080; Wed, 29 Dec 2021 11:23:18 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id f125sm15049956pfa.28.2021.12.29.11.23.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Dec 2021 11:23:17 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id DC9DAA29D; Wed, 29 Dec 2021 14:23:05 -0500 (EST) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=2NrAM8D+; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1036 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:29861 Archived-At: If you use 'pandoc -f commonmark -t html' then or 'pandoc -f gfm -t html' or 'pandoc -f commonmark_x -t html' then the doctype will be treated as raw HTML. "T. Kurt Bond" writes: > If you don't specify an input format, pandoc assumes markdown input, and > while markdown allows literal inclusions of HTML elements, it apparently > doesn't allow DOCTYPE declarations, so it does not consider that to be > HTML, and translates the angle brackets into character entities. > > $ echo '
  1. Bogus
' | pandoc -t html > <!DOCTYPE html> >
    >
  1. > Bogus >
  2. >
> > However, if you add "-r html" everything is fine: > > $ echo '
  1. Bogus
' | pandoc -r html -t html >
    >
  1. Bogus
  2. >
> > > > > On Tue, Dec 28, 2021 at 11:19 AM philmac-97jfqw80gc6171pxa8y+qA@public.gmane.org > wrote: > >> Thank you for your assistance! Indeed, I misread the situation, though t= he >> outcome is still strange. The HTML I am starting with in my clipboard is= a >> complete document with a doctype declaration. The first line is: >> >> > http://www.w3.org/TR/html4/strict.dtd"> >> >> Pandoc (pandoc -t html+smart) converts the angle brackets into HTML >> entity names: >> >> <!DOCTYPE html PUBLIC =E2=80=9C-//W3C//DTD HTML 4.01//EN=E2=80=9D =E2= =80=9C >> http://www.w3.org/TR/html4/strict.dtd=E2=80=9D> >> >> Later on in my process, the content gets converted to RTF using textutil= , >> which removes doctype declarations but retains the line above, convertin= g >> the entity names back into angle brackets=E2=80=94which is how I got the= idea that >> Pandoc had put it there. >> >> I am not sure why my Pandoc command converts the angle brackets in that >> first line=E2=80=94it leaves the other angle brackets in the document al= one=E2=80=94but I >> can just remove that line from the clipboard text before processing it w= ith >> Pandoc, so no problem. >> On Tuesday, December 28, 2021 at 10:48:46 AM UTC-5 tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> wrote: >> >>> When standalone is not specified, pandoc typically outputs fragments >>> rather than a complete document. This is convenient for the case where= you >>> are processing multiple fragments into one document. (This happens in = HTML >>> output but also in other output; groff -ms, ConTeXt, LaTeX.) So normal >>> HTML output I see when I don't specify standalone does *not* include th= e >>> doctype. >>> >>> $ echo '* Bogus' | pandoc -r rst -w html >>>
    >>>
  • Bogus
  • >>>
>>> >>> This is with pandoc 2.16.2, installed with homebrew. >>> >>> >>> On Tue, Dec 28, 2021 at 9:33 AM Joseph Reagle >>> wrote: >>> >>>> The doctype declaration is a standard HTML feature and declares the >>>> version of the HTML. Pandoc, especially in `--standalone` mode include= s >>>> these at the start of an HTML document. >>>> >>>> I'm confused, however. You haven't specified standalone mode. (And why >>>> would you want them removed in any case?) And the behavior you are >>>> describing doesn't correspond to recent versions -- I'm using 2.16.2. = I'm >>>> not sure when/if pandoc last used HTML4.01 strict. >>>> >>>> In any case, you could create your own HTML template, without a doctyp= e >>>> declaration. >>>> >>>> https://pandoc.org/MANUAL.html#templates >>>> >>>> On 21-12-27 15:04, phi...-97jfqw80gc6171pxa8y+qA@public.gmane.org wrote: >>>> > I am using Pandoc to convert dumb quotes to smart quotes in HTML. Th= e >>>> HTML is on my MacOS clipboard: >>>> > >>>> > pbpaste | pandoc -t html+smart | pbcopy >>>> > >>>> > The output begins with >>>> > >>>> > >>> http://www.w3.org/TR/html4/strict.dtd=E2=80=9D> >>>> > >>>> > and a blank line. >>>> > >>>> > Is it possible to turn this off? >>>> >>>> -- >>>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/pandoc-discuss/e8eac3cc-feb6-e3af-dc= 9d-d3fe0b964925%40reagle.org >>>> . >>>> >>> >>> >>> -- >>> T. Kurt Bond, tkur...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io >>> >> -- >> You received this message because you are subscribed to the Google Group= s >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n >> 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/60674d49-1a0d-485d-ac2f= -ae6a8283dde9n%40googlegroups.com >> >> . >> > > > --=20 > T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io > > --=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/CAN1EhV-%2BrH3p-Oj113nxCm%3DSc8M8hKk1Rjci-sXoHMOYHC6CyA%40= mail.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/m2o84zz04m.fsf%40MacBook-Pro-2.hsd1.ca.comcast.net.