From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joon Ro Subject: Re: Remove notes blocks from latex export Date: Sun, 3 Jan 2016 16:28:19 -0600 Message-ID: References: , <871t9zu36k.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_75dab023-a3bb-406f-a87b-daf7c876a57a_" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFr8T-000496-CS for emacs-orgmode@gnu.org; Sun, 03 Jan 2016 17:28:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aFr8Q-0004Zj-6H for emacs-orgmode@gnu.org; Sun, 03 Jan 2016 17:28:25 -0500 Received: from col004-omc2s7.hotmail.com ([65.55.34.81]:58710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aFr8P-0004Zb-Tv for emacs-orgmode@gnu.org; Sun, 03 Jan 2016 17:28:22 -0500 In-Reply-To: <871t9zu36k.fsf@mbork.pl> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marcin Borkowski Cc: "emacs-orgmode@gnu.org" --_75dab023-a3bb-406f-a87b-daf7c876a57a_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > A simple derived exporter? Or (on the LaTeX side) the comment package? >=20 Thank you. I managed to achieve this with the following code: (defun my/latex-remove-NOTES-blocks (text backend info) "Filter special bl= ocks from latex export." (when (eq backend 'latex) (if (string/starts-= with text "\\begin{NOTES}") ""))) (eval-after-load 'ox '(add-to-list 'org-export-filter= -special-block-functions 'my/latex-remove-NOTES-block= s)) This was the first emacs-lisp code that I wrote with knowing what I was doi= ng. :) Best=2CJoon = --_75dab023-a3bb-406f-a87b-daf7c876a57a_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
>=3B A simple derived exp= orter? Or (on the LaTeX side) the comment package?
>=3B

Thank you. I managed to achieve this with the following code:

(defun my/latex-remove-NOTES-blocks (text backe= nd info)
 =3B "Filter special blocks from latex export."
 =3B (when (eq backend 'latex) =3B
 =3B  = =3B (if (string/starts-with text "\\begin{NOTES}") "")))

(eval-after-load 'ox '(add-to-list
 =3B  =3B  = =3B  =3B  =3B  =3B  =3B  =3B  =3B  =3B  =3B=  =3B'org-export-filter-special-block-functions
 =3B &nbs= p=3B  =3B  =3B  =3B  =3B  =3B  =3B  =3B  = =3B  =3B  =3B'my/latex-remove-NOTES-blocks))
=

This was the first emacs-lisp code that I wro= te with knowing what I was doing. :)

Best=2C
=
Joon
= --_75dab023-a3bb-406f-a87b-daf7c876a57a_--