From mboxrd@z Thu Jan 1 00:00:00 1970 From: Emmanuel Charpentier Subject: BUG: the builtin LaTeX/P DF exporter mislabels source blocks as figures. Date: Tue, 30 Apr 2019 09:18:51 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:56645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLN2X-0000ya-Db for emacs-orgmode@gnu.org; Tue, 30 Apr 2019 03:18:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLN2W-0005ob-Aw for emacs-orgmode@gnu.org; Tue, 30 Apr 2019 03:18:57 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]:38692) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLN2W-0005na-42 for emacs-orgmode@gnu.org; Tue, 30 Apr 2019 03:18:56 -0400 Received: from zen-book-flip (unknown [82.228.67.28]) (Authenticated sender: emm.charpentier) by smtp1-g21.free.fr (Postfix) with ESMTPSA id F2F7AB005B2 for ; Tue, 30 Apr 2019 09:18:52 +0200 (CEST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode I shall report formally the problems mentioned in http://lists.gnu.org/archive/html/emacs-orgmode/2019-04/msg00240.html, trying to isolate them as much as possible. I'll start with the simplest (and, IMHO, the most annoying). Whereas the HTML exporter correctly recognize a source block as such, the LaTeX/PDF exporter does not. This can be demonstrated in a (minimal) org file using *only* the built-in tools (no external packages), where a source block is labelled as such by the HTML exporter but as a figure by the LaTeX exporter.The generated LaTeX source shows a suspicious "\captionof{figure}{\label{orgf2d4160}" in the export of the source block. Further tests (not shown) show that the proble persists when org-mode is set up to use the minted package for LaTeX export of source blocks (minted is indeed used, but the block is s still mislabeled). This example also exhibits some cosmetic problems (spacing) that will be ignored for now. The org source and resulting pdf and html files are available here : https://drive.google.com/drive/folders/1bQmaefiztW9ZDRNLcjOD_WbEmTg4d8dG?usp=sharing