From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: equal syntax highlighting for publishing code blocks to html and pdf Date: Sat, 1 Feb 2020 08:50:20 -0500 Message-ID: References: <22BE5D0D-6438-4CC8-B4C6-0E755AF28FCA@nordakademie.de> <87imkqodw3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000042e350059d83f9b1" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46180) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixtAV-0005cA-6J for emacs-orgmode@gnu.org; Sat, 01 Feb 2020 08:50:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixtAT-0004dd-Pi for emacs-orgmode@gnu.org; Sat, 01 Feb 2020 08:50:39 -0500 In-Reply-To: <87imkqodw3.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Bastien Cc: "emacs-orgmode@gnu.org" , Johannes Brauer --00000000000042e350059d83f9b1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable My guess is you have two options: 1. Customize the colors in minted to match what is on your screen. I am pretty sure that code in html looks very much like what is on your screen. This might be an entry point to customizing minted style. https://tex.stackexchange.com/questions/131456/customize-comment-color-in-m= inted-style 2. Customize the faces emacs uses for syntax highlighting to match the look in minted. either way, I don't see a simple way to have a common theme between them, and they will probably always have some minor differences. It might be easier to hack a new exporter for src blocks that turns the htmlized code into latex markup perhaps. John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Sat, Feb 1, 2020 at 4:28 AM Bastien wrote: > Hi Johannes, > > Johannes Brauer writes: > > > Frequently I publish org-mode documents containing source code blocks > > to html (htmlize) and pdf (minted). I would like to see the same > > colors in both export types. But > > I cannot figure out, what=E2=80=99s the best way to achieve this. > > > > Has anyone solved this problem? Are there any hints? > > I don't know how to do this and I guess it's difficult. > > If you find a solution, please mention it here, others may be > interested. > > Thanks! > > -- > Bastien > > --00000000000042e350059d83f9b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
My guess is you have two options:

1. Cu= stomize the colors in minted to match what is on your screen. I am pretty s= ure that code in html looks very much like what is on your screen. This mig= ht be an entry point to customizing minted style.=C2=A0https://tex.stackexchange.com/questions/131456/customize-comment-color-= in-minted-style

2. Customize the faces emacs u= ses for syntax highlighting to match the look in minted.

either way, I don't see a simple way to have a common theme betw= een them, and they will probably always have some minor differences. It mig= ht be easier to hack a new exporter for src blocks that turns the htmlized = code into latex markup perhaps.=C2=A0

<= div dir=3D"ltr">
John

-------------------------= ----------
Professor John Kitchin=C2=A0
Doherty Hall A207F
Departm= ent of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA= 15213
412-268-7803


On Sat, Feb 1, = 2020 at 4:28 AM Bastien <bzg@gnu.org&= gt; wrote:
Hi Jo= hannes,

Johannes Brauer <brauer@nordakademie.de> writes:

> Frequently I publish org-mode documents containing source code blocks<= br> > to html (htmlize) and pdf (minted). I would like to see the same
> colors in both export types. But
> I cannot figure out, what=E2=80=99s the best way to achieve this.
>
> Has anyone solved this problem? Are there any hints?

I don't know how to do this and I guess it's difficult.

If you find a solution, please mention it here, others may be
interested.

Thanks!

--
=C2=A0Bastien

--00000000000042e350059d83f9b1--