From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id nr8tMaIuvV8nMgAA0tVLHw (envelope-from ) for ; Tue, 24 Nov 2020 16:02:42 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2ByOLKIuvV+7fAAAbx9fmQ (envelope-from ) for ; Tue, 24 Nov 2020 16:02:42 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F02F59400BF for ; Tue, 24 Nov 2020 16:02:41 +0000 (UTC) Received: from localhost ([::1]:41070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kham8-0001CA-GH for larch@yhetil.org; Tue, 24 Nov 2020 11:02:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khakm-000189-Ij for emacs-orgmode@gnu.org; Tue, 24 Nov 2020 11:01:20 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:33625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khakf-0006Hq-72 for emacs-orgmode@gnu.org; Tue, 24 Nov 2020 11:01:16 -0500 Received: by mail-pf1-x42e.google.com with SMTP id q10so18926666pfn.0 for ; Tue, 24 Nov 2020 08:01:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew-cmu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gtXpoyho0Wwiun9nn4uLM0Z27cq+xcRHc481z/931Yw=; b=LTr74nIivHNKGCHmn/P1GH3bhVm1HHo5chsqoxsL4LVV2jtimtLAEyk4bhXkWSHO6E 39k5/F6CuQjsGs+sdEVcodpQkump3Z/XycZF9ao4zUdn/RwLTae1kZzYgC4hI9nswrSj qgJPKJlmrPfsx+9p2owcXEef1ygz+URBPEiRItpWjlQE65penTmGcSlUjV0rR8pUOR14 RliwRHdIi7WcwrjqIUtykDorh9BtyGW4UIRLEpq6Kyec1OGepY+qtxtWuAUzm6EIInhJ MhFHdGg19OUpJKu9XFR79bQzpip3xj+XxDcPxWNHRlIrozwU5cvqswcDSTatI9+DJb4n donA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gtXpoyho0Wwiun9nn4uLM0Z27cq+xcRHc481z/931Yw=; b=KHsVRweTgsCcHVNKe6so9YpnQHpgDIuN6i+q61I4g0Tn0V5h5n54bCYSx96ZcEMGCb 7fgjtNhYLpC+SjZV0TDuYn2lhBWZkHJE5tjtS0cI18ANcbS/qn3BJX+cjyrJgKK7Wzzu LLx2ITDGlgysgqmkZ0bQBAnFbyzilqAx92JrCS3dfG0KBEns6ZeOdo0va41iFtzAc9OT vorOBT8Jj7Fxn7/uFzBmbp/Kr3SVcMqQS4b6IYPVFf6e1qR7afnV8uBhLnJN2yIhHlm1 ZkxXIO1BX5iZRpAlZiQhvZIyibLnMqx0D1sJ15W6ZW0IwqZI2RilLZXHlBUhxLOTeM+S ixcw== X-Gm-Message-State: AOAM533+WGqCw106UI+NfhZ4J95TUykqU4rDa5Lg06y1GOUiG5SiXlxN LoJJ+BLXOYWIg4w3qa5pJRZcN5HQD5nxsTfhx6Y= X-Google-Smtp-Source: ABdhPJylqDPCpAAcR/wUrPwwIIVBghBiUFl42DeMX2gczCKfwgIu8P+1s9aty2NBuzABhQVYMH/9aJ5AWfaejXMCYTA= X-Received: by 2002:a17:90b:224a:: with SMTP id hk10mr5374362pjb.81.1606233664753; Tue, 24 Nov 2020 08:01:04 -0800 (PST) MIME-Version: 1.0 References: <87a6v7gdej.fsf@fastmail.fm> In-Reply-To: <87a6v7gdej.fsf@fastmail.fm> From: John Kitchin Date: Tue, 24 Nov 2020 11:00:53 -0500 Message-ID: Subject: Re: Differentiate source blocks in export? To: Joost Kremers Content-Type: multipart/alternative; boundary="0000000000000395bd05b4dc6b90" Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=johnrkitchin@gmail.com; helo=mail-pf1-x42e.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew-cmu-edu.20150623.gappssmtp.com header.s=20150623 header.b=LTr74nIi; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=andrew.cmu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.11 X-TUID: lY79sKsSN6fL --0000000000000395bd05b4dc6b90 Content-Type: text/plain; charset="UTF-8" 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 Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Tue, Nov 24, 2020 at 7:16 AM Joost Kremers wrote: > 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 some CSS to make them stand out visually. I know I can use > special > blocks to get divs with a custom class, but I don't want to lose all the > benefits of code blocks... > > I tried Google and the Org manual but I haven't been able to find anything > on > this. > > TIA > > -- > Joost Kremers > Life has its moments > > --0000000000000395bd05b4dc6b90 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 outpu= t for that.

John

-----------------------------------
Professor John Kit= chin=C2=A0
Doherty Hall A207F
Department of Chemical Engineering
C= arnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

=


--0000000000000395bd05b4dc6b90--