This BP Jonsson  filter  apparently doesn't work with any recent pandoc.  I am trying to convert latex to odt, moving floats (which aren't rendered well at all) to the end.  Is anyone doing this successfully?

On Friday, 27 November 2015 at 14:42:51 UTC-5 John MacFarlane wrote:
+++ Rainer M Krug [Nov 26 15 04:39 ]:
> 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?

The only way I can think of would be to write a filter that
moves all the tables and figures to the end of the document.
Note: the following is untested, but something like this
should work:

-- floatsToEnd.hs
import Text.Pandoc.JSON
import Text.Pandoc.Walk

main :: IO ()
main = toJSONFilter floatsToEnd

floatsToEnd :: Pandoc -> Pandoc
floatsToEnd (Pandoc meta bs) =
Pandoc meta $ walk (remove isFloat) bs ++ query isFloat bs

isFloat :: Block -> Bool
isFloat (Table{}) = True
isFloat (Para [Image{}]) = True
isFloat _ = False

remove :: (Block -> Bool) -> Block -> Block
remove pred b | pred b = Null
| otherwise = b

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f2028dcb-18b2-40b5-aba3-98c58135c270n%40googlegroups.com.