GNU bug report logs -
#50555
[BUG] Org Latex export doesn't handle src blocks correctly
Previous Next
Reported by: Younes Ben El <younes.brovi <at> gmail.com>
Date: Sun, 12 Sep 2021 20:53:02 UTC
Severity: normal
Tags: moreinfo, patch
Done: Daniel Fleischer <danflscr <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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]]
[Message part 2 (text/html, inline)]
This bug report was last modified 3 years and 232 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.