0

I'm using org-beamer exporter, and I would like to do the following:

  (defalias 'org-babel-execute:emacs-lisp lisp 'org-babel-execute:emacs lisp)

My problem is 'org-babel-execute:emacs lisp has a space character, which I need so the code in latex appears as:

\begin{minted}[frame=lines,fontsize=\scriptsize,linenos]{emacs lisp}
(defalias 'org-babel-execute:emacs-lisp 'org-babel-execute:emacs lisp)
\end{minted}

minted uses pygments, which defines emacs lisp, with space.

BuddhiLW
  • 257
  • 1
  • 7
  • What does `org-babel-execute:emacs-lisp` have to do with LaTeX? Please provide full details of what you are trying to do: I cannot guess from your question where you are starting from and where you want to end up. Edit your question and clarify. – NickD Sep 24 '21 at 17:05
  • If you are trying to export an Org mode document with an `emacs-lisp` source code block, this works out of the box for me. In particular, `pygmentize -L lexers | grep emacs` shows that `emacs`, `elisp` and `emacs-lisp` are all recognized. What problem are you facing exactly? Do you get an error? What's the error message? – NickD Sep 24 '21 at 18:06
  • See e.g. https://github.com/pygments/pygments/issues/914 – NickD Sep 25 '21 at 00:11
  • Actually, I the problem seem I have to run the code in the .tex file, exported by .org, so to codes in minted blocks to work. I don't know why. But, that's how it's behaving – BuddhiLW Sep 25 '21 at 01:31
  • Can you provide a *complete* example? A small Org mode file, how you export it (the exact key sequence), what the resulting LaTeX file looks like and what happens when you compile that file. You should include all of that in your question. Otherwise, I cannot help you. – NickD Sep 25 '21 at 12:41
  • You already did help. It's solved. I had to compile manually the .tex file; but, the minted source block is working as expected. – BuddhiLW Sep 25 '21 at 20:05
  • OK - good to know. Why do you have to compile the .tex file manually? – NickD Sep 25 '21 at 21:46
  • Probably, it has to do with xelatex use. Even though, I have put `#+LATEX_COMPILER: xelatex` in the org header, sometimes, it compiles as latex. Also, the source code blocks outputed to minted blocks do not compile directly, through `org-beamer-export-to-pdf`. – BuddhiLW Sep 27 '21 at 21:09

0 Answers0