From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31061 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Nested tables: HTML writer bug? Date: Fri, 22 Jul 2022 13:16:07 +0200 Message-ID: <8576E560-B7B5-49B5-9DDC-87EF9AC48F81@gmail.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) 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="3464"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBB6UN5KLAMGQE7BTX6JY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jul 22 13:16:14 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f55.google.com ([209.85.221.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oEqdi-0000gF-CF for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 22 Jul 2022 13:16:14 +0200 Original-Received: by mail-wr1-f55.google.com with SMTP id e14-20020adfa74e000000b0021e18a1c29fsf796267wrd.22 for ; Fri, 22 Jul 2022 04:16:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658488574; cv=pass; d=google.com; s=arc-20160816; b=U8tKf31mmVNYjGybIaLDFbjlWBp+AL5i1UQhmwwRq/kTtELfRyOGLvQjVbRow/vImm JOLf5sWqoTDV+BVj6sPbf0ZgccDWM3EKse6pFmc4CQTyndXDelHGyRRc/awHVKe2kSXb 80gv8L5cIe/JT/2hoJrZH2hiwpZ1aC5DnODnW9cJ8U2Luwrfu88Y/y8EHdZosP/qevtd dO/tiectht2ajBLnVdee8ku7rFI5yYrNa/S3D/MGN+ZC513Gz3K+sSVoCb6O6tzaTswm Ooj62Ulf+bGUfbZUkfZyl9seytSV2MZrZAsYoGAW9stEeOmA5KeOX497I3+5gHSeEob9 mFOQ== 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:message-id:in-reply-to:to :references:date:subject:mime-version:content-transfer-encoding:from :sender:dkim-signature:dkim-signature; bh=3599W9VNajlfZU5UFefKz8PTdfur6YkNiPjeBblIZSY=; b=v5oALER9ct1u7vwO65VIgydhzn9+7RtEXEoQeboqamf+wci6y71YdlCIjk/YZ7DLfU GQYNmLIJ34f8NLnUuNogRndJq+/zI4CvlA5efZZAPlokXRR+UI1I4DPVmIyPtDESKLeg bVNeFtlNzaDD60MATN3J44U+cREG1M3cMnFer0mVcpdLz0tMa32xDNMeKBfvE0d1g+DR G9CU9MIGhtsJCq4V7J1XW5BQb+CxQ8chmKhchefeY4QnI4Ho7owhxNIB5adBp9e5s5AG B+lWyjsWXJfuxk+Q7Kuz30pcGfkq3hF63fI5Sf/HVOS1U5o0hpcxt4fxYM8QnectYUT5 KpuA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=b5rKTCtN; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::32c as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:content-transfer-encoding:mime-version:subject:date :references:to:in-reply-to:message-id: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=3599W9VNajlfZU5UFefKz8PTdfur6YkNiPjeBblIZSY=; b=bsRB1szZZ/NTi4XOTqbmSTFWteC1CSR+XAhvK/dRqmaC47ZybIImfIXnICKrQa9SFE BiNffWMXi3/j1YryCcLm/5r1l7FbdMpPTlq/uibitC5NT42cxLr+Cwv5NHpexzKTO9Ji 9TVv3DXW0CR00dzf+ondBWV7dLjUNKy+ZBB9FDRe6FSBLxNlk02T1IFCmoTOjH8QjVZQ CMX7NACMRjXzO6bkEPgl2ki73hQP8XPfZyEPin8JvJnOfufSf3Xes3u8OR85HsnDI1S7 jBHrRRO1AU2JBetHDbBr63jnquoCe683XmhI/6OfD9ODxb/Hfl61XC8WaeVSMUszIzfs jJWg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id: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=3599W9VNajlfZU5UFefKz8PTdfur6YkNiPjeBblIZSY=; b=AiWK8xdolqAZzXAfPsoyJMXNeHTOnqv4YnXA0kOWZdouSv7QD8iM2jIzg4K1oiXC/g E5pX9e50BAPKfHh59ASn2KnRg0wR2ZWT/y43yCfvqFf9CprTA060MhK2yhT4ivIker0D zRzSG6LMYZHMMHVOW1oRS2vabOz75iTiJTqCqphKrCbhHHj7fW/0fyrXOmcXrBU1gSjt MLOKH+dE6M3gfRg4Mt2dOIYuTt2UrKKT1SrobrHGLZDr39avq6IvF0mqipwkZF1tlcAU QoezYjp0Ur9HYMmCuhN3tnyldNLpGq/Wni3rxUk7bXPx3LVmuRmlWmRdSacKBDISUuoi y9kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:content-transfer-encoding :mime-version:subject:date:references:to:in-reply-to:message-id :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=3599W9VNajlfZU5UFefKz8PTdfur6YkNiPjeBblIZSY=; b=Ss9k6H1E7wEHqR70SEhV0bq71KRvlYeAsKSrEb7Gs1M2Ji69rbdzxMc9P5ISwwCZAR gGrCiunKxLyLaC0EKq9OhOSDHhO1STxXfXJXcDdY96wftwI4OkJgaZbKWsLq7fXV+mAk rxBI+Og7w1mMD1K5/aYJypO5v4S3+THw7k9jC5Or94IJ9n/AH8o1gdOlITVezdJxzANa 20ILPtcSYAdtPoldkj6bff2VhuwLDLnCu+TVsln24F2sr5AMpHUAcW4VRVsdKFACkHtT cDHOQYJQtgL7Nl7gel3gMDXD+a+5dgOVtyZlNQ0w18QrCTPiuIJDcx7UYJRmx/uiTgWk Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora/0d4bgrTcijDTf9YnxAdvDkHhxGHWncXYxqJuAObXRwRVZtbYF W05Yq0heq3Kqa80jgEp2C1E= X-Google-Smtp-Source: AGRyM1u72GGcHm/LWshX4A0y0AA9laYTHop4h1Hj5k1/JoPJ6F7Ga+uPbY1y6wHM094q1cNo7bz5oA== X-Received: by 2002:a7b:c84c:0:b0:3a3:1fd6:613f with SMTP id c12-20020a7bc84c000000b003a31fd6613fmr33056wml.55.1658488573767; Fri, 22 Jul 2022 04:16:13 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:adf:d209:0:b0:21e:53a1:af5d with SMTP id j9-20020adfd209000000b0021e53a1af5dls2598089wrh.3.-pod-prod-gmail; Fri, 22 Jul 2022 04:16:09 -0700 (PDT) X-Received: by 2002:adf:db51:0:b0:21e:41c2:c2e8 with SMTP id f17-20020adfdb51000000b0021e41c2c2e8mr2236911wrj.452.1658488569864; Fri, 22 Jul 2022 04:16:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658488569; cv=none; d=google.com; s=arc-20160816; b=P3oPj5Zl0tyE9zR6/bVnaW+LvZ8vfThgAo/+/Y70Gl/uOrh/aLOsxZnQQg3JAYWUpm oIaGhHNwJPBuy5Cub/u2AOr3E6eOpzLNCXhW0XhPt5LzwsGQfhnOmxL4/ncIhs5acDsy o7aUO2mI79dltIyKqdHuN82BmVrK9Iis97E+MYya0P3B6LSbJgVvATisIPL4IJeQzSBO 9TSmcI8h7ro2e1O3CLlXT48IgQp9W3RKtCVeisBqC3ldr7ZUA23lSbSWXN46N2XxaCSm OXKP5J8YVCQv686dgRueHSiIoeaY95kjew7n5y9K5pgJ6UcXCV8XvqtYyq/zi0sF4Hn0 bU6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=gyyumZHCDuqfURAWATKW0RoVEWJC32qI/hjsjicwwqs=; b=WvJIOJew99kbryoKuXHOPf/YP9b4VI+dV+xw1H+1djBkPR+vF1THyDDV5kaN3ZMDpj jtUrWCd0I0GyAwWP1B4/FsauFbC9A9VCULYT2cd+TbrXgGDi9fxaY6qYN+AeDhrQNgRl ZUHNbR1j5pw35jlJHDZYB3fJVSCdg1tl45M/CvmghuSi/0YxWp8YFQXc0AM/mX0c4/qF nnM6NLOyLxEEkEM6gkEB4lN0spZasRs3nPoEPE9g3SRfrbBtI7N4iIkOPha3vu8Du1uo BqpcdueBgkERrOPs/xelWTgBN0vpWUalTTn00H2M0pxeJiNI58dT+qQqFG2tGVqLGY47 aLag== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=b5rKTCtN; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::32c as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com. [2a00:1450:4864:20::32c]) by gmr-mx.google.com with ESMTPS id 20-20020a05600c229400b003a31f71c5c0si198350wmf.2.2022.07.22.04.16.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Jul 2022 04:16:09 -0700 (PDT) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::32c as permitted sender) client-ip=2a00:1450:4864:20::32c; Original-Received: by mail-wm1-x32c.google.com with SMTP id b6so2582199wmq.5 for ; Fri, 22 Jul 2022 04:16:09 -0700 (PDT) X-Received: by 2002:a05:600c:3510:b0:3a3:34e7:cfc8 with SMTP id h16-20020a05600c351000b003a334e7cfc8mr5474447wmq.164.1658488568900; Fri, 22 Jul 2022 04:16:08 -0700 (PDT) Original-Received: from smtpclient.apple ([2a01:e0a:915:89e0:589b:7135:e98d:5ab4]) by smtp.gmail.com with ESMTPSA id t6-20020a5d6906000000b0021e489ec78bsm4332991wru.21.2022.07.22.04.16.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jul 2022 04:16:08 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=b5rKTCtN; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::32c as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE 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.io gmane.text.pandoc:31061 Archived-At: The `width: 44%` comes in because the nested table is 44% of the overall co= lumn width. Browsers then interpret this as 44% of the containing cell, I guess, which = is why you get the odd output. I don't see a good solution here. The problem is that 44% will be interpre= ted relative to line length in other formats (e.g. Markdown, LaTeX), so we = don't want to change the markdown reader so that it assigns this embedded t= able a higher relative width. Nor is it clear how we'd change the HTML wri= ter to interpret this width differently. I suppose we could keep track of = the width of the containing cell and recompute based on that. You can subm= it a bug report if you like. > On Jul 22, 2022, at 1:00 PM, William Lupton = wrote: >=20 > All, >=20 > [Forked from https://groups.google.com/g/pandoc-discuss/c/5O6iYmUwFJ8/m/b= iiwj2njAAAJ] >=20 > In the above thread I presented the grid.md example shown at the bottom o= f this message. I also couldn't resist trying another level of nesting, res= ulting in the grid2.md example shown below. This works, but I'm wondering w= hether there's a bug (in the HTML writer) relating to how nested grid table= widths are calculated: > =E2=80=A2 pandoc -s grid2.md -o grid2.html gives the first image shown b= elow the markdown, in which the nested grid table has a scroll bar > =E2=80=A2 The table and column widths are as shown immediately below and= I'm wondering where the width:44% came from. Removing it gives the second = image below the markdown (no scroll bar) > I'm not seriously suggesting actually using a text editor to create deepl= y nested tables such as these... but given that it works I wanted to unders= tand what was going on with the table width calculation. >=20 > Thanks, > William >=20 > % xmllint -format grid2.html | egrep -e '<(\/?table|col )' > > > > >
> > >
>
> > >=20 > grid2.md >=20 > +------------+-------+-----------------------------------+ > | Fruit | Price | Advantages | > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D+ > | Bananas | $1.34 | - built-in wrapper | > | | | - bright color | > +------------+-------+-----------------------------------+ > | Oranges | $2.10 | - cures scurvy | > | | | - tasty | > +------------+-------+-----------------------------------+ > | Apple (pi) | $3.14 | +------------+------------------+ | > | | | | One | Two | | > | | | +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ | > | | | | my | table | | > | | | +------------+------------------+ | > | | | | is | | Three | Four | | | > | | | | | |-------+------| | | > | | | | | | very | nice | | | > | | | +------------+------------------+ | > +------------+-------+-----------------------------------+ >=20 > >=20 > >=20 > grid.md >=20 > +---------------+---------------+--------------------+ > | Fruit | Price | Advantages | > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D+ > | Bananas | $1.34 | - built-in wrapper | > | | | - bright color | > +---------------+---------------+--------------------+ > | Oranges | $2.10 | - cures scurvy | > | | | - tasty | > +---------------+---------------+--------------------+ > | Apple (pi) | $3.14 | | One | Two | | > | | | |-----+-------| | > | | | | my | table | | > | | | | is | nice | | > +---------------+---------------+--------------------+ >=20 > >=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 view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/CAEe_xxg174vpMGdEwzx-USMNPPodVOC0LqVCx9SEGxpGA7pDiA%40mail= .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/8576E560-B7B5-49B5-9DDC-87EF9AC48F81%40gmail.com.