From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30746 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Feature Idea: docx -> HTML table styling Date: Thu, 16 Jun 2022 11:21:52 -0600 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6699"; mail-complaints-to="usenet@ciao.gmane.io" To: Noah Malmed , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBNONVWKQMGQEKUISHJI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jun 16 19:22:00 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-yb1-f191.google.com ([209.85.219.191]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o1tBw-0001Vh-5w for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 16 Jun 2022 19:22:00 +0200 Original-Received: by mail-yb1-f191.google.com with SMTP id j2-20020a2597c2000000b0064b3e54191asf1579811ybo.20 for ; Thu, 16 Jun 2022 10:22:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655400119; cv=pass; d=google.com; s=arc-20160816; b=LLO5pE2K0FgU/OAQs7SW9VT/wO9LYWz+ZHamPaxWycsHIogkP6ciRfPiN6hQnaSxLR JWrFoX1WRVWy0lvGtPn+IZyQK7ICxqb2D2wUuWTEJoOb6txpxxRoy9ZSSjT/RMWUTuz4 1dKf3LwuvQjBxzCAupV1UbP+59vwh/ZTYG7nxxQTCVXv4gH+/kOVHfVmyCQK4aANosu7 C7SN9EWQIXb9QklecblExQpWdVMmPy+1Qxsb0c/IyBbpKmmW7/7y9FTPICoNrFa9b8fa T1fN+rMhfsNAoUVkfvofxEKBBGA67KBARMcDuSaougyOxDFriIZwjZwYtwXqnXsaRbOF eaHw== 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:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=PqsF4e1VCn4kR1+KJivP6dDG/NSHO3WMWtX9AS8X0GY=; b=UDtNWHYXBIVUWQ0jFK9vD+mCZkRtg++h3OX6n7auYHLzMV0C3S6AH/Krg3i0NFgjUH VyvQsqyWfAg3QVMWvVVdaZICRluV4sxVVMpLL4w3hslskZpvuMRwEQoajBz9I7C0Wchy cFgoqVWJd3GpafJdUn23JT2NJIi2+U2rrkAuxwpEJ8H3ZsPw0qd9FeiAkbT2gSR68jcV 5eq17BMen+U38M4ynGxr3S9cQm6+f4aU2DZmDyhRqBugpWCFI8qz4Z1SJTOiCSTIkGY9 jbfIICBHqsdyGynFRGbjMUavL9LiuqXbkeq4uhb/+RpNvGFScQsjiIDtQ0W3GuYvH/HJ VNlw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley.edu header.s=google header.b=jBKPILHl; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=berkeley.edu 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: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=PqsF4e1VCn4kR1+KJivP6dDG/NSHO3WMWtX9AS8X0GY=; b=LRxa52NirDrJW5CakJuQjUzjKwKZc++6bx1ZcTueVdCYamZYBFnwOLiO2PDQo4a2sA ajt7etzFB2c8N2LPik2PcPMykMYxUHQPlkDaa+F0G84U+TVmSM1Q2uKmKLSBkb7Lw2ue xUHTvjV7lP53lvEe5fSS9X2M+sAkmSfzi6Ey0HqHv9d85XWxe7YKRShzGbMS/XO6zJJL KHIF3TDv2W6miK4yghIIe0+Jrvy4MXU0boVUW60EQwEJ6rGWMvDmNICJ0mFwzIsoaYKr eh0OBtNKwF/K16oyBvYVQT3L4WBZJ8ay1FimFthEvarwLxGCWn92VSzpIWbC+COdXpeI zYfQ== 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: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=PqsF4e1VCn4kR1+KJivP6dDG/NSHO3WMWtX9AS8X0GY=; b=u9Lar6Fg7WidWNL+xIp9T+WJ/+6KzdysgmUchRww4exU9TsjaycwZduDT88YJGoxxp KepRsr8EpNsFc0vXgbMfxhVSQKlhtGmENr/1p+F+wXr3yzkIe6GT1TSPVwxcUvL2q0h1 l18E0fYaslH0xMSsMrQ/oXXkY17uDL0iQfNTNXmf+VeOzM2IHPYOF+ipK/1Ni/yZzYlo aqqI51Qkff2LPcy62KQnM+4HSOY+Rjh7UWDmON/wbMHoh1Xv3rTRTAgpalJg8FTeRXx4 zNl1SEFINWfYLUFzKF2cieYA5B5ufoMOKNY7P4wcsjeL5xKn5fXfG15YRDX57HF2BBmG Xo7A== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora80KVreDRxnkg3wjoBRyVJXKdVeprE6X1ddOHt15Uu6yVd07iIM FwR9ah5dc9gwAtkJzAUUhis= X-Google-Smtp-Source: AGRyM1t28OZqweqfQn5LJk8rL0vppme12biWaN/XDnPUfjKpXibqgt7IeJ95JpDQZ4/a4U7v3KHstA== X-Received: by 2002:a81:164d:0:b0:317:6f66:3e05 with SMTP id 74-20020a81164d000000b003176f663e05mr4212672yww.310.1655400119266; Thu, 16 Jun 2022 10:21:59 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6902:1207:b0:664:fd9e:efce with SMTP id s7-20020a056902120700b00664fd9eefcels1556435ybu.4.gmail; Thu, 16 Jun 2022 10:21:56 -0700 (PDT) X-Received: by 2002:a05:6902:1407:b0:64a:ecc7:aa2 with SMTP id z7-20020a056902140700b0064aecc70aa2mr6496921ybu.645.1655400116596; Thu, 16 Jun 2022 10:21:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655400116; cv=none; d=google.com; s=arc-20160816; b=Nj3z52GsTgAJTPLyREO30kVJB3Q8jQKpSNrYZsWxSNAP9ihkw8XGPzQlsdc0L49jPR D5S7/koDfgzRhKqSYUvPoW3MrEUgzXBPgyifoE7KVh6XYGnq6K18Tow+uY2rkpgwU1Wg x1ku5VqRo3L2R7lFMFSjEa8yTXLG3UCd8ZhUBiM78/AmkHWDzhmNRxQI31/ouFmEkIwA gV+Pypu7Gy82XbQ3x/tDdRvqwThNkblBrtmDJ02O3IRsxtrFQK+J4xrOVTpUsK9IVszh kb3J3vKeJO16u+9C6fopBqXePUTtpq1qmvsqXnehU6dhh6FIGq18zdnYkgVu5Ndefb1m wLOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=sIMsixebSscmqwWIim3d7WSORWdarKQM1onBbwkedjU=; b=T1AvCx5O6WMDpmHbuUz+qmB+1HgxIFol7t2aJO/w5/jO0DcOZqwVxhNTVIqLb+9jzI b+hBk66doK9PIHwd1aiVyI19Ii0O01KFRq4nTdBzdgMoC6sGFwGphAt0v5dJvtu2FQav aAu7rUS4lo3dEhiFbCwoMJSyNOStiCHdeW6+6dNBDj8iPW56liTzEqgrTpbBtATYRekq kYIY01/NehaGstQfMfn5s8wn2r+6Z4IxqcqjAPBX45TSTlK8afwOXMPrvKJyQXhk6Vrz P6xzRssKtDA/u02haO44WgHAITPVwKpeaTHCNjTrxWyfW+XSeWaz0pHYgWLUIj4zFEM+ 0wbw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley.edu header.s=google header.b=jBKPILHl; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=berkeley.edu Original-Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com. [2607:f8b0:4864:20::62e]) by gmr-mx.google.com with ESMTPS id 191-20020a8109c8000000b00313fd6c4a73si124005ywj.4.2022.06.16.10.21.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Jun 2022 10:21:56 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) client-ip=2607:f8b0:4864:20::62e; Original-Received: by mail-pl1-x62e.google.com with SMTP id f8so1778484plo.9 for ; Thu, 16 Jun 2022 10:21:56 -0700 (PDT) X-Received: by 2002:a17:903:41cc:b0:166:3ce2:9bdd with SMTP id u12-20020a17090341cc00b001663ce29bddmr5658721ple.21.1655400115817; Thu, 16 Jun 2022 10:21:55 -0700 (PDT) Original-Received: from hermes.johnmacfarlane.net ([45.32.92.108]) by smtp.gmail.com with ESMTPSA id l4-20020a17090a660400b001e8d377c648sm1837478pjj.11.2022.06.16.10.21.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 10:21:54 -0700 (PDT) Original-Received: by hermes.johnmacfarlane.net (sSMTP sendmail emulation); Thu, 16 Jun 2022 10:21:52 -0700 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 header.s=google header.b=jBKPILHl; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=berkeley.edu 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:30746 Archived-At: Noah Malmed writes: > Hi John, > > Thanks for responding! I have a few clarifying questions mainly around > Attr, because I don't quite understand what values are stored. > > When you say adding `vertical-align` to attributes should be okay, how do > you mean? Would it be more appropriate to store it in the XML format that > docx uses to denote vertical alignment? I would say not. We'd prefer something generic that could be interpreted by various writers, not something docx-specific. > As well, I think I was a little thrown off by some of the black box testing > we did on the HTML reader. When we ran `pandoc -f html -t native` on the Yes, it's true that the HTML reader will store style attributes (and any other attributes) on table cells. These won't really have much meaning outside of an HTML context. But it makes more sense for the HTML reader to behave this way than, e.g., for the docx reader to add HTML-specific attributes. I don't know what the best solution is. Pandoc is really designed to preserve the features of documents that are encoded in its types. Anything else -- including the use of "stringly typed" attributes -- is a bit of a hack, and tends to lead to unmaintainable messes down the road. We could try to establish some generic conventions for representing things like vertical-alignment in the attributes, e.g. with a "vertical-align" attribute that gets interpreted by different writers, but as I said, once we depart from the structured types things get to be a bit of a mess.