From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Treat custom environment as verbatim on export Date: Sun, 24 May 2015 19:29:22 +0200 Message-ID: <87pp5psx3h.fsf@gmx.us> References: <87fv6ntyiv.fsf@pank.eu> <878ucedmec.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwZiO-0001tF-TV for emacs-orgmode@gnu.org; Sun, 24 May 2015 13:29:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwZiI-0001KJ-Tt for emacs-orgmode@gnu.org; Sun, 24 May 2015 13:29:32 -0400 Received: from mout.gmx.net ([212.227.15.19]:59744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwZiI-0001K9-JY for emacs-orgmode@gnu.org; Sun, 24 May 2015 13:29:26 -0400 Received: from W530 ([88.21.140.142]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MYOkT-1YayLU1Njt-00VBPh for ; Sun, 24 May 2015 19:29:25 +0200 In-Reply-To: <878ucedmec.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sun, 24 May 2015 17:29:31 +0200") 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: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Rasmus writes: > >> It's a special block, so e.g. org-latex-special-block. But contents is >> already transcoded by the time in arrives to e.g. org-latex-special-block. >> To the extend this should be fixed, one way would be to allow a raw option >> to special blocks (also needed for e.g. #+{begin,end}_equation) and have >> babel insert it as needed. I don't know how easy this is. > > I don't think a ":raw" option for special blocks is worth implementing. > > There are two types or "raw" contents: "protected raw" (i.e., verbatim > contents) and "export-specific raw" (i.e., target language code). For > the former, we already have example blocks (or fixed-width areas) and > for the latter, export blocks. > > A third category exists, "multi-language raw", in which, I think, only > the most trivial cases (those you never really need in practice) would > fit. > > The OP wants special "protected raw" for LaTeX back-end. We could > provide a special attribute for this, e.g., > > #+ATTR_LATEX: :environment "my-verbatim" > > #+BEGIN_EXAMPLE > ... stuff... > #+END_EXAMPLE > > > But this is really only a shortcut for > > #+BEGIN_my-verbatim > #+BEGIN_LATEX > stuff > #+END_LATEX > #+END_my-verbatim > > WDYT? If the end goal is #+BEGIN_my-verbatim #+BEGIN_LATEX stuff #+END_LATEX #+END_my-verbatim Then I think it should be producible with babel via #+begin_src Emacs-lisp :wrap my-verbatim :results latex "stuff" #+end_src However, #+ATTR_LATEX: :environment "my-verbatim" #+BEGIN_EXAMPLE ... stuff... #+END_EXAMPLE Is more general since it also produce sensible output in other backends. Thus, I think passing attr arguments to example blocks may be preferable... Though *if* you are only going for latex export, :wrap my-verbatim :results latex seems more convenient to me. Rasmus -- This message is brought to you by the department of redundant departments