public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: BP Jonsson <bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Conversion tex to docx - endfloat package?
Date: Thu, 26 Nov 2015 16:30:43 +0100	[thread overview]
Message-ID: <565725A3.1070208@gmail.com> (raw)
In-Reply-To: <7e3777d8-7ceb-4493-83bc-3b972a1cdb76-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

Den 2015-11-26 kl. 13:39, skrev Rainer M Krug:
> Hi
>
> I am using pandoc to convert a tex document to docx for my co-authors
> (which works very nicely!), and they want to have figures and tables at
> the end of the document.
>
> I am using in LaTeX the package endfloat for this. Using pdflatex, this
> works perfectly to generate the pdf, but when I use pandoc to convert
> the tex to a docx, the package "endfloat" is ignored and all floats are
> where they would be without "endfloat".
>
> Is there a way to force all floats (figures and tables) to the end of
> the document in pandoc?
>
> Thanks,
>
> Rainer

You could write a filter which moves them there:
*   traverse the AST looking for figures and tables.
*   append each one found to a global list variable.
*   Remove the found float or replace it with something which 
produces no output, in the place where it used to be.
*   After traversal append the list with the floats at the end of 
the document data list.

/bpj


  parent reply	other threads:[~2015-11-26 15:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 12:39 Rainer M Krug
     [not found] ` <7e3777d8-7ceb-4493-83bc-3b972a1cdb76-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-26 15:30   ` BP Jonsson [this message]
2015-11-26 19:31   ` BP Jonsson
     [not found]     ` <56575DF7.2050202-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-11-27  9:37       ` Rainer M Krug
2015-11-27 14:48   ` Rainer M Krug
2015-11-27 19:42   ` John MacFarlane
     [not found]     ` <20151127194235.GA49129-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
2022-01-09 17:11       ` Christopher Barrington-Leigh

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=565725A3.1070208@gmail.com \
    --to=bpj-j3h7gcxpsitlodktgw+v6w@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).