Font lock in inner blocks [was: Re: Differentiate source blocks in export?]

2020-11-25 Thread Joost Kremers
On Wed, Nov 25 2020, Eric S Fraga wrote: > On Wednesday, 25 Nov 2020 at 09:37, Joost Kremers wrote: >> I like this solution for the "Org-ness" of the syntax, and yes, =C-c >> '= works, but font lock is gone... > > Yes, font lock is gone unfortunately but I am not sure why that > is. Something

Re: Differentiate source blocks in export?

2020-11-25 Thread Eric S Fraga
On Wednesday, 25 Nov 2020 at 09:37, Joost Kremers wrote: > I like this solution for the "Org-ness" of the syntax, and yes, =C-c > '= works, but font lock is gone... Yes, font lock is gone unfortunately but I am not sure why that is. Something for somebody who understands the syntax highlighting

Re: Differentiate source blocks in export?

2020-11-25 Thread Joost Kremers
On Wed, Nov 25 2020, Eric S Fraga wrote: > On Tuesday, 24 Nov 2020 at 23:02, Joost Kremers wrote: >> That, unfortunately, seems to make it impossible to edit the source block as >> Octave (or in my case Python) code. Pressing =C-c '= in this source block >> gives >> me an Org buffer. > > Take

Re: Differentiate source blocks in export?

2020-11-25 Thread Eric S Fraga
On Tuesday, 24 Nov 2020 at 23:02, Joost Kremers wrote: > That, unfortunately, seems to make it impossible to edit the source block as > Octave (or in my case Python) code. Pressing =C-c '= in this source block > gives > me an Org buffer. Take away the begin...end org block itself which I only

Re: Differentiate source blocks in export?

2020-11-24 Thread Joost Kremers
On Tue, Nov 24 2020, Eric S Fraga wrote: > On Tuesday, 24 Nov 2020 at 17:22, Diego Zamboni wrote: >> And even (a bit) shorter: >> >> #+html: > > Or, if you want a more org-like feel to your special constructs, and > something that would in principle work to other export engines: > > #+begin_src

Re: Differentiate source blocks in export?

2020-11-24 Thread Joost Kremers
On Tue, Nov 24 2020, Diego Zamboni wrote: > And even (a bit) shorter: > > #+html: > #+BEGIN_SRC python > print(5) > #+END_SRC > #+html: Thanks everyone for your suggestions. I tried this one and it works great. =myclass= of course ends up containing the =src= class, but as I just found out,

Re: Differentiate source blocks in export?

2020-11-24 Thread Eric S Fraga
On Tuesday, 24 Nov 2020 at 17:22, Diego Zamboni wrote: > And even (a bit) shorter: > > #+html: Or, if you want a more org-like feel to your special constructs, and something that would in principle work to other export engines: #+begin_src org ,#+begin_myclass ,#+begin_src octave y = 3 * x

Re: Differentiate source blocks in export?

2020-11-24 Thread Diego Zamboni
And even (a bit) shorter: #+html: #+BEGIN_SRC python print(5) #+END_SRC #+html: --Diego On Tue, Nov 24, 2020 at 5:16 PM John Kitchin wrote: > Nice! Here is a little more compact way to do that I think: > > @@html:@@ > #+BEGIN_SRC python > print(5) > #+END_SRC > @@html:@@ > > > John > >

Re: Differentiate source blocks in export?

2020-11-24 Thread John Kitchin
Nice! Here is a little more compact way to do that I think: @@html:@@ #+BEGIN_SRC python print(5) #+END_SRC @@html:@@ John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213

Re: Differentiate source blocks in export?

2020-11-24 Thread Marvin ‘quintus’ Gülker
Hi! Am Dienstag, dem 24. November 2020 schrieb Joost Kremers: > I was wondering if there's a way to distinguish between different kind of > source > code blocks when exporting to HTML. > > Specifically, I would like a way to mark certain code blocks in my Org file so > that those code blocks get

Re: Differentiate source blocks in export?

2020-11-24 Thread John Kitchin
I think you would have to use some kind of filter to look either for an #+attr_html or src-header argument, and modify the html output for that. John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University

Differentiate source blocks in export?

2020-11-24 Thread Joost Kremers
Hi all, I was wondering if there's a way to distinguish between different kind of source code blocks when exporting to HTML. Specifically, I would like a way to mark certain code blocks in my Org file so that those code blocks get a specific class in the HTML export. I can then style them with