emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Tyler Smith <tyler@plantarum.ca>
Cc: Emacs Org-Mode Help <emacs-orgmode@gnu.org>
Subject: Re: exporting inline source code with listings broken by color commands
Date: Sun, 23 Jul 2017 17:17:47 +0200	[thread overview]
Message-ID: <87wp6zqj1g.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <1500396739.4076295.1044859264.154665A7@webmail.messagingengine.com> (Tyler Smith's message of "Tue, 18 Jul 2017 12:52:19 -0400")

Hello,

Tyler Smith <tyler@plantarum.ca> 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

  reply	other threads:[~2017-07-23 20:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 16:52 exporting inline source code with listings broken by color commands Tyler Smith
2017-07-23 15:17 ` Nicolas Goaziou [this message]
2017-07-24 13:12   ` Tyler Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wp6zqj1g.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=tyler@plantarum.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).