Re: "Org" source blocks and minted
Yes, this looks very promising. I'm looking forward to playing with it when I have more time. On 27/03/21 12:55 am, Juan Manuel Macías wrote: > Hi Timothy, > > I really like your approach. And it is org/emacscentric! Minted has > never quite convinced me, and gives me some trouble with certain > packages in LuaLaTeX that I have not been able to solve. Thank you for > this promising alternative. > > Best regards, > > Juan Manuel > > Timothy writes: > >> 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 :) >
Re: "Org" source blocks and minted
Hi Timothy, I really like your approach. And it is org/emacscentric! Minted has never quite convinced me, and gives me some trouble with certain packages in LuaLaTeX that I have not been able to solve. Thank you for this promising alternative. Best regards, Juan Manuel Timothy writes: > 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 :)
Re: "Org" source blocks and minted
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
Re: "Org" source blocks and minted
Hi Mike, Michael Gauland 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
"Org" source blocks and minted
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