emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Younes Ben El <younes.brovi@gmail.com>
To: Daniel Fleischer <danflscr@gmail.com>
Cc: 50555@debbugs.gnu.org
Subject: bug#50555: [BUG] Org Latex export doesn't handle src blocks correctly
Date: Sat, 18 Sep 2021 15:38:13 +0100	[thread overview]
Message-ID: <87y27uueuo.fsf@gmail.com> (raw)
In-Reply-To: <m27dfe40dk.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]

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]]

[-- Attachment #2: Type: text/html, Size: 3696 bytes --]

  reply	other threads:[~2021-09-18 16:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAAM66s7Ej_i8tep4vaOyb8Uv-zNpeA-N7E2d+C1yctSCuwkrMA@mail.gmail.com>
2021-09-18 10:57 ` bug#50555: [BUG] Org Latex export doesn't handle src blocks correctly Daniel Fleischer
2021-09-18 14:38   ` Younes Ben El [this message]
2021-09-18 19:45     ` Daniel Fleischer
2021-09-18 19:53       ` Younes Ben El
2021-09-18 20:04         ` bug#50555: [PATCH] " Daniel Fleischer
2021-09-27  8:29           ` Bastien

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y27uueuo.fsf@gmail.com \
    --to=younes.brovi@gmail.com \
    --cc=50555@debbugs.gnu.org \
    --cc=danflscr@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).