From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uBMEDagYRmGQ7QAAgWs5BA (envelope-from ) for ; Sat, 18 Sep 2021 18:49:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0M6UCKgYRmF5GQAAbx9fmQ (envelope-from ) for ; Sat, 18 Sep 2021 16:49:44 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4B13FC940 for ; Sat, 18 Sep 2021 18:49:43 +0200 (CEST) Received: from localhost ([::1]:57330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRdX4-0007WX-CN for larch@yhetil.org; Sat, 18 Sep 2021 12:49:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRbWY-000633-8m for emacs-orgmode@gnu.org; Sat, 18 Sep 2021 10:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53114) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRbWY-0000Qu-1U for emacs-orgmode@gnu.org; Sat, 18 Sep 2021 10:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mRbWX-0008Cj-V9 for emacs-orgmode@gnu.org; Sat, 18 Sep 2021 10:41:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#50555: [BUG] Org Latex export doesn't handle src blocks correctly Resent-From: Younes Ben El Original-Sender: "Debbugs-submit" Resent-CC: emacs-orgmode@gnu.org Resent-Date: Sat, 18 Sep 2021 14:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50555 X-GNU-PR-Package: org-mode X-GNU-PR-Keywords: moreinfo To: Daniel Fleischer Received: via spool by 50555-submit@debbugs.gnu.org id=B50555.163197602531487 (code B ref 50555); Sat, 18 Sep 2021 14:41:01 +0000 Received: (at 50555) by debbugs.gnu.org; 18 Sep 2021 14:40:25 +0000 Received: from localhost ([127.0.0.1]:36427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRbVw-0008Bm-I5 for submit@debbugs.gnu.org; Sat, 18 Sep 2021 10:40:24 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:40647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRbVu-0008Ba-W3 for 50555@debbugs.gnu.org; Sat, 18 Sep 2021 10:40:23 -0400 Received: by mail-wm1-f50.google.com with SMTP id b21-20020a1c8015000000b003049690d882so12123515wmd.5 for <50555@debbugs.gnu.org>; Sat, 18 Sep 2021 07:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=ORMMZ0QCrsbOGydO8/XZnfJbWzhmbqoGdv2bbu5FAwk=; b=oob0yHF/lwW8oAUrkGReTEAySTTlsDy8NS+fHqvnXQdNVPwHZllI7SzRW5YK21V2Qf /aJPDj8gOUdRzuSmgJHriMXIj+8kzPIBd054ZShEVwQ7qRN3qO0Z2eXoWTbiLJ9i9smx j3AtxZpNje2T3madhvvnzK8N3pUvbzs80texZZW/GDTL6TPgQ7q4KzQG86yAQ33JwoV4 VwpEnfJ9Bq6KUPQbwdWzAsJ3NpKqWZM0vzucRgeSGfR18nH00gcrvHm0nTdtkU+PmgGF YdpKPwzlwA/uhm959bWnuHhBk7QeSKO8hgi5qSolmyi+G8z8ybSWiNGKTF1Oq8zpikiZ xiEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=ORMMZ0QCrsbOGydO8/XZnfJbWzhmbqoGdv2bbu5FAwk=; b=dLYCjn7XcC0yCA3QOMiarf/ja8x7gZlAIxCw7KtbS0uWft3n3A/ddUS8Bse5SW2XpN h0wZi9wYJiglGHvfs3YFVKLYgzEswiiRRiYRSolmVbBHAEUI4xSvJ3+tqeqdavrXy7cf G8hNxHrRcN51bOuMA0tyvT0KMS5Wg0tsGAkZjDBgZT0H+5xkMaJjNzZa+cREjelWvXO6 x74OyObAcV0cxy9X1YI7No+m0V1C9soAo0sIXAYuSTC88eCdjn2nHx/OizK52lg4Izmt sicKlkQt5Wy4UYvlOe2j0FshB6t9eR0pRKyWzkTqlu4H8sD05BYT82kKDk5udkcE+eU8 kMFg== X-Gm-Message-State: AOAM531IESLfbj6P7zCHJt5Ydh98oX/z/KDpZlZkkFQAiSMEY74419Qj hF/vWjSVt1PG/PsykaEk+TK8d2BhP9Co1A== X-Google-Smtp-Source: ABdhPJwedh5F/ollJZM29P1tp277Mj7CTBzcWVZbuYvDcJmfb+/bPGlsuJiCezTdR+o8XgVGbm148w== X-Received: by 2002:a05:600c:b42:: with SMTP id k2mr13788076wmr.134.1631976016753; Sat, 18 Sep 2021 07:40:16 -0700 (PDT) Received: from winchester ([105.66.0.96]) by smtp.gmail.com with ESMTPSA id l13sm9728472wrb.11.2021.09.18.07.40.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Sep 2021 07:40:16 -0700 (PDT) References: User-agent: mu4e 1.7.0; emacs 27.2 From: Younes Ben El Date: Sat, 18 Sep 2021 15:38:13 +0100 In-reply-to: Message-ID: <87y27uueuo.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sat, 18 Sep 2021 12:48:56 -0400 X-BeenThere: emacs-orgmode@gnu.org List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 50555@debbugs.gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631983783; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=ORMMZ0QCrsbOGydO8/XZnfJbWzhmbqoGdv2bbu5FAwk=; b=hgBToWCVGVksXeNpwumKT9rlZV+1GNXOSMcPPSZUAsono6TAw8Ksyyi1H7XOdeT2WqtetX 0NyEyhtZJ5Slo9zQytywhxeRBJ1syTTksL8QM9AkHEbjZsFGA93m5eAYoi4x3eflAdUTUL CzOL0eY8DybW2h+qZMiDgG7h6EwS9rW4wICJBQYLuULYsK8aDF53E0koG2MviMTwQUlvan F08Pa/Z4+evAJO5VvoYdy++lWSPNFAWrSeHWgsLE1+ecwud0IpEoOIAxJYbNbcczroZjj9 Jal/Xt8FycAdz+UFsvMuosodPMMBM+KQC5pB/dyYUfCjEZjFEh2EPCNnrEichw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631983783; a=rsa-sha256; cv=none; b=ZcnNwQjarJXnGOjASv+yS3Kv1DAf4VTZn3a7NtfAg6nzw2uV7qNTovRXCiufEXisptwCnG so7Iz5ipfVH0ueoZ3HiS+H86e+HzXYmbfEKR0f4ewTj7UNIu2pIj8jWibb3/aoinnaKvNv 02l+8fmB69CntbHJaMMCGHevoUl3YiZ3mEi0PG5fS8jgwDqwErsEreruuVtuBfN5NcfGX9 /WGJvSnO3Zhcqz2NexHDNLnxFMCbwiJm49b2Q10MnIdNO6Z5mVhFqfSBxHjfzAJy64+inJ LRH+bfiB+wVnv1tg4RLjcwRg4euTV+mkr8s4F9R5StRvbsVpgIAD/W5oAENMIQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="oob0yHF/"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: 0.21 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="oob0yHF/"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 4B13FC940 X-Spam-Score: 0.21 X-Migadu-Scanner: scn0.migadu.com X-TUID: HOx4oaLDaQpR --=-=-= Content-Type: text/plain I Apologize for the previous mail, seems like it didn't go through correctly . Actually it does compile and produces a pdf file , however there's some issue with it as it doesn't display the code_block. if we set our emacs config to #+begin_src emacs-lisp (require 'ox-latex) (setq org-latex-listings 'minted) #+end_src Then Set In Our org file #+begin_src org #+LATEX_CLASS: article #+LATEX_CLASS_OPTIONS: [letterpaper] #+LATEX_HEADER: \usepackage{minted} #+OPTIONS: toc:t #+end_src and edit our org file and then compile it , it will not produce a code_block. probably because of empty options [] like i tested , after we remove them it works. Digging little into the issue, if we specfied a pdf-export-commands , it will result into the expected exported pdf. #+begin_src emacs-lisp (with-eval-after-load 'ox-latex (add-to-list 'org-latex-packages-alist '("" "minted")) (setq org-latex-listings 'minted) (setq org-latex-pdf-process '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))) #+end_src Not sure why it needs these in order to export correctly. Here's some screenshots of the issue,[[https://i.imgur.com/VB1leIW.png][Exported_pdf]],[[https://i.imgur.com/x8lIIFW.png][org_file]],[[https://i.imgur.com/Tm0lzp4.png][exported_tex]],[[https://i.imgur.com/bxdI7Ja.png][Removing_Brackets]] --=-=-= Content-Type: text/html

I Apologize for the previous mail, seems like it didn’t go through correctly . Actually it does compile and produces a pdf file , however there’s some issue with it as it doesn’t display the codeblock. if we set our emacs config to

(require 'ox-latex)
(setq org-latex-listings 'minted)

Then Set In Our org file

#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [letterpaper]
#+LATEX_HEADER: \usepackage{minted}
#+OPTIONS: toc:t

and edit our org file and then compile it , it will not produce a codeblock. probably because of empty options [] like i tested , after we remove them it works. Digging little into the issue, if we specfied a pdf-export-commands , it will result into the expected exported pdf.

(with-eval-after-load 'ox-latex
  (add-to-list 'org-latex-packages-alist '("" "minted"))
  (setq org-latex-listings 'minted)
  (setq org-latex-pdf-process
        '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
          "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
          "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")))

Not sure why it needs these in order to export correctly. Here’s some screenshots of the issue,Exportedpdf,orgfile,exportedtex,RemovingBrackets

--=-=-=--