Trying to get minted options to work

What happened?

I’m trying to export an org document to pdf (LaTeX in between), and the only way I’ve been able to change the options for minted formatting for source blocks is to manually add this line on top of every source block:

#+attr_latex: :options bgcolor=bg,linenos,tabsize=2,breaklines

without it, my config.el file doesn’t seem to have any effect

What did you expect to happen?

I want to either use header properties or some lines in my config.el and have proper formatting options for minted applied to my pdf output

Steps to reproduce

  1. this chunk in config.el:
;; LATEX
(after! ox-latex
  (setq org-latex-src-block-backend 'minted)
  (setq org-latex-minted-options ;; THESE ARE THE OPTIONS I WANT BUT DON'T WORK
        '(("linenos" "true")
          ("bgcolor" "bg")
          ("breaklines" "true")
          ("frame" "lines")
          ("framesep" "2mm")
          ("baselinestretch" "1.2")
          ("fontsize" "\\footnotesize")))

  (setq org-latex-pdf-process
        '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
          "bibtex %b"
          "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
          "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
  ;; (setq org-latex-with-hyperref nil) ;; was used before, now deprecated
  (setq org-latex-hyperref-template nil) ;; stop adding hypersetup{author..} to latex export
  ;; (setq org-latex-prefer-user-labels t)

  ;; delete unwanted file extensions after latexMK
  (setq org-latex-logfiles-extensions
          (quote ("lof"
                  "lot"
                  "tex~"
                  "aux"
                  "idx"
                  "log"
                  "out"
                  "toc"
                  "nav"
                  "snm"
                  "vrb"
                  "dvi"
                  "fdb_latexmk"
                  "blg"
                  "brf"
                  "fls"
                  "entoc"
                  "ps"
                  "spl"
                  "bbl"
                  "xmpi"
                  "run.xml"
                  "bcf"
                  "acn"
                  "acr"
                  "alg"
                  "glg"
                  "gls"
                  "ist")))

  (unless (boundp 'org-latex-classes)
    (setq org-latex-classes nill)))
  1. open org file with source blocks
  2. C-c C-e l p to export to pdf

System information


Loading data dump...