From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/11701 Path: news.gmane.org!not-for-mail From: Mark Szepieniec Newsgroups: gmane.text.pandoc Subject: Re: Table cell horizontal alignment (docx) Date: Thu, 8 Jan 2015 15:31:34 +0100 Message-ID: References: <8ce26c52-2502-4c4a-bcc5-9de9d0f62928@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113417cca3bf4a050c24e55c X-Trace: ger.gmane.org 1420727880 9087 80.91.229.3 (8 Jan 2015 14:38:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2015 14:38:00 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBC5LDAET5YPBBR5JXKSQKGQEIZZNO6A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jan 08 15:37:56 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-vc0-f190.google.com ([209.85.220.190]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y9E7b-00018x-Ux for gtp-pandoc-discuss@m.gmane.org; Thu, 08 Jan 2015 15:31:36 +0100 Original-Received: by mail-vc0-f190.google.com with SMTP id hy4sf541928vcb.7 for ; Thu, 08 Jan 2015 06:31:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe; bh=ElDwF1pBxe0cw5Vgeecxpr0DDGMbCysY0c4YnjXLWjw=; b=BgE7kMHYgN8LQdZDFcG0GcdRwQXWxzTrSGU5mv+zcEEpgFKivYItAqRQ2xFsaQD4tP 9+KduJRVKPLpMvSEvqZKK7iICxiLWUKOUbHrnmVeosyI/vsD7wkwo9ZJEvOe2+y7tnNG tZzUhJyrZVwzEwtK2N5v1g4GilP3ok8+eJAYRSbdX43U9mAK4CESIVwNiAEGZkPBPTu4 L0jCdMARV+ImNyuh0NEHzq/5GLa+e6u+3fGRSBdMZf0r8iX/cmM1N93iY7HXKP0yemrt f7vyAPVWpP7Ca5ZALwMLrDlX88KKmZIpcVtDnLuDyIhJ2+S/SlQixXMfmjoLFYgmYy7y Q4zQ== X-Received: by 10.140.97.200 with SMTP id m66mr1773qge.42.1420727495345; Thu, 08 Jan 2015 06:31:35 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.140.29.228 with SMTP id b91ls1132367qgb.1.gmail; Thu, 08 Jan 2015 06:31:34 -0800 (PST) X-Received: by 10.236.189.198 with SMTP id c46mr6739009yhn.12.1420727494757; Thu, 08 Jan 2015 06:31:34 -0800 (PST) Original-Received: from mail-qa0-x22b.google.com (mail-qa0-x22b.google.com. [2607:f8b0:400d:c00::22b]) by gmr-mx.google.com with ESMTPS id v10si668776qcd.1.2015.01.08.06.31.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Jan 2015 06:31:34 -0800 (PST) Received-SPF: pass (google.com: domain of mszepien-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:400d:c00::22b as permitted sender) client-ip=2607:f8b0:400d:c00::22b; Original-Received: by mail-qa0-x22b.google.com with SMTP id v10so2412230qac.2 for ; Thu, 08 Jan 2015 06:31:34 -0800 (PST) X-Received: by 10.229.99.134 with SMTP id u6mr16286462qcn.10.1420727494620; Thu, 08 Jan 2015 06:31:34 -0800 (PST) Original-Received: by 10.229.203.67 with HTTP; Thu, 8 Jan 2015 06:31:34 -0800 (PST) In-Reply-To: <8ce26c52-2502-4c4a-bcc5-9de9d0f62928-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: mszepien-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of mszepien-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:400d:c00::22b as permitted sender) smtp.mail=mszepien-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dkim=pass header.i=@gmail.com; dmarc=pass (p=NONE 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.org gmane.text.pandoc:11701 Archived-At: --001a113417cca3bf4a050c24e55c Content-Type: text/plain; charset=UTF-8 The pandoc document model does support alignments in tables, and from a quick look at the source code, the docx writer seems to support alignment. Therefore I'd guess it's an issue with the html reader. Note that in pandoc the alignments are set by column, so I'm not sure if it could ever properly interpret html input in which every cell has an arbitrary alignment. I think your options are to switch to markdown for your input, whose tables pandoc understands properly, or write a filter that changes alignment settings of tables that have been read in from html. On Thu, Jan 8, 2015 at 12:01 PM, Matt Dawson wrote: > I am currently using pandoc to convert *html* to *docx* and unfortunately > the alignment of the html tables is not preserved in the docx output. I > have tried setting the alignment on the td and on the paragraph inside the > td but this alignment does not come through to the output docx file. > > I have tried using: > > > > and > > > > and > >

text here

> > is there anything i am missing or is this just not supported? Any > solutions or help would be very much appreciated. > > Thanks. > > Matt > > -- > 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 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/8ce26c52-2502-4c4a-bcc5-9de9d0f62928%40googlegroups.com > > . > For more options, visit https://groups.google.com/d/optout. > -- 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 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/CAE4-1rXcYCSmPAjr8Nt60B-zOb4zQWFK8jZm9FBVHWRo54bZrA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. --001a113417cca3bf4a050c24e55c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The pandoc document model does support alignments in table= s, and from a quick look at the source code, the docx writer seems to suppo= rt alignment. Therefore I'd guess it's an issue with the html reade= r.

Note that in pandoc the alignments are set by column,= so I'm not sure if it could ever properly interpret html input in whic= h every cell has an arbitrary alignment.

I think y= our options are to switch to markdown for your input, whose tables pandoc u= nderstands properly, or write a filter that changes alignment settings of t= ables that have been read in from html.

On Thu, Jan 8, 2015 at 12:01 PM, Matt Daw= son <matt.dawson84-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I am currently using pandoc to convert html to docx and unfortunately the alignment of the html tables= is not preserved in the docx output. I have tried setting the alignment on= the td and on the paragraph inside the td but this alignment does not come= through to the output docx file.=C2=A0

I have tried usi= ng:

<td style=3D"text-align:center">

and

<td align=3D"center">

=
and

=
<td><p style=3D"text-align:center">text here</p></td>
=

is there anything i am = missing or is this just not supported? Any solutions or help would be very = much appreciated.

Thanks.

Matt

--
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 pandoc-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/8ce26c52-2502-4c4a-bcc5-9de9d0f6= 2928%40googlegroups.com.
For more options, visit https://groups.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/CAE4-1rXcYCSmPAjr8Nt60B-zOb4zQWFK8jZm9FBV= HWRo54bZrA%40mail.gmail.com.
For more options, visit http= s://groups.google.com/d/optout.
--001a113417cca3bf4a050c24e55c--