emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ATTR_LATEX :options ignored for source code
@ 2016-05-14 21:09 Jeff Trull
  2016-05-15  7:33 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Trull @ 2016-05-14 21:09 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 394 bytes --]

According to the manual users can supply #+ATTR_LATEX: :options ... prior
to a source section and the options present will be supplied to the
environment (lstlistings in my case).  I find that this does not work -
regardless of settings, no options are supplied to the lstlistings
environment.  Attached is a test case that demonstrates the problem.  It is
taken from the manual.

Thanks,
Jeff

[-- Attachment #1.2: Type: text/html, Size: 468 bytes --]

[-- Attachment #2: testcase.org --]
[-- Type: application/octet-stream, Size: 342 bytes --]

#+TITLE: Beamer Export Test Case
#+LATEX_CLASS: beamer
#+LATEX_CLASS_OPTIONS: [aspectratio=1610]
#+OPTIONS: H:3 toc:t
#+BEAMER_THEME: PaloAlto


* First Level
** Second Level
*** Slide
#+ATTR_LATEX: :options commentstyle=\bfseries
#+begin_src C++
using foo_t = int;
struct bar_t {
    foo_t a;     // this comment should be bold
};
#+end_src

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

* Re: ATTR_LATEX :options ignored for source code
  2016-05-14 21:09 ATTR_LATEX :options ignored for source code Jeff Trull
@ 2016-05-15  7:33 ` Nicolas Goaziou
  2016-05-16  6:25   ` Jeff Trull
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2016-05-15  7:33 UTC (permalink / raw)
  To: Jeff Trull; +Cc: emacs-orgmode

Hello,

Jeff Trull <edaskel@att.net> writes:

> According to the manual users can supply #+ATTR_LATEX: :options ... prior
> to a source section and the options present will be supplied to the
> environment (lstlistings in my case).  I find that this does not work -
> regardless of settings, no options are supplied to the lstlistings
> environment.  Attached is a test case that demonstrates the problem.  It is
> taken from the manual.

FWIW, I cannot reproduce it. I get

  \lstset{language=C++,label= ,caption= ,captionpos=b,numbers=none,commentstyle=\bfseries}
  \begin{lstlisting}
  using foo_t = int;
  struct bar_t {
      foo_t a;     // this comment should be bold
  };
  \end{lstlisting}

What Org version are you using?

Regards,

-- 
Nicolas Goaziou

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

* Re: ATTR_LATEX :options ignored for source code
  2016-05-15  7:33 ` Nicolas Goaziou
@ 2016-05-16  6:25   ` Jeff Trull
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Trull @ 2016-05-16  6:25 UTC (permalink / raw)
  To: Jeff Trull, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

Ah, I see...

I was expecting the "option to the environment" to look like:

\begin{lstlisting}[commentstyle=\bfseries]

Though doing it with \lstset will produce the same result if the option is
placed at the end, which it is.

Thanks for your help,
Jeff

On Sun, May 15, 2016 at 12:33 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Jeff Trull <edaskel@att.net> writes:
>
> > According to the manual users can supply #+ATTR_LATEX: :options ... prior
> > to a source section and the options present will be supplied to the
> > environment (lstlistings in my case).  I find that this does not work -
> > regardless of settings, no options are supplied to the lstlistings
> > environment.  Attached is a test case that demonstrates the problem.  It
> is
> > taken from the manual.
>
> FWIW, I cannot reproduce it. I get
>
>   \lstset{language=C++,label= ,caption=
> ,captionpos=b,numbers=none,commentstyle=\bfseries}
>   \begin{lstlisting}
>   using foo_t = int;
>   struct bar_t {
>       foo_t a;     // this comment should be bold
>   };
>   \end{lstlisting}
>
> What Org version are you using?
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 1805 bytes --]

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

end of thread, other threads:[~2016-05-16  6:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-14 21:09 ATTR_LATEX :options ignored for source code Jeff Trull
2016-05-15  7:33 ` Nicolas Goaziou
2016-05-16  6:25   ` Jeff Trull

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