emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* emphasizing source code words
@ 2021-02-01 12:51 Luca Ferrari
  2021-02-01 12:55 ` TEC
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Ferrari @ 2021-02-01 12:51 UTC (permalink / raw)
  To: emacs-org list

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: emphasizing source code words
  2021-02-01 12:51 emphasizing source code words Luca Ferrari
@ 2021-02-01 12:55 ` TEC
  2021-02-04 11:38   ` Luca Ferrari
  0 siblings, 1 reply; 4+ messages in thread
From: TEC @ 2021-02-01 12:55 UTC (permalink / raw)
  To: Luca Ferrari; +Cc: emacs-orgmode


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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: emphasizing source code words
  2021-02-01 12:55 ` TEC
@ 2021-02-04 11:38   ` Luca Ferrari
  2021-02-04 12:13     ` Juan Manuel Macías
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Ferrari @ 2021-02-04 11:38 UTC (permalink / raw)
  To: TEC; +Cc: emacs-org list

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: emphasizing source code words
  2021-02-04 11:38   ` Luca Ferrari
@ 2021-02-04 12:13     ` Juan Manuel Macías
  0 siblings, 0 replies; 4+ messages in thread
From: Juan Manuel Macías @ 2021-02-04 12:13 UTC (permalink / raw)
  To: Luca Ferrari; +Cc: orgmode

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 





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-04 12:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01 12:51 emphasizing source code words Luca Ferrari
2021-02-01 12:55 ` TEC
2021-02-04 11:38   ` Luca Ferrari
2021-02-04 12:13     ` Juan Manuel Macías

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).