emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Can't get listings to work
@ 2013-10-26  2:55 Thomas S. Dye
  2013-10-26 16:07 ` Thomas S. Dye
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas S. Dye @ 2013-10-26  2:55 UTC (permalink / raw)
  To: Org-mode

Aloha all,

I've set org-latex-listings-options so:

org-latex-listings-options is a variable defined in `ox-latex.el'.
Its value is (("frame" "lines")
 ("basicstyle" "\footnotesize")
 ("numbers" "left"))

But I'm getting this in the LaTeX output:

\lstset{language=Lisp,label=load-age-relation-data,numbers=none}

I'm expecting:

\lstset{language=Lisp,label=load-age-relation-data,numbers=none,frame=lines,basicstyle=\footnotesize,numbers=left}

Perhaps I'm setting org-latex-listings-options wrong? I'm trying to use
file-local variables:

# Local Variables: 
# eval: (require 'ox-latex)
# eval: (setq org-export-async-init-file (expand-file-name "init-plos.el"))
# org-export-in-background: t 
# org-export-async-debug: t 
# org-fontify-quote-and-verse-blocks: t 
# org-entities-user: nil
# org-latex-listings: 'listings
# eval: (setq org-latex-listings-options
#        '(("frame" "lines")
#          ("basicstyle" "\footnotesize")
#          ("numbers" "left")))
...
# End:

Also, when I tried to add the following pair to the options, the \t was
interpreted as a TAB.

("numberstyle" "\tiny")

I tried "\\tiny", but that didn't work, either.

Any help much appreciated.

All the best,
Tom
-- 
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com

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

* Re: Can't get listings to work
  2013-10-26  2:55 Can't get listings to work Thomas S. Dye
@ 2013-10-26 16:07 ` Thomas S. Dye
  2013-10-26 19:04   ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas S. Dye @ 2013-10-26 16:07 UTC (permalink / raw)
  To: Org-mode

Apologies for the noise. I'm exporting two documents with different
requirements and put the configuration in the wrong place. Now that it
is in the right place, all works as it should.

Is the docstring for org-latex-listing-options correct? I had to use
double backslashes instead of the single backslashes shown in the
docstring. 

Tom

tsd@tsdye.com (Thomas S. Dye) writes:

> Aloha all,
>
> I've set org-latex-listings-options so:
>
> org-latex-listings-options is a variable defined in `ox-latex.el'.
> Its value is (("frame" "lines")
>  ("basicstyle" "\footnotesize")
>  ("numbers" "left"))
>
> But I'm getting this in the LaTeX output:
>
> \lstset{language=Lisp,label=load-age-relation-data,numbers=none}
>
> I'm expecting:
>
> \lstset{language=Lisp,label=load-age-relation-data,numbers=none,frame=lines,basicstyle=\footnotesize,numbers=left}
>
> Perhaps I'm setting org-latex-listings-options wrong? I'm trying to use
> file-local variables:
>
> # Local Variables: 
> # eval: (require 'ox-latex)
> # eval: (setq org-export-async-init-file (expand-file-name "init-plos.el"))
> # org-export-in-background: t 
> # org-export-async-debug: t 
> # org-fontify-quote-and-verse-blocks: t 
> # org-entities-user: nil
> # org-latex-listings: 'listings
> # eval: (setq org-latex-listings-options
> #        '(("frame" "lines")
> #          ("basicstyle" "\footnotesize")
> #          ("numbers" "left")))
> ...
> # End:
>
> Also, when I tried to add the following pair to the options, the \t was
> interpreted as a TAB.
>
> ("numberstyle" "\tiny")
>
> I tried "\\tiny", but that didn't work, either.
>
> Any help much appreciated.
>
> All the best,
> Tom

-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: Can't get listings to work
  2013-10-26 16:07 ` Thomas S. Dye
@ 2013-10-26 19:04   ` Nicolas Goaziou
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2013-10-26 19:04 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Org-mode

Hello,

tsd@tsdye.com (Thomas S. Dye) writes:

> Is the docstring for org-latex-listing-options correct? I had to use
> double backslashes instead of the single backslashes shown in the
> docstring.

You're right. I fixed it.

Thank you.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2013-10-26 19:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-26  2:55 Can't get listings to work Thomas S. Dye
2013-10-26 16:07 ` Thomas S. Dye
2013-10-26 19:04   ` Nicolas Goaziou

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