From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: Is it possible to "properly" indent inside latex fragments? Date: Mon, 23 Jan 2017 08:44:05 -0800 Message-ID: References: <22662.9637.821790.492211@frac.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVhj6-00040v-08 for emacs-orgmode@gnu.org; Mon, 23 Jan 2017 11:44:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVhj1-0004Fm-3T for emacs-orgmode@gnu.org; Mon, 23 Jan 2017 11:44:16 -0500 Received: from iport-acv6-out.ucsd.edu ([132.239.0.13]:1427) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1cVhj0-0004Dp-MV for emacs-orgmode@gnu.org; Mon, 23 Jan 2017 11:44:11 -0500 In-Reply-To: <22662.9637.821790.492211@frac.u-strasbg.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: Alain Cochard Cc: emacs-orgmode@gnu.org On Mon, 23 Jan 2017, Alain.Cochard@unistra.fr wrote: > > Hello. > > This is what I obtain if I type each line followed by and then > in an org file: > > * foo > \begin{displaymath} > \begin{split} > a &= b \\ > &+c > \end{split} > \end{displaymath} > > If I highlight everything and use 'M-x indent-region' or 'M-x > org-indent-region', it does not change. > > Instead, what I would like to get is: > > * foo > \begin{displaymath} > \begin{split} > a &= b \\ > &+c > \end{split} > \end{displaymath} > > (That specific indentation for the latex instructions is what I obtain > within a .tex file.) > > Is it possible? 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