From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/14010 Path: news.gmane.org!not-for-mail From: Rainer M Krug Newsgroups: gmane.text.pandoc Subject: Re: Conversion tex to docx - endfloat package? Date: Fri, 27 Nov 2015 10:37:11 +0100 Message-ID: References: <7e3777d8-7ceb-4493-83bc-3b972a1cdb76@googlegroups.com> <56575DF7.2050202@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1448617046 11301 80.91.229.3 (27 Nov 2015 09:37:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Nov 2015 09:37:26 +0000 (UTC) Cc: BP Jonsson To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCN27DWIQ4JRBTWI4CZAKGQEDGQGMIA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Nov 27 10:37:16 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-lf0-f55.google.com ([209.85.215.55]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a2FSu-0000pG-9m for gtp-pandoc-discuss@m.gmane.org; Fri, 27 Nov 2015 10:37:16 +0100 Original-Received: by lfs39 with SMTP id 39sf32811029lfs.1 for ; Fri, 27 Nov 2015 01:37:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe; bh=7JgXrxJq8jOINMBbZOxBJRWy17puhMdFuMyjCsAsYBM=; b=M0WwZ19RSfnH0N+91NAiX5oqnWqhvdwu+t2+N+g+qln6Mtr5Wew1u/cpMk1/X8M3yV QOH9yN1foTV5Jyo3U8TTV6QwA+3KL99JLDWo97/kiBqb7nz3TZpPGPlNdoBhUx8bJEdv 8Oq+MOOLitNKiBKJYOcCIel/OVPLXBrwKZi0uRGjOYUjJ9Vdb5fdVFHe+5Ibn1mywr1d M0OVkcHUT4JKdu9blGZgxzZqYvMWPhOC6Xq2NnP2Q6ZT8QZvlbFqyzY13xCIY7uytky8 Ws6Fzin3B2455dKkGoD8TckvUL5r5oLBnW1VTFose9m2aJQdajGwR+GXjfgSE78LzEfo u7bA== X-Received: by 10.28.15.71 with SMTP id 68mr15009wmp.7.1448617039165; Fri, 27 Nov 2015 01:37:19 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.28.26.144 with SMTP id a138ls261357wma.18.gmail; Fri, 27 Nov 2015 01:37:18 -0800 (PST) X-Received: by 10.194.89.2 with SMTP id bk2mr8856108wjb.0.1448617038399; Fri, 27 Nov 2015 01:37:18 -0800 (PST) Original-Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com. [74.125.82.42]) by gmr-mx.google.com with ESMTPS id w187si139750wmw.1.2015.11.27.01.37.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Nov 2015 01:37:18 -0800 (PST) Received-SPF: pass (google.com: domain of r.m.krug-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 74.125.82.42 as permitted sender) client-ip=74.125.82.42; Original-Received: by wmww144 with SMTP id w144so50866126wmw.0 for ; Fri, 27 Nov 2015 01:37:18 -0800 (PST) X-Received: by 10.28.26.147 with SMTP id a141mr9738288wma.36.1448617038149; Fri, 27 Nov 2015 01:37:18 -0800 (PST) Original-Received: from Rainers-MacBook-Pro.local ([2a01:e35:8baa:b070:1c47:8d1f:422b:5030]) by smtp.gmail.com with ESMTPSA id n127sm6604588wmf.12.2015.11.27.01.37.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Nov 2015 01:37:17 -0800 (PST) In-Reply-To: <56575DF7.2050202-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> (BP Jonsson's message of "Thu, 26 Nov 2015 20:31:03 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) X-Original-Sender: R.M.Krug-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of r.m.krug-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 74.125.82.42 as permitted sender) smtp.mailfrom=r.m.krug-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-Spam-Checked-In-Group: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:14010 Archived-At: --=-=-= Content-Type: text/plain; charset=UTF-8 BP Jonsson writes: > 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? > > I should have mentioned before that pandoc doesn't compile the LaTeX, > it just parses the LaTeX markup into an AST, discarding anything it > cannot represent, and builds a document in another format from the > AST. > > However pandoc lets you run filters on the AST after having read the > original document and before constructing the new document, > and it is (was) fairly simple towrite a filter which collects all > figures and tables at a designated place in the document. Yes - I was aware if this, and I have other issues because of this as well (siunitx package). > > You can read about using filters here: > > Thanks - useful resource. > > You can find such a filter as I described before here: > > > > There are both a perl and a python version. > Make sure to read the description! > > EDIT: it occurs to me that you sprobably want to put all tables > together in one place and all figures together in another place. > Reply to this mail if that is the case! Yes - this is exactly what I want to do. I want to collect all table and figure floats at the end, ideally one section with the header "Figures" with the figures, a scond header with the name "Tables" with the table floats. I tried your filters in a make file as follow: ,---- | sed -e 's/pdf/png/g' ASMOptim.tex > ASMOptim.pandoc.tex | pandoc --bibliography=ASMOptim.bib --filter pandoc-collect-floats.pl --filter pandoc-citeproc ASMOptim.pandoc.tex -o ASMOptim_0.1.4+.docx | pandoc: Error running filter pandoc-collect-floats.pl | fd:4: hClose: resource vanished (Broken pipe) `---- but as you can see, the filter pandoc-collect-floats.pl raises an error. Any ideas what is causing this? Thanks a lot, Rainer > > /bpj > -- Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982