From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30645 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tizio Caio Newsgroups: gmane.text.pandoc Subject: HTML to DOCX, how to align a table Date: Tue, 31 May 2022 05:41:37 -0700 (PDT) Message-ID: <0e3f30ba-908a-4050-9563-c32406d17b0en@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_5052_1949876142.1654000897876" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12817"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDY5T4M564GRBAU23CKAMGQE5NUKYMA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue May 31 14:41:42 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f63.google.com ([209.85.160.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nw1Bt-0003Ez-UN for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 31 May 2022 14:41:41 +0200 Original-Received: by mail-oa1-f63.google.com with SMTP id 586e51a60fabf-f2af089a48sf9340179fac.19 for ; Tue, 31 May 2022 05:41:41 -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=fSPGBI/tdPHkEHVHtIszSv2CGXiIBYIMNQB/2gbdrVM=; b=i5mzKePfZ8nIcUDDMnSVT4VyaVEVBpm6CYm4NvIh0IpvmVrMNSvJZNkSoJ29XMmRL4 pO8otJEEownEvl69xpwsx+TSGfA3V+fZdSAuxPLq7bY/TQwWkP0BC6ruI4bswrggzchk Fovb07zF3sB0jN5hKIWAWoEXKy2R0jsrFMKt372EviTTkKbXp5uuJLB0UCeLiQFvwoQ2 nxNeYYiMCLHsX4koQ9MauLjmXuK2U/Wph5UZXovRmqIIHJrpqO6quMfwyqTi3iaKiyRk hBYrqCLTt3CfVCkg+97gTSljJwyfLp91aAU4+J8Kty/AT/lEnNmdPnYS1px+Wprum/Mp 3Lzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.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=fSPGBI/tdPHkEHVHtIszSv2CGXiIBYIMNQB/2gbdrVM=; b=Hnlic51y75m+MbS2tqGlhJVxE2I51jQHOHHNdC49MRObJsm3coVZwgvGNHzqVTWwsr cHQpQunCTQ3ERLQpOIK2IuG7ak0gRaH3SDQh+GAPpp0BRPcSUNcjLcVDtQU3sH0IXtL9 JzzqMqleYylHs4UhECN3pdPONKS8s9QPwNSdA4HBojSYIs1o9oM/NiNTQD1naxeLJU88 siOgF/qUEF+D2TinV84EystGtUjIegRF5rnxYHJlqsdDaHPevI609iv/7PmfEJQc2u+6 hU0O/VHtDuCfH8LqoUyO455bL5ORkEZ69ZD/YUpUFqTKrpmsql9PScDXrxKZ5aZvQycd 34Eg== 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=fSPGBI/tdPHkEHVHtIszSv2CGXiIBYIMNQB/2gbdrVM=; b=nd+BAQjaWL7P/IYD69CMVqFE6p3u1e9R3X9YuJbeMP5iZGEPHZ5DZS8Do9FodquBxe Ydw9HcNP6XBUCBr5evIBgkJDtWwNjBba9D9/nfE5famYDjyySf/Dv5pV2YfeY/Z5jk+Z alV32F8k1zrnPTDVo5pZjfOcPscW0relAvDPvWR0SegGiDkuZAsWwKeFNfHFcW88gGed ArwiII3jVgknPrNDr4xldLt0nUJdiqZbqv+hKGU+e9d49Xekqh/jbSqX1rRN4zqpheBu wOYN2a74jIEhaGs+NBxwDoVh6wK92htbqkxeB8P+HlTmNn3Luw7lZVpsYGVRc8Q6rsWd frWw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5331C8yECevNK6EZB0LJvWeS/H5p6mQfG/1pzg0KbQpd//kX4CTF Hpi3Vu37tgyiUBK7DOQjyk8= X-Google-Smtp-Source: ABdhPJyDLH8aE64pIWHYN90uy/h0+kcOO+vAct0MFLXuSaRuHV0j12lM+cuO9vEAvx3It3RbNuDepA== X-Received: by 2002:a9d:10d:0:b0:60b:4fbb:ccf1 with SMTP id 13-20020a9d010d000000b0060b4fbbccf1mr8157274otu.180.1654000900840; Tue, 31 May 2022 05:41:40 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:1410:b0:32b:a10c:420d with SMTP id w16-20020a056808141000b0032ba10c420dls6543108oiv.6.gmail; Tue, 31 May 2022 05:41:38 -0700 (PDT) X-Received: by 2002:a05:6808:10d4:b0:32b:1230:5cbd with SMTP id s20-20020a05680810d400b0032b12305cbdmr11592538ois.70.1654000898439; Tue, 31 May 2022 05:41:38 -0700 (PDT) X-Original-Sender: paranoid7777777777-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.io gmane.text.pandoc:30645 Archived-At: ------=_Part_5052_1949876142.1654000897876 Content-Type: multipart/alternative; boundary="----=_Part_5053_380809597.1654000897876" ------=_Part_5053_380809597.1654000897876 Content-Type: text/plain; charset="UTF-8" Hi, I've been introduced to Pandoc (2.18) and found all so interesting, my compliments to all! I handle the greatest part of tables in a document with the usual reference.docx reference document, but I have to manage some other tables in the introduction in a dedicated manner. I tried with Lua filter to manage table and columns widths (using a Table function with mixed results, but this is off topic) and table alignment. My table in HTML is:
Project:
 
Document No:
I expect an horizontally centered table in page. After a bit of tryouts, I realized that in src/Text/Pandoc/Writers/Docx/Table.hs:100-117, the creation of node w:tblPr misses a child about indentation. I tried to write a RawBlock as s = '' return pandoc.RawBlock('openxml',s) but I don't know how to inject. I hope you may help me, please consider that I'm a newbie in Lua and never worked with Haskell. -- 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/0e3f30ba-908a-4050-9563-c32406d17b0en%40googlegroups.com. ------=_Part_5053_380809597.1654000897876 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, I've been introduced to Pandoc (2.18) and found all so interesting= , my compliments to all!
I handle the greatest part of tables in = a document with the usual reference.docx
reference document,= but I have to manage some other tables in the introduction in a dedicated = manner.

I tried with Lua filter to manage table an= d columns widths (using a Table function with mixed results, but this is of= f topic) and table alignment. My table in HTML is:

<table style=3D"width: 61.43%= ; margin: auto">
    <thead>
      =   <tr>
            <th>                <b>Project:= </b>
            </th>
&nbs= p;       </tr>
    </thead>
&nbs= p;   <tbody>
        <tr>
 =           <td>
      &nbs= p;         &nbsp;
        &n= bsp;   </td>
        </tr>
 = ;       <tr>
          &nb= sp; <td>
                &= lt;b>
                  =   Document No: <br />
          &nbs= p;     </b>
            &l= t;/td>
        </tr>
    </= tbody>
</table>

I expect an hor= izontally centered table in page. After a bit of tryouts, I realized that i= n src/Text/Pandoc/Writers/Docx/Table.hs:100-117, the creation of node w:tbl= Pr misses a child about indentation.

I tried to wr= ite a RawBlock as

  s =3D '<w:tblInd w:w=3D"' ..
      string.format('%s', t= ostring(left_margin_pt) ) ..
      '" w:type=3D"dxa"/>'
  return = pandoc.RawBlock('openxml',s)

but I don't kn= ow how to inject.
I hope you may help me, please consider th= at I'm a newbie in Lua and never worked with Haskell.


--
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/0e3f30ba-908a-4050-9563-c32406d17b0en%40googlegroups.= com.
------=_Part_5053_380809597.1654000897876-- ------=_Part_5052_1949876142.1654000897876--