From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30735 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Noah Malmed Newsgroups: gmane.text.pandoc Subject: Feature Idea: docx -> HTML table styling Date: Wed, 15 Jun 2022 12:13:19 -0700 (PDT) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3536_595845576.1655320399102" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13330"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCRYTZX7UYBBBUG6VCKQMGQE2FAAKAA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jun 15 21:13:24 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f56.google.com ([209.85.160.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o1YSB-0003KJ-Jn for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 15 Jun 2022 21:13:23 +0200 Original-Received: by mail-oa1-f56.google.com with SMTP id 586e51a60fabf-1012777dde9sf7513845fac.19 for ; Wed, 15 Jun 2022 12:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=F7mupUY4S+k4ANWG9Y5099UOBXFWeIEvRACEVPNAT24=; b=Va7CKN3QzGTCSvEqSWdJKccaOgpPzlLBkIluy3luhOBVQVpZqmT+Zi6wwfAEQ0GcRt 669IROPrpPGs1f2ABQvPwpEOEcvj7sz37MfGKyo/ZJz6AReth6pRNFsmX9bTiCPPzlvp S8WQbtkFnEtdb5xS/e6MSrq2WDbaZ6F6/vFtO20H9ZChTD+Mp5+u+cvICYdvPTms+BBw tlyL8BbY/0u5J+VKT/m7gW1QyA+hV7HPS5h7LWxCZC73inu3yG5ko6rGgGsR2riDCvD+ YMfFlOjfouRT0wsIydlbxFNEu8EcptR09G+DLDojANnp+w0FapQne3FFap8PP6SuOy3D Y3xQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scholasticahq-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=F7mupUY4S+k4ANWG9Y5099UOBXFWeIEvRACEVPNAT24=; b=uUR9EjOBUSWypCHgr0JqnV77inYoWrxPeL+vTcs+3s7jftVwCYqSSfeQIIWD76Grzz H+Q+Gv/H5SXuwbSi4mxpSQHRG9/J6cMYp4OCHMzGMFwR5ftMfNXkJlp0AU38ANiW0hZX 8B4FxNgtjUyGK5WfGj2myuOb+hATIZ/wwdCLYCpiRmwI8mdhfL+gj9yNXbkTQmlN3HYG AMt0z2/G1WpmXBStHZtKtrOg3ENvhsyLwAHHDoJAvbAqq1XdDPI/KybUHaRC40BNNV82 oLIBEVQhgNS2bH7PQ4VylluAfsaCJfUr4f2hq78cNalQVNee0ue7dD5jGeJz9Ktnuyo7 jKMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id: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=F7mupUY4S+k4ANWG9Y5099UOBXFWeIEvRACEVPNAT24=; b=RI80hx23D2XFt+ERPjIfOX2UXW6DT9ZCmYIpywWdKKdJ++1QsyGQdZJth67USz8fTd zeg15VuRD3KZ9EtmSortF0hF6HNvY7mRXV24rW13nJMLZcd7IrIgPIaf0Lkt/s8NzWsC Mq2Irbmp+r/P9KO8tj4Bs3Dp8mxohoyh5qJt1vd0a6wGXFLyhDFxl5DkR7VRPtZUk4UU j5uKk9JmQmIb7Cm/HGRNlzuI1WjLv3mbFtAXSPy55C6S+OZnywG/8XkRXAqL1GNE4TJg /c/gsCG//pvWpbxkVL8oFnmdQHon4GW812heyX5k4VHtdUvS+vtqOQBFQgMfU1YOlsDT uqKA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora+Svn1g/MQ0Jlkc4dRwabx5PNvG51zbKkfIgrxo2t8O5tKjmuMu 34BC0vLUA8d+ekpg8OLEiTE= X-Google-Smtp-Source: AGRyM1vY1l6+6F38UZtgEQ6tWPtQWYpHN3Spg/rlSioSi9UEyVGcX2eMpx/nn4q66nCvZTUO2aXeHA== X-Received: by 2002:a05:6808:f92:b0:32f:6e27:6cc7 with SMTP id o18-20020a0568080f9200b0032f6e276cc7mr658668oiw.36.1655320402574; Wed, 15 Jun 2022 12:13:22 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:6142:0:b0:60b:3878:5283 with SMTP id c2-20020a9d6142000000b0060b38785283ls132317otk.0.gmail; Wed, 15 Jun 2022 12:13:20 -0700 (PDT) X-Received: by 2002:a9d:1b6d:0:b0:60b:db3a:35f6 with SMTP id l100-20020a9d1b6d000000b0060bdb3a35f6mr630886otl.8.1655320399846; Wed, 15 Jun 2022 12:13:19 -0700 (PDT) X-Original-Sender: nmalmed-O2gogPphfo5dNrB6XyqITwC/G2K4zDHf@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.io gmane.text.pandoc:30735 Archived-At: ------=_Part_3536_595845576.1655320399102 Content-Type: multipart/alternative; boundary="----=_Part_3537_50600274.1655320399102" ------=_Part_3537_50600274.1655320399102 Content-Type: text/plain; charset="UTF-8" Hello! We use Pandoc often to convert from docx to HTML, and many of the documents we convert include tables. As far as we can tell, almost all of the table styling is lost in the docx reader. Specifically, we care about 5 things: 1. Text justification (left, center, or right) 2. Vertical alignment (top, middle, or bottom) 3. Text indentation 4. Cell shading and text color 5. Table borders We hope to enhance the docx reader so that these stylings get preserved in the AST. Proposed solutions: 1. It seems like text justification already exists in the AST through the Alignment value. It just needs to get implemented in the docx reader, as described in this issue: https://github.com/jgm/pandoc/issues/6316 2. Add the vertical alignment style to attributes as suggested here 3. Add text indentation to attributes in the form of the style padding-left 4. Add cell shading and text color to attributes in the form of the styles background-color and color 5. Add table borders to attributes in the form of the style border Does this sound like a sane and feasible solution? We're pretty motivated and willing to work on these changes, just want to know if they would be the best route! Thanks! Noah -- 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/msgid/pandoc-discuss/cf7005a8-0447-4667-acb2-c1eccbaacaden%40googlegroups.com. ------=_Part_3537_50600274.1655320399102 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hello!

 We use Pandoc often to conver= t from docx to HTML, and many of the documents we convert include tables. A= s far as we can tell, almost all of the table styling is lost in the docx r= eader. Specifically, we care about 5 things:

1. Text just= ification (left, center, or right)

2. Vertical alignment = (top, middle, or bottom)

3. Text indentation

4. Cell shading and text color

5. Table borders&nbs= p;

We hope to enhance the docx reader so that these styli= ngs get preserved in the AST.

Proposed solutions:

1. It seems like text j= ustification  already exists in the AST through the Alignment value. I= t just needs to get implemented in the docx reader, as described in this is= sue: https://github.c= om/jgm/pandoc/issues/6316

2. Add the vertical alignme= nt style to attributes as suggested here

3. Add tex= t indentation to attributes in the form of the style padding-left

4. Add cell shading and text color to attributes in the form of th= e styles background-color and color

5. Add table borders = to attributes in the form of the style border

 

<= p dir=3D"ltr">Does this sound like a sane and feasible solution? We're pret= ty motivated and willing to work on these changes, just want to know if the= y would be the best route!

Thanks! 

Noah


--
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 view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/cf7005a8-0447-4667-acb2-c1eccbaacaden%40googlegroups.= com.
------=_Part_3537_50600274.1655320399102-- ------=_Part_3536_595845576.1655320399102--