Hi all, I'm using org to produce beamer presentations, and I've a lot of src blocks. Is there any way to emphasize words or lines within such blocks? For example to place the command arguments in bold face? Thanks, Luca
Luca Ferrari <fluca1978@gmail.com> writes:
> Hi all,
> I'm using org to produce beamer presentations, and I've a lot of src blocks.
> Is there any way to emphasize words or lines within such blocks? For
> example to place the command arguments in bold face?
>
> Thanks,
> Luca
I'd have to look at the manual for specifics, but I know that you can
highlight lines when using the minted backend.
Hope that might be of some help,
--
Timothy.
On Mon, Feb 1, 2021 at 1:56 PM TEC <tecosaur@gmail.com> wrote:
> I'd have to look at the manual for specifics, but I know that you can
> highlight lines when using the minted backend.
Thanks, but stil Im not able to figure it out. I've searched thru the
org documentation without any luck.
Luca
Hi Luca Luca Ferrari <fluca1978@gmail.com> writes: > Thanks, but stil Im not able to figure it out. I've searched thru the > org documentation without any luck. > > Luca To use the minted package as backend (https://www.ctan.org/pkg/minted), I have in my Emacs: (setq org-latex-listings 'minted) (setq org-latex-minted-options '(("frame" "lines") ("linenos=true") ("breaklines"))) You also need to install the Python pigments library on your OS. In Arch (in my case) is the python-pygments package. And you have to make sure that when you export to LaTeX it always compiles with the -shell-escape option. For example: (setq org-latex-pdf-process '("lualatex -shell-escape -interaction nonstopmode -output-directory %o %f" "lualatex -shell-escape -interaction nonstopmode -output-directory %o %f" "lualatex -shell-escape -interaction nonstopmode -output-directory %o %f")) Lastly, in Org docs you need of course to load the minted package: #+LaTeX_HEADER: \usepackage{minted} You can see how the highlighting looks like in this post from my blog (in Spanish): under the title there is a button to download the entry in PDF version: https://lunotipia.juanmanuelmacias.com/evitar_funcion_lua.html Finally, you may be interested in this new package that TEC has written: https://www.reddit.com/r/emacs/comments/lbkmmz/the_best_syntax_highlighting_in_a_pdf_youll_see_a/ Best regards, Juan Manuel