From mboxrd@z Thu Jan 1 00:00:00 1970 From: thomas Subject: Re: make code lines bold in export Date: Sun, 12 Apr 2015 10:38:45 +0200 Message-ID: <552A2F15.3030907@friendlyvillagers.com> References: <5525188B.6040308@friendlyvillagers.com> <552A2AD3.3020006@friendlyvillagers.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------020509060001000503040202" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhDVj-0003lz-W2 for emacs-orgmode@gnu.org; Sun, 12 Apr 2015 04:45:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhDVg-0002Dv-Q2 for emacs-orgmode@gnu.org; Sun, 12 Apr 2015 04:44:59 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::5]:35567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhDVg-0002DF-Ag for emacs-orgmode@gnu.org; Sun, 12 Apr 2015 04:44:56 -0400 Received: from [192.168.178.20] (p5496601E.dip0.t-ipconnect.de [84.150.96.30]) by smtp.strato.de (RZmta 37.5 DYNA|AUTH) with ESMTPSA id K06bcar3C8cjHae (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Sun, 12 Apr 2015 10:38:45 +0200 (CEST) In-Reply-To: <552A2AD3.3020006@friendlyvillagers.com> 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.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------020509060001000503040202 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 12.04.2015 10:20, thomas wrote: > Hi John, > > thank you for your quick reply. I have to admit to do this at the > moment would be way over my head ... > > I found an easy method to boldify inline code here: > http://orgmode.org/Changes.html > > ================================================ > > > New option: org-babel-inline-result-wrap > > > If you set this to the following > > (setq org-babel-inline-result-wrap "$%s$") > > then inline code snippets will be wrapped into the formatting string. > > ================================================ > > this is already something; matches about 50% of the cases where I need > to boldify code :-) > > thanks, > thomas > > > > On 08.04.2015 15:45, John Kitchin wrote: >> A filter is what I would use. You could get the src block text and >> replace lines with that comment in them for the output. This post is not >> exactly that, but it has the idea of how to do it. you would get the >> text, modify it, and return the new modified text. >> >> http://kitchingroup.cheme.cmu.edu/blog/2013/09/30/Attaching-code-blocks-to-a-pdf-file-during-export/ >> >> thomas writes: >> >>> Hi, >>> >>> it would be very nice if i was able to highlight (i.e. make bold) >>> certain lines in an exported code, say ODT. >>> >>> Something like this: >>> >>> #+BEGIN_SRC java >>> public class HelloActivity extends Activity { >>> /** Called when the activity is first created */ >>> @Override >>> public void onCreate(Bundle savedInstanceState) >>> { >>> super.onCreate(savedInstanceState); >>> setContentView(R.layout.main); // *MAKE THIS LINE BOLD* >>> } >>> } >>> #+END_SRC >>> >>> Is there an - easy - way to do this? My first guess: I need to write an >>> export filter ... what would you think? >>> >>> Thanks, >>> thomas >> -- >> 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 >> > --------------020509060001000503040202 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit
On 12.04.2015 10:20, thomas wrote:
Hi John,

thank you for your quick reply. I have to admit to do this at the moment would be way over my head ...

I found an easy method to boldify inline code here: http://orgmode.org/Changes.html

================================================

New option: org-babel-inline-result-wrap

If you set this to the following

(setq org-babel-inline-result-wrap "$%s$")

then inline code snippets will be wrapped into the formatting string.

================================================

this is already something; matches about 50% of the cases where I need to boldify code  :-)

thanks,
thomas



On 08.04.2015 15:45, John Kitchin wrote:
A filter is what I would use. You could get the src block text and
replace lines with that comment in them for the output. This post is not
exactly that, but it has the idea of how to do it. you would get the
text, modify it, and return the new modified text.

http://kitchingroup.cheme.cmu.edu/blog/2013/09/30/Attaching-code-blocks-to-a-pdf-file-during-export/

thomas writes:

Hi,

it would be very nice if i was able to highlight (i.e. make bold)
certain lines in an exported code, say ODT.

Something like this:

#+BEGIN_SRC java
public class HelloActivity extends Activity {
   /** Called when the activity is first created */
   @Override
   public void onCreate(Bundle savedInstanceState)
   {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);  // *MAKE THIS LINE BOLD*
   }
}
#+END_SRC

Is there an - easy - way to do this? My first guess: I need to write an
export filter ...  what would you think?

Thanks,
thomas
--
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



--------------020509060001000503040202--