From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: exporting inline source code with listings broken by color commands Date: Sun, 23 Jul 2017 17:17:47 +0200 Message-ID: <87wp6zqj1g.fsf@nicolasgoaziou.fr> References: <1500396739.4076295.1044859264.154665A7@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZNii-0004n0-V0 for emacs-orgmode@gnu.org; Sun, 23 Jul 2017 16:43:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dZNii-0006ev-44 for emacs-orgmode@gnu.org; Sun, 23 Jul 2017 16:43:21 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:51939) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dZNih-0006eK-Tv for emacs-orgmode@gnu.org; Sun, 23 Jul 2017 16:43:20 -0400 In-Reply-To: <1500396739.4076295.1044859264.154665A7@webmail.messagingengine.com> (Tyler Smith's message of "Tue, 18 Jul 2017 12:52:19 -0400") 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" To: Tyler Smith Cc: Emacs Org-Mode Help Hello, Tyler Smith writes: > (setq org-latex-listings t > org-latex-listings-options > '(("backgroundcolor" "\\color[gray]{0.95}") This is incorrect. Per "listings" manual, a commend with an optional argument needs to be included within curly braces: ("backgroundcolor" "{\\color[gray]{0.95}}") > Then open tmp.org, which contains the following: > > # -*- org-export-babel-evaluate: nil -*- [...] > Inline code: src_R{1 + 1} {{{results(=2=)}}} > > > Export to pdf via C-c C-e l o > > What I expect to happen is that the last line is rendered as "Inline > code: 2". This is not going to happen. Since you set `org-export-babel-evaluate' to nil, you have a somewhat WYSIWYG behaviour; the "1 + 1" is not going to disapper. You may want to use ":eval never-export" in conjuction with ":exports results", e.g., #+property: header-args :eval never-export Inline code: src_R[:exports results]{1 + 1} {{{results(=2=)}}} Regards, -- Nicolas Goaziou