From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/21998 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: How to Assign Class to HTML Table using a Filter Date: Thu, 31 Jan 2019 11:08:01 -0800 Message-ID: References: <553f3670-7cb1-402f-9a92-89f3774d17c0@googlegroups.com> <1cfe6e9f-6e03-4129-9162-d0ee0d74878b@Spark> 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: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="193235"; mail-complaints-to="usenet@blaine.gmane.org" To: Ken Dow , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBHUPZXRAKGQEUOKWKAI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jan 31 20:08:17 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ot1-f62.google.com ([209.85.210.62]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1gpHhA-000o91-JW for gtp-pandoc-discuss@m.gmane.org; Thu, 31 Jan 2019 20:08:16 +0100 Original-Received: by mail-ot1-f62.google.com with SMTP id n22sf1786796otq.8 for ; Thu, 31 Jan 2019 11:08:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1548961695; cv=pass; d=google.com; s=arc-20160816; b=zYNuiI87DW16lUjM8t3F9xeiw8EB3YooLNOezwvn301IKXZbsPm2oD8wpl4fvtXRTE t6yyDG6hh3SQat8BVThU5FJG/w/DQtLwWNZgR//On4bLjrq7iDqx6lYiEGa3YFqZeVhH IBJ3kU8GPYadCvnXUW6hDVkJg0WSNjARYkpZL0WluqRcOUmFUe+cC/jgcyLJ42jiHpWM 2BKl8GlOv1GX1WVtiqNdEt5pRDQvTQWsxmnAUNPhaATMGX0UxHmnmd3Fw/gjuCbfHCaD JWEPPQDSkZGWFZxnvPIHRpDoVFU/JClok4KL/TvvO3CLK2ldWjqf++Hv5GpITxuqUtXk jVkg== 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=t3B1zMj2uJ8rv2Ybh7aRRfWqlIEzp6r+t6hP29vTaFo=; b=gFuicFUJdykcch78Q7otO4YniUyD24ndjY7PR1NzeMJRYUwxowOXkgFok6J/vGbnY9 j/q4r0GkhAEdNoPDGqn9X0pC1cgky7x6JpA73BKlbo8QZR43dRukUTugmQ4g0AR07OSz kt9MB02YvxHIIvdUEemWn32NZGDDuxJaQpSSu9ZgxEI9v+7aSkJ4rTCAzXyjgWt0wRtA 30wu6gPhNHMhsaNiVuxDqTZBkJFCp4m2UfQ1oEOk7s/3amxsBhVFbGt+UV1joT6IADvx ITzyq2U1JuQaaXDq6zfk1WC4DTNNWyMBzzyFoDqS7+A9EbVNqbb2ps/7YIj33ubH18h/ JF5g== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=ggis8H7X; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::632 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=20161025; 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=t3B1zMj2uJ8rv2Ybh7aRRfWqlIEzp6r+t6hP29vTaFo=; b=ng1C51C3+IOVmebtPIwMtAbigOZC1MPY8OXPNZAEmpExk4Z5eGUbrVYTkI5uvG/LMR AiP3rkme6Vs6/LKn+2dcOvjj0eytQT29JHgQc8RqZ35sfg+lw0tGPsSCSBB2kQs0WPvd XZIgGk1UyFpiGrFHOlNhIaTURgwqBYyRG3P33N7WSwzQBzNkvcZZTl/2cYy6ogMQSoW9 OO9KMor2lQ5JrM6heM+DhdlIwhep1Pf/j1RnF3TOH/SO5l7Ws2FHMZKZNHj2wBAeDsrT 0SVu/07Y0X+ezPxLSVoUxk/Z990Gzj5krz7JY90wZL4UjQJfMMhPOei3AjmON0ftRxCq gDnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=t3B1zMj2uJ8rv2Ybh7aRRfWqlIEzp6r+t6hP29vTaFo=; b=m4Q60uHQMoGyvWy6+t9NnOmiBHgsDGrZv0f1gxNsX7yg3masBhYuE414yjGzkKO2B+ 45H9XGZW6nvHQBHvEhggxomHEGLajE3pZYS/r1spCyTTTGru4Hby+0B4Kw/h38wiS4eR CCj6M77vaJcxbHGa5Mc0QCTwAWNbi7gr48RRT2Z5E4bVzsCrvoagZsQyASPmF5iWY2IV 51IwUabyEcC7RjFdP8HMfyBIRgsL3BzsASILkuSe06ym4l2mqQw4HwJp8PSem7fJVVX/ hCsofYg/6PMHY6SkpdQxgENa2CYKEn26jKNpDQF/4lXtAeoWbVlRKJJzBvHv7/R36ND9 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AHQUAua/9UwCVMKkfavHKlHQ/CFlkZJ0X6sj2VrUPZinVHa9T1VqFVwS QyI/hHd66Pth+LfEaIdnl1Y= X-Google-Smtp-Source: AHgI3Ia6fK4LxqJf00JWJh6H+1aAanRX7w6xh8lTRPB2sjHKSlAMtwuEYTZ3wQSzlOckmfg+3bTjyA== X-Received: by 2002:aca:d607:: with SMTP id n7mr235629oig.1.1548961695335; Thu, 31 Jan 2019 11:08:15 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:6046:: with SMTP id u67ls185571oib.7.gmail; Thu, 31 Jan 2019 11:08:14 -0800 (PST) X-Received: by 2002:aca:4ac1:: with SMTP id x184mr10480546oia.25.1548961694283; Thu, 31 Jan 2019 11:08:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548961694; cv=none; d=google.com; s=arc-20160816; b=w5HREO0lU6w7JEBeYcxMSkAseLd72GAeJnhxb6MNCDV9q/6ZuYv2Jzl5JHPqreFi2n KEfS7UG1nQFaROthbAJ5whAgbe2n49k2m3qd5jIn0xIx7eSPsLAlpZjo7eiwpUVWSyR4 Nz2iDo8xAMA93DretxNnwIsRtaizTNxApeAOVqUVfYrpDSUD6Fi88nPTe30y46r6xCOM b0JzNmiePyqepqHrH9yzbIcgPlU13At7uRoiUvUhzW23OLdVEIDRsWeODAraomLNg+LW esb27LIcMm/9Lsttdofdam3vl7dDqG47yZaLJvA0gLtunrqRCIE/iOfgsD2w2xYw9n55 q/Rw== 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=27vtC4A4eMl3fubDnrQoCHDcN0eYDWYMTTlstyBXnX8=; b=Mp5DP8b36jjKgadrWgmDDvh1gFrkkXsWqpvPGaOsZhJf5UZezCfEFF5AEUXijtAV26 +8YcrI9jLyrNfYlEZUn+iysWX0byVWnbul8f4HmQgrK9VJxOSuSAm9ntiJRUZCCH+5ow h7DzL6rvvEPbvGbx7zX+xaU79mN0QrNodjER/DRJ1gPpGz1OWw9WDRd4/O1h4MJhM2nT mYEJAYVatizf+ZUVZmXFVuPOvSM9Y2zRAGnWGv412fEyXVx5jnbFfhQ20fAZq8DL6WxR ChCFx7hzefe5If+A7gjTTfCaEW380f/XTybHRgf90Ry+t4j+7zZcD8JVysxpzKqmj3ol VZYw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=ggis8H7X; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::632 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com. [2607:f8b0:4864:20::632]) by gmr-mx.google.com with ESMTPS id i3si288775otk.5.2019.01.31.11.08.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 11:08:14 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::632 as permitted sender) client-ip=2607:f8b0:4864:20::632; Original-Received: by mail-pl1-x632.google.com with SMTP id a14so1882773plm.12 for ; Thu, 31 Jan 2019 11:08:14 -0800 (PST) X-Received: by 2002:a17:902:7443:: with SMTP id e3mr36133827plt.304.1548961693503; Thu, 31 Jan 2019 11:08:13 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id k63sm20056440pfc.76.2019.01.31.11.08.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Jan 2019 11:08:12 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 7CBB5A16C; Thu, 31 Jan 2019 14:08:01 -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.20150623.gappssmtp.com header.s=20150623 header.b=ggis8H7X; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::632 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.org gmane.text.pandoc:21998 Archived-At: I see the issue. Of course, if you go to latex or another format, you'll get a formatted table from this input. So one might ask why HTML should be different. Ken Dow writes: > Right, understood. I agree that the "table" class enables a distinction= =20 > between layout tables and real ones. My case is DOCX -> HTML, however,=20 > something like: > > pandoc -s sourcetest.docx --reference-doc=3Dcustom-reference.docx --extra= ct- > media=3D./ --css=3Dcss/spectre.css -t html -o sourcetest.html > > If the HTML writer were to add the "table" class universally, then tables= =20 > used for layout *in the source DOCX* would end up with borders (assuming= =20 > Bootstrap et al). > > On Thursday, 31 January 2019 10:09:36 UTC-5, John MacFarlane wrote: >> >> >> To be more precise: The suggestion above was just to=20 >> add the 'table' class to the default HTML output, not=20 >> to docx output.=20 >> >> I believe the reason bootstrap et al only style tables=20 >> with class 'table' is to distinguish "real" tables=20 >> from tables used for layout (e.g. columns) in HTML.=20 >> However, it seems to me that all pandoc-produced=20 >> tables should be real tables. There may be exceptions,=20 >> though -- do people use pandoc tables for layout in=20 >> HTML?=20 >> >> John MacFarlane > writes:=20 >> >> > Adding a 'table' class wouldn't affect docx output=20 >> > unless we specifically modified the docx writer to behave=20 >> > differently in that case.=20 >> >=20 >> > Ken Dow > writes:=20 >> >=20 >> >> It's not uncommon for people to use unbordered tables for layout in= =20 >> DOCX.=20 >> >> Adding a "table" class automatically would produce HTML borders where= =20 >> they=20 >> >> weren't intended.=20 >> >>=20 >> >> In your first response to this, you suggested "insert it into a Div= =20 >> with=20 >> >> attributes". Is there some way to achieve that with a DOCX source?=20 >> >>=20 >> >> On Thursday, 31 January 2019 00:11:10 UTC-5, John MacFarlane wrote:= =20 >> >>>=20 >> >>> Ken > writes:=20 >> >>>=20 >> >>> > That would be great - it comes up because frameworks like Bootstra= p=20 >> and=20 >> >>> Spectre uses to apply their = styling.=20 >> >>>=20 >> >>> That's true. It's tempting to just add that class by=20 >> >>> default in the HTML writer... I wonder if that would=20 >> >>> cause any problems?=20 >> >>>=20 >> >>>=20 >> >>=20 >> >> --=20 >> >> You received this message because you are subscribed to the Google=20 >> Groups "pandoc-discuss" group.=20 >> >> To unsubscribe from this group and stop receiving emails from it, sen= d=20 >> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org .=20 >> >> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=20 >> .=20 >> >> To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/fdd9a7c1-f66f-4116-bbff= -2ee91842c4a8%40googlegroups.com.=20 >> >> >> For more options, visit https://groups.google.com/d/optout.=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 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/msgi= d/pandoc-discuss/ae8d390d-1006-4c90-96ed-3f921f7a0dfa%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/yh480k36p8r6ge.fsf%40johnmacfarlane.net. For more options, visit https://groups.google.com/d/optout.