From: Norman Walsh <ndw@nwalsh.com>
To: emacs-orgmode@gnu.org
Subject: Confused about src vs example and LaTeX export
Date: Sun, 05 Jan 2020 10:53:10 +0000 [thread overview]
Message-ID: <m2o8vi2mzt.fsf@nwalsh.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]
Hello again,
I’m confused about the distinction between BEGIN_EXAMPLE and BEGIN_SRC
and LaTeX export. I tend to use BEGIN_SRC more often because I’m
taking advantage of Babel output.
Consider this file:
#+TITLE: Test Org File
This is an example.
* Simple environments
#+BEGIN_EXAMPLE emacs-lisp
(+ 3 4)
#+END_EXAMPLE
#+BEGIN_SRC emacs-lisp
(+ 3 4)
#+END_SRC
* LaTeX attributes
#+ATTR_LATEX: :environment lstlisting
#+BEGIN_EXAMPLE emacs-lisp
(+ 3 4)
#+END_EXAMPLE
#+ATTR_LATEX: :environment lstlisting
#+BEGIN_SRC emacs-lisp
(+ 3 4)
#+END_SRC
In the simple case, both EXAMPLE and SRC export as {verbatim}
environments; that’s fine as a default. In the second case, the
ATTR_LATEX request for the {lstlisting} environment works on EXAMPLE
but appears to be ignored on SRC.
To confound me further, setting org-latex-custom-lang-environments
doesn’t seem to have any effect in either case.
(setq org-latex-custom-lang-environments
'((emacs-lisp "lstlisting")))
I’m not sure what I’m overlooking.
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | There has never been a perfect
http://nwalsh.com/ | government, because men have passions;
| and if they did not have passions,
| there would be no need for
| government.--Voltaire
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next reply other threads:[~2020-01-05 10:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-05 10:53 Norman Walsh [this message]
2020-01-06 7:10 ` Confused about src vs example and LaTeX export Fraga, Eric
2020-01-06 9:43 ` Norman Walsh
2020-01-06 14:16 ` Fraga, Eric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2o8vi2mzt.fsf@nwalsh.com \
--to=ndw@nwalsh.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.