* "Org" source blocks and minted
@ 2021-03-24 1:33 Michael Gauland
2021-03-24 4:18 ` Juan Manuel Macías
2021-03-24 4:24 ` Timothy
0 siblings, 2 replies; 5+ messages in thread
From: Michael Gauland @ 2021-03-24 1:33 UTC (permalink / raw)
To: Org-mode
[-- Attachment #1: Type: text/plain, Size: 413 bytes --]
I want to include an "org" source block in a document as an example, and
have it formatted with minted. Unfortunately, minted doesn't seem to
recognize "org" as a language,and the block is missing in the resulting
PDF. For the moment, I've changed this to a "text" source block, but it
would be nice to have syntax highlighting in the export.
Have any of you done this, or something similar?
Kind regards,
Mike
[-- Attachment #2: Type: text/html, Size: 854 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "Org" source blocks and minted
2021-03-24 1:33 "Org" source blocks and minted Michael Gauland
@ 2021-03-24 4:18 ` Juan Manuel Macías
2021-03-24 4:24 ` Timothy
1 sibling, 0 replies; 5+ messages in thread
From: Juan Manuel Macías @ 2021-03-24 4:18 UTC (permalink / raw)
To: Michael Gauland; +Cc: orgmode
Hi Mike,
Michael Gauland <mikelygee@gmail.com> writes:
> I want to include an "org" source block in a document as an example,
> and have it formatted with minted. Unfortunately, minted doesn't seem
> to recognize "org" as a language,and the block is missing in the
> resulting PDF. For the moment, I've changed this to a "text" source
> block, but it would be nice to have syntax highlighting in the export.
>
> Have any of you done this, or something similar?
>
> Kind regards,
> Mike
>
You can write your own pygments lexer:
https://pygments.org/docs/lexerdevelopment
But it seems that someone already did the work of writing a lexer for
Org Mode:
https://github.com/or/pygments-orgmode-lexer
Best regards,
Juan Manuel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "Org" source blocks and minted
2021-03-24 1:33 "Org" source blocks and minted Michael Gauland
2021-03-24 4:18 ` Juan Manuel Macías
@ 2021-03-24 4:24 ` Timothy
2021-03-26 11:55 ` Juan Manuel Macías
1 sibling, 1 reply; 5+ messages in thread
From: Timothy @ 2021-03-24 4:24 UTC (permalink / raw)
To: Michael Gauland; +Cc: emacs-orgmode
Hi Michael,
> I want to include an "org" source block in a document as an example, and
> have it formatted with minted.
>
Juan mentioned an Org lexer exists, but another approach that may be of
interest is using Emacs' own font-lock. I wrote a package that's like
HTMLize but works with LaTeX and currently have it sitting in my config.
I plan on submitting a patch to Org at some point on this, but for now:
- https://github.com/tecosaur/engrave-faces
- https://tecosaur.github.io/emacs-config/config.html#pretty-code-blocks
Sample output: all the code blocks in
https://tecosaur.github.io/emacs-config/config.pdf
Since this uses Emacs' font-lock, this means that you can use any
language that you have a syntax-highlighting-mode for :)
--
Timothy
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-01 8:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-24 1:33 "Org" source blocks and minted Michael Gauland
2021-03-24 4:18 ` Juan Manuel Macías
2021-03-24 4:24 ` Timothy
2021-03-26 11:55 ` Juan Manuel Macías
2021-04-01 8:07 ` Michael Gauland
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).