From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/11714 Path: news.gmane.org!not-for-mail From: Matthew Pickering Newsgroups: gmane.text.pandoc Subject: Re: output html entities? Date: Fri, 9 Jan 2015 20:14:44 +0000 Message-ID: References: <1b63e5cd-5fe8-424e-a246-c5e39cd2e3b4@k42g2000yqa.googlegroups.com> <14386839.2417.1295205524913.JavaMail.geo-discussion-forums@yqcj39> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1420834490 5595 80.91.229.3 (9 Jan 2015 20:14:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 9 Jan 2015 20:14:50 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCO2LGEC4AIBBNHNYCSQKGQECLFVERI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jan 09 21:14:46 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-lb0-f188.google.com ([209.85.217.188]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y9fxF-0001QD-CP for gtp-pandoc-discuss@m.gmane.org; Fri, 09 Jan 2015 21:14:45 +0100 Original-Received: by mail-lb0-f188.google.com with SMTP id z11sf914203lbi.5 for ; Fri, 09 Jan 2015 12:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=CqGMRqvILxhWzRat2HCADuiRX3yGKLB/mrVU7ykT3bo=; b=kZJ1U34JridKr6TAECkVeBiKXUODon9EnaIv7sEJxkubF3jIMvMz2+fk+4q0uHqziQ zmrrQhK0RkPQ7mBMGvJwsj+AE5NuU838JAdDVWCvm5pxMKpVCrmfcqfRDMMItk9gsV48 ipJEO4WXNXSZwN7jndCEc2jOXiDkgUX9T6GvWZV3uT/B+21BqkpdT0pKuGonpjn9xSq6 5WlEQsNjYKZn7dc8z+jgC2qPEGhMhyYKX/GBFOmjFVxfNcagsZZjPudY2cgIjEZ5tmUa erAnPWG8wKH09Vw4SiNDYx3Borf8xC2ZGnM8KzM4CLGTFT0fLbQwTaBfQmMp5exKJ4Rs lwDQ== X-Received: by 10.180.108.13 with SMTP id hg13mr41569wib.0.1420834485069; Fri, 09 Jan 2015 12:14:45 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.180.8.227 with SMTP id u3ls198604wia.2.canary; Fri, 09 Jan 2015 12:14:44 -0800 (PST) X-Received: by 10.194.78.42 with SMTP id y10mr676446wjw.4.1420834484461; Fri, 09 Jan 2015 12:14:44 -0800 (PST) Original-Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com. [2a00:1450:4010:c04::229]) by gmr-mx.google.com with ESMTPS id oi7si967406lbb.1.2015.01.09.12.14.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Jan 2015 12:14:44 -0800 (PST) Received-SPF: pass (google.com: domain of matthewtpickering-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4010:c04::229 as permitted sender) client-ip=2a00:1450:4010:c04::229; Original-Received: by mail-lb0-x229.google.com with SMTP id p9so9894961lbv.0 for ; Fri, 09 Jan 2015 12:14:44 -0800 (PST) X-Received: by 10.152.36.100 with SMTP id p4mr23616675laj.11.1420834484346; Fri, 09 Jan 2015 12:14:44 -0800 (PST) Original-Received: by 10.114.91.136 with HTTP; Fri, 9 Jan 2015 12:14:44 -0800 (PST) In-Reply-To: X-Original-Sender: matthewtpickering-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of matthewtpickering-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4010:c04::229 as permitted sender) smtp.mail=matthewtpickering-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dkim=pass header.i=@gmail.com; dmarc=pass (p=NONE dis=NONE) header.from=gmail.com 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.org gmane.text.pandoc:11714 Archived-At: I think the idiomatic way to do this substitution now would be with a filter. I can whip up a quick example if you like? On Fri, Jan 9, 2015 at 7:53 PM, Adam Wood wro= te: > Well this is 3 years later, but I happened to be looking into something a= nd > ran across it. > > So... I can't tell if Mark was being facetious or not in his disavowal of > any desire to have html entities for curly quotes, emdashes, etc. > > I still strongly prefer it, especially for certain cases where I don't ha= ve > control over the display environment. (I write for other people, and > sometimes other people have bad html character set declarations --- also > commenting systems, feeds, etc.) > > My solution has been to execute pandoc from within a bash script I wrote > that goes back afterwards and uses sed to replace characters with their > appropriate entity. > (I also use it to direct the output to an appropriate directory, with a > filename based on the original, and with all the other options I want --- > rather than trying to remember and have to type a million flags and optio= ns > and two file names into the command line) > > kfile=3D"$1.kramdown" > hfile=3D"../html/$1.html" > > pandoc -f markdown-auto_identifiers -S -o $hfile $kfile > sed -i '' -e "s/=E2=80=99/\’/g" -e "s/=E2=80=98/\‘/g" -e 's/= =E2=80=9C/\“/g' -e > 's/=E2=80=9D/\”/g' -e 's/=E2=80=94/\—/g' -e's/=E2=80=93/\&nda= sh;/g' $hfile > open -a "Sublime Text" $hfile > > > > > > > > > On Sunday, January 16, 2011 at 11:18:44 AM UTC-8, Mark (my words) wrote: >> >> Well, I=E2=80=99m embarrassed. >> >> I have been out of the loop for a long time. Back in the day I saw the >> debate go from not using special characters, to using named entities, to >> numerical entities, and back and forth. And now=E2=80=94 >> >> Are we actually to a point were we can use real raw characters?! >> It strikes me as a fantastic magic. >> >> Bruce is right, we should be living in the present and planning for the >> future. My bizarre need for human readable machine language is antiquate= d >> and needless and moot=E2=80=94you can=E2=80=99t get much closer to human= -readable than >> straight-out unicode. >> >> Now I=E2=80=99m feeling rather silly for hacking up the Multimarkdown so= urce code >> to spit out named-entites now, but it was a lot of fun. >> >> And yeah, I=E2=80=99d installed the latest Tidy a couple months back but= haven=E2=80=99t >> had the time to screw with it until now, again more magic, that project = has >> come a long way too! >> >> >> Thanks guys for your patient advice. >> >> >> -Mark > > -- > 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/e5aaeeee-0d20-414c-a90f-= 7e67b347fb5a%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. --=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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/CALuQ0m92svWXkz3ghXACCiYkX_FjPghZ4hL_5Ljq6L0fDcMPuw%40mail.g= mail.com. For more options, visit https://groups.google.com/d/optout.