[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] exporting inline source code with listings broken by color comma
From: |
Nicolas Goaziou |
Subject: |
Re: [O] exporting inline source code with listings broken by color commands |
Date: |
Sun, 23 Jul 2017 17:17:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hello,
Tyler Smith <address@hidden> 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