From: Larry Hynes <larry-kWvUfStYLBx0ubjbjo6WXg@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Align tables to left, as opposed to centered, using markdown to pdf via xelatex
Date: Thu, 8 Jan 2015 19:46:26 +0000 (UTC) [thread overview]
Message-ID: <m8mmqh$ppo$1@ger.gmane.org> (raw)
In-Reply-To: <CAE4-1rWuKgOaoSfsupmKpA++keahDkMS_xEZPCRvXzFNrpQk6w@mail.gmail.com>
Thanks Mark - you got me thinking!
Instead of a filter I can use:
pandoc -f markdown -t latex f.md | sed 's/\[c\]/\[l\]/g' | ...
So, a filter of sorts. :)
It's crude, but working. Maybe a bit of tightening up on the regex and I
would be quite happy to use this when necessary.
On 2015-01-08, Mark Szepieniec <mszepien-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> --001a11c1f8b009e41e050c25b169
> Content-Type: text/plain; charset=UTF-8
>
> I don't think there's a straightforward way to do that.
>
> You _could_ write a filter which catches tables, and uses a slightly
> modified version of pandoc's latex table writer function to make it output
> \begin{longtable}[l].....
>
> On Thu, Jan 8, 2015 at 3:08 PM, Larry Hynes <larry-kWvUfStYLBx0ubjbjo6WXg@public.gmane.org> wrote:
>
>> Currently the only way that I've found to do this is to first
>> get Pandoc to output .tex from the markdown source, then change
>> the [c] in
>>
>> \begin{longtable}[c]{@{}llr@{}}
>>
>> to an [l], copy and paste that table into the original markdown
>> document and then convert to .pdf using the -R flag.
>>
>> I've tried everything I can think of in my xelatex template to
>> get the table to align left but Pandoc seems to override all and
>> stick doggedly to [c].
>>
>> Can anyone offer any suggestions please, as to how I might be
>> able to convert directly from markdown to pdf, via xelatex, and
>> have tables align to the left?
next prev parent reply other threads:[~2015-01-08 19:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 14:08 Larry Hynes
2015-01-08 15:28 ` Mark Szepieniec
2015-01-08 19:46 ` Larry Hynes [this message]
[not found] ` <CAE4-1rWuKgOaoSfsupmKpA++keahDkMS_xEZPCRvXzFNrpQk6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-17 15:12 ` Eugéne Roux
2015-01-17 15:21 ` Larry Hynes
[not found] ` <m8bqob-8p1.ln1-hFr9yDdQiE6PX3baIHBI6tBPR1lH4CV8@public.gmane.org>
2015-12-02 19:14 ` Gang Liang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='m8mmqh$ppo$1@ger.gmane.org' \
--to=larry-kwvufstylbx0ubjbjo6wxg@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).