From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Is it possible to "properly" indent inside latex fragments? Date: Wed, 01 Feb 2017 21:34:51 +0100 Message-ID: <87shnxejkk.fsf@nicolasgoaziou.fr> References: <22662.9637.821790.492211@frac.u-strasbg.fr> <22674.12685.803652.265353@frac.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZ1cF-00008A-GF for emacs-orgmode@gnu.org; Wed, 01 Feb 2017 15:34:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZ1cE-00051U-JD for emacs-orgmode@gnu.org; Wed, 01 Feb 2017 15:34:55 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:42639) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cZ1cE-0004wq-Bn for emacs-orgmode@gnu.org; Wed, 01 Feb 2017 15:34:54 -0500 In-Reply-To: <22674.12685.803652.265353@frac.u-strasbg.fr> (Alain Cochard's message of "Wed, 1 Feb 2017 20:05:49 +0100") 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: Alain.Cochard@unistra.fr Cc: emacs-orgmode@gnu.org, "Charles C. Berry" Hello, Alain.Cochard@unistra.fr writes: > Charles C. Berry writes on Mon 23 Jan 2017 08:44: > > > With export blocks you can get close. > > > > If you type =C-c '= inside the following export block, you will get the > > contents in a latex buffer. Then indentation and other LATEX/P mode > > operations are available. When you exit with another =C-c '= the > > indentation is preserved. > > > > #+BEGIN_EXPORT latex > > \begin{displaymath} > > \begin{split} > > a &= b \\ > > &+c > > \end{split} > > \end{displaymath} > > #+END_EXPORT > > > > > > HTH, > > > > Chuck > > Thank you very much. Might indeed be helpful on occasion, although it > would be rather inconvenient to use it for each such latex fragment. > > I had assumed that if Org is able to recognize a latex fragment, it > should be able to use the appropriate indentation (and other latex > specific stuff). > > I can only hope this will be available in the future! For the record, i implemented `org-edit-latex-environment'. Basically, it means you can edit the LaTeX code in a new buffer, using latex-mode, with C-c ', without using the trick above. Regards, -- Nicolas Goaziou