emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* LaTeX export with listings: unknown language "calc"
@ 2016-02-13 15:35 Axel Kielhorn
  2016-02-13 21:23 ` Eric S Fraga
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Kielhorn @ 2016-02-13 15:35 UTC (permalink / raw)
  To: Org-Mode Mailing List

Hello!

I use some calc in my org document:

#+begin_SRC calc :var x=5 :var y=2 :exports both
  2 + a * x ** y
#+end_SRC 

When I export this to LaTeX the listings package complains about an unknown language calc.

To fix this I simply define a language:

#+LATEX_HEADER: \usepackage{listings}
#+LATEX_HEADER: \lstdefinelanguage{calc}{morekeywords={}}

Is this the correct way to do this?
Should this be added to the documentation?

Regards Axel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: LaTeX export with listings: unknown language "calc"
  2016-02-13 15:35 LaTeX export with listings: unknown language "calc" Axel Kielhorn
@ 2016-02-13 21:23 ` Eric S Fraga
  0 siblings, 0 replies; 2+ messages in thread
From: Eric S Fraga @ 2016-02-13 21:23 UTC (permalink / raw)
  To: Axel Kielhorn; +Cc: Org-Mode Mailing List

On Saturday, 13 Feb 2016 at 16:35, Axel Kielhorn wrote:
> Hello!
>
> I use some calc in my org document:
>
> #+begin_SRC calc :var x=5 :var y=2 :exports both
>   2 + a * x ** y
> #+end_SRC 
>
> When I export this to LaTeX the listings package complains about an
> unknown language calc.
>
> To fix this I simply define a language:
>
> #+LATEX_HEADER: \usepackage{listings}
> #+LATEX_HEADER: \lstdefinelanguage{calc}{morekeywords={}}

Basically, yes.  I have

#+latex_header: \lstdefinelanguage{calc}{}

for the second line.

> Is this the correct way to do this?
> Should this be added to the documentation?

Probably...
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.90.1, Org release_8.3.3-565-g4f499f

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-13 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-13 15:35 LaTeX export with listings: unknown language "calc" Axel Kielhorn
2016-02-13 21:23 ` Eric S Fraga

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).