From mboxrd@z Thu Jan 1 00:00:00 1970 From: Norman Walsh Subject: Confused about src vs example and LaTeX export Date: Sun, 05 Jan 2020 10:53:10 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:45505) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1io3X4-00070X-MK for emacs-orgmode@gnu.org; Sun, 05 Jan 2020 05:53:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1io3X3-0006Ua-51 for emacs-orgmode@gnu.org; Sun, 05 Jan 2020 05:53:18 -0500 Received: from outbound1g.eu.mailhop.org ([52.28.6.212]:38518) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1io3X2-0006U6-Te for emacs-orgmode@gnu.org; Sun, 05 Jan 2020 05:53:17 -0500 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: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello again, I=E2=80=99m confused about the distinction between BEGIN_EXAMPLE and BEGIN_= SRC and LaTeX export. I tend to use BEGIN_SRC more often because I=E2=80=99m 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=E2=80=99s 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=E2=80=99t seem to have any effect in either case. (setq org-latex-custom-lang-environments '((emacs-lisp "lstlisting"))) I=E2=80=99m not sure what I=E2=80=99m overlooking. Be seeing you, norm =2D-=20 Norman Walsh | 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE1ury//rzuvqf7fN/hVWfHhJMAHkFAl4RwBYACgkQhVWfHhJM AHl0lA//fg/55MLQYU2e8U79iflAl04T9iptSPLMXvBM/LQjaU8INMW1WplTXa0s 5rIgxnuwgoz27r9evHDXq9B353UBwHsgRl6/CtuDC/ldaDU7lh6o3PjCHW+a1jqh 5m0JxJxy5vYn9K3MEC7Ma2QCPO+jblm42dx2/wH19NsZkFE7PjDk2FxUB16fIxNo iU8kmSHyjA3FUiNUAW+E7MGmwkb8ZCSc14yiAYRJlwcqikgdRRi76VvpuXyYt72y fGUWGemOutMIdbLQN+EEJ/9qKCaIBtBYj4RL0/m8UTNMW11EOURZomxnvAOuW+L0 P7yPdeRuJy71tXbd8hLYmyUL8qkuke/j4QwNVwaGeY10Jj3RiQD6HlgD9wZxaNt2 lWeVKsN73OrG+tZd3u7lLA8oJFmjjLqivAbg2dnxm2uQsHSuw/XxeSX/8L8bNU5z pNsxfR3WCPFkFAA1TR1ztFu+j6nxpQD4bXkV3KSXBLJhkVt9oUz528VLWC1lC6cj qBUorXr/Ljr27SUODuFdjmTbmFMUOT4NC6zcjtkRb2UXvPWGAJxnsACnUPAJG65f VybCVRsw2+4v6+c+xpFsDPTr+ScXHhvfyE7prQhU2WHTqpZBBq3dya+hNyFA8eRb x7Z8bytq+J5zGxZFgUoaHo5CNeprWoXO0XhNECy6i4y2/10c5u8= =qG5q -----END PGP SIGNATURE----- --=-=-=--