From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/21997 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ken Dow Newsgroups: gmane.text.pandoc Subject: Re: How to Assign Class to HTML Table using a Filter Date: Thu, 31 Jan 2019 08:49:11 -0800 (PST) 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: multipart/mixed; boundary="----=_Part_3224_1315781853.1548953351483" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="114217"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBD7LJ7PVSXEJB62ECCEM5THCAUNAIH4VQPFQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jan 31 17:49:15 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi1-f186.google.com ([209.85.167.186]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1gpFWc-000Tb0-EC for gtp-pandoc-discuss@m.gmane.org; Thu, 31 Jan 2019 17:49:14 +0100 Original-Received: by mail-oi1-f186.google.com with SMTP id a62sf1742531oii.23 for ; Thu, 31 Jan 2019 08:49:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=4ZYqcvtptWeiB/+C9P054Kn9fw1RSx7TC3oGQn8r2Zs=; b=FtHhVMWsjpGMCf776InS8RBJenwBAagIA9HzdKbveNxF62mRG60RPLjfegOusS+F7v JyQtAtAETKN9O33CHfDqj9E5YfJwW4gBYC0k072xtyXNRr2hmFyZ+mLtvOoWCoAqXb6l ccFa7jlODgF+ME9dGRHp4iO8pkbN4ESG97CcaYTOYOPw5iXcktO1dHstlXsJYg3GpilF WWl4bCwHELbRjUQbqUQEnsm4arO8ZfOLQszWkEVz/THFBrntN1hGSscs6eArvmNp7zuQ d9uypnPXD3eJuJE0V+pW5F+sUu97dcz3p9cBjgtDn/jz3BaNhrPPE2fxC9bSe2fQNPfK le1w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=4ZYqcvtptWeiB/+C9P054Kn9fw1RSx7TC3oGQn8r2Zs=; b=ETQVbe55uZceop04qxwLkuOHER3UN77p7TgqpHyS9uK/jUn3s1pGrLkHcKHZA/UGDe ZCu/VWlDnFTUKZxzj+RzJg4dbtemqUuzf/QIn5I9V3L76mLS3oFIWAwurwcmkeayo2UL hSDgX+ygdJLv96dL4trLx4kmkJYWiwzAffAy+y3lbnKab0tjOWuSFFINJSFNqAYaYj+b QiR7svhkPZ+IXLLpGqeEEVyUeFuDto7gAw5lgH6ggvipjg8VCbQ4c+eBzg6QguxuY+2q a0ARnrWwaVK3wlmJ1zU88L95sj4lKRcA8lTmBTg1CwqQyZ2nocPW9FOoXCc95cBjMnL3 stUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=4ZYqcvtptWeiB/+C9P054Kn9fw1RSx7TC3oGQn8r2Zs=; b=ikeuyWoiuHUL4ONPHnKEeD+MVWyBS8sIa+boKWdDL+D+mI6pE0LZnkAtS3i2qkyuZr Y3uPTlVh9qPs5irU+rXqabXEpaPANkTYpuz9jrl48/BG0gpQiZI0dAgZ+mtOuW4SsYhv JywW/ZcQLB+brPyqc+wDCN4MaNrHZ3e0pXtDHa/ga0Y/moN899p4qVK6mQExHSkKbQ6z O6R7ujFhPsCyussW6qWK15mJkg3RTYtnLBFszdWLZU6BHtMmt9+9LaH0n4v2D5V3ZwM0 cLtIBC64GwNmZrfADNAF2QZexOQYXgoMkzNrkYUe5w+lmdxPKw6Aqo1lDF7ZVDqmr4W/ AnMA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AHQUAuZE0+16s2C9Zzv2+uLEl/Cz7X4E3EfSIE/7g2IeAhrXnwwswloI q+9ELUQPavqRQFtNSs/W3aE= X-Google-Smtp-Source: AHgI3IYVSFeH2RNo0VVjSCpWv1St4r9+Ms9o4LvvCfIh+XLn8RVweghj7oYU20oWOlnz4alTDsJcBQ== X-Received: by 2002:aca:d607:: with SMTP id n7mr229266oig.1.1548953353097; Thu, 31 Jan 2019 08:49:13 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:803:: with SMTP id 3ls88588oii.3.gmail; Thu, 31 Jan 2019 08:49:12 -0800 (PST) X-Received: by 2002:aca:d607:: with SMTP id n7mr229265oig.1.1548953352051; Thu, 31 Jan 2019 08:49:12 -0800 (PST) In-Reply-To: X-Original-Sender: thekenshow-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.org gmane.text.pandoc:21997 Archived-At: ------=_Part_3224_1315781853.1548953351483 Content-Type: multipart/alternative; boundary="----=_Part_3225_1662571900.1548953351484" ------=_Part_3225_1662571900.1548953351484 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 --extract= - 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 Bootstrap= =20 > and=20 > >>> Spectre uses to apply their s= tyling.=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, send= =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 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/ae8d390d-1006-4c90-96ed-3f921f7a0dfa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_3225_1662571900.1548953351484 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Right, understood. I agree that the "table"= class enables a distinction between layout tables and real ones. My case i= s DOCX -> HTML, however, something like:

pandoc = -s sourcetest.docx --reference-doc=3Dcustom-referenc= e.<= span style=3D"color: #000;" class=3D"styled-by-prettify">docx --extract-media=3D./ --css= =3Dcss/spectre.css -t html -o sourcetest.html

If the HTML writer wer= e to add the "table" class universally, then tables used for layo= ut in the source DOCX would end up with borders (assuming Bootstrap = et al).

On Thursday, 31 January 2019 10:09:36 UTC-5= , John MacFarlane wrote:

To be more precise: =C2=A0The suggestion above was just to
add the 'table' class to the default HTML output, not
to docx output.

I believe the reason bootstrap et al only style tables
with class 'table' is to distinguish "real" tables
from tables used for layout (e.g. columns) in HTML.
However, it seems to me that all pandoc-produced
tables should be real tables. There may be exceptions,
though -- do people use pandoc tables for layout in
HTML?

John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:

> Adding a 'table' class wouldn't affect docx output
> unless we specifically modified the docx writer to behave
> differently in that case.
>
> Ken Dow <theke...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
>> It's not uncommon for people to use unbordered tables for = layout in DOCX.=20
>> Adding a "table" class automatically would produce H= TML borders where they=20
>> weren't intended.
>>
>> In your first response to this, you suggested "insert it = into a Div with=20
>> attributes". Is there some way to achieve that with a DOC= X source?
>>
>> On Thursday, 31 January 2019 00:11:10 UTC-5, John MacFarlane w= rote:
>>>
>>> Ken <theke...-97jfqw80gc5Wk0Htik3J/w@public.gmane.org <javascript:>&g= t; writes:=20
>>>
>>> > That would be great - it comes up because frameworks = like Bootstrap and=20
>>> Spectre uses <table class=3D=E2=80=9Ctable=E2=80=9D>= to apply their styling.=20
>>>
>>> That's true. =C2=A0It's tempting to just add that = class by=20
>>> default in the HTML writer... =C2=A0I wonder if that would= =20
>>> cause any problems?=20
>>>
>>>
>>
>> --=20
>> You received this message because you are subscribed to the Go= ogle Groups "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from = it, send an email to pandoc-discus...@googlegroups.com.
>> To post to this group, send email to pandoc-...@googlegroups.c= om.
>> To view this discussion on the web visit https://gro= ups.google.com/d/msgid/pandoc-discuss/fdd9a7c1-f66f-4116-bbff-2ee= 91842c4a8%40googlegroups.com.
>> For more options, visit https://group= s.google.com/d/optout.

--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/ae8d390d-1006-4c90-96ed-3f921f7a0dfa%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_3225_1662571900.1548953351484-- ------=_Part_3224_1315781853.1548953351483--