emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Is it possible to "properly" indent inside latex fragments?


From: Alain . Cochard
Subject: Re: [O] Is it possible to "properly" indent inside latex fragments?
Date: Fri, 3 Feb 2017 01:47:54 +0100

Nicolas Goaziou writes on Wed  1 Feb 2017 21:34:
 > Hello,
 > 
 > address@hidden 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.

Great, thanks a lot.  Looking forward to using it (I guess it will be
available in the version following 9.0.4?).  I have one (minor)
question/concern, though: will the indentation survive an 'M-x
indent-region' or 'M-x org-indent-region'?

Regards


-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | address@hidden
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France    | Fax:   +33 (0)3 68 85 01 25     


reply via email to

[Prev in Thread] Current Thread [Next in Thread]