From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Trull Subject: Re: ATTR_LATEX :options ignored for source code Date: Sun, 15 May 2016 23:25:21 -0700 Message-ID: References: <87lh3bwzav.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11414a646bb8af0532efb045 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Bxz-00077P-W0 for emacs-orgmode@gnu.org; Mon, 16 May 2016 02:25:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2Bxy-0000X8-T0 for emacs-orgmode@gnu.org; Mon, 16 May 2016 02:25:23 -0400 Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:36656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2Bxy-0000Wh-Lt for emacs-orgmode@gnu.org; Mon, 16 May 2016 02:25:22 -0400 Received: by mail-oi0-x22b.google.com with SMTP id x201so254557081oif.3 for ; Sun, 15 May 2016 23:25:22 -0700 (PDT) In-Reply-To: <87lh3bwzav.fsf@saiph.selenimh> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Jeff Trull , emacs-orgmode@gnu.org --001a11414a646bb8af0532efb045 Content-Type: text/plain; charset=UTF-8 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 wrote: > Hello, > > Jeff Trull 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 > --001a11414a646bb8af0532efb045 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ah, I see...

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

\beg= in{lstlisting}[commentstyle=3D\bfseries]

Though do= ing 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@nicolasgo= aziou.fr> wrote:
Hello,
Jeff Trull <edaskel@att.net> w= rites:

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

FWIW, I cannot reproduce it. I get

=C2=A0 \lstset{language=3DC++,label=3D ,caption=3D ,captionpos=3Db,numbers= =3Dnone,commentstyle=3D\bfseries}
=C2=A0 \begin{lstlisting}
=C2=A0 using foo_t =3D int;
=C2=A0 struct bar_t {
=C2=A0 =C2=A0 =C2=A0 foo_t a;=C2=A0 =C2=A0 =C2=A0// this comment should be = bold
=C2=A0 };
=C2=A0 \end{lstlisting}

What Org version are you using?

Regards,

--
Nicolas Goaziou

--001a11414a646bb8af0532efb045--