From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alain.Cochard@unistra.fr Subject: Re: Is it possible to "properly" indent inside latex fragments? Date: Fri, 3 Feb 2017 01:47:54 +0100 Message-ID: <22675.54074.657630.758621@frac.u-strasbg.fr> References: <22662.9637.821790.492211@frac.u-strasbg.fr> <22674.12685.803652.265353@frac.u-strasbg.fr> <87shnxejkk.fsf@nicolasgoaziou.fr> Reply-To: alain.cochard@unistra.fr Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZSBz-0002sU-7n for emacs-orgmode@gnu.org; Thu, 02 Feb 2017 19:57:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZSBw-0002MC-5I for emacs-orgmode@gnu.org; Thu, 02 Feb 2017 19:57:35 -0500 Received: from mailhost.u-strasbg.fr ([130.79.222.219]:33674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZSBv-0002Ly-TV for emacs-orgmode@gnu.org; Thu, 02 Feb 2017 19:57:32 -0500 In-Reply-To: <87shnxejkk.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org, Alain.Cochard@unistra.fr, "Charles C. Berry" Nicolas Goaziou writes on Wed 1 Feb 2017 21:34: > Hello, >=20 > Alain.Cochard@unistra.fr writes: >=20 > > Charles C. Berry writes on Mon 23 Jan 2017 08:44: > > > > > With export blocks you can get close. > > >=20 > > > If you type =3DC-c '=3D inside the following export block, you = will get the=20 > > > contents in a latex buffer. Then indentation and other LATEX/P = mode=20 > > > operations are available. When you exit with another =3DC-c '=3D= the=20 > > > indentation is preserved. > > >=20 > > > #+BEGIN=5FEXPORT latex > > > \begin{displaymath} > > > \begin{split} > > > a &=3D b \\ > > > &+c > > > \end{split} > > > \end{displaymath} > > > #+END=5FEXPORT > > >=20 > > >=20 > > > HTH, > > >=20 > > > Chuck > > > > Thank you very much. Might indeed be helpful on occasion, althoug= h it > > would be rather inconvenient to use it for each such latex fragmen= t. > > > > I had assumed that if Org is able to recognize a latex fragment, i= t > > should be able to use the appropriate indentation (and other latex= > > specific stuff). > > > > I can only hope this will be available in the future! >=20 > For the record, i implemented `org-edit-latex-environment'.=20 >=20 > Basically, it means you can edit the LaTeX code in a new buffer, usi= ng > latex-mode, with C-c ', without using the trick above. Great, thanks a lot. Looking forward to using it (I guess it will be available in the version following 9.0.4=3F). I have one (minor) question/concern, though: will the indentation survive an 'M-x indent-region' or 'M-x org-indent-region'=3F Regards --=20 EOST (=C9cole et Observatoire des Sciences de la Terre)=20 IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr 5 rue Ren=E9 Descartes [bureau 106] | Phone: +33 (0)3 68 85 50 44=20 F-67084 Strasbourg Cedex, France | Fax: +33 (0)3 68 85 01 25 =20=