emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alain.Cochard@unistra.fr
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org, Alain.Cochard@unistra.fr,
	"Charles C. Berry" <ccberry@ucsd.edu>
Subject: Re: Is it possible to "properly" indent inside latex fragments?
Date: Fri, 3 Feb 2017 01:47:54 +0100	[thread overview]
Message-ID: <22675.54074.657630.758621@frac.u-strasbg.fr> (raw)
In-Reply-To: <87shnxejkk.fsf@nicolasgoaziou.fr>

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

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) | alain.cochard@unistra.fr
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	other threads:[~2017-02-03  0:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 15:47 Is it possible to "properly" indent inside latex fragments? Alain.Cochard
2017-01-23 16:44 ` Charles C. Berry
2017-02-01 19:05   ` Alain.Cochard
2017-02-01 20:34     ` Nicolas Goaziou
2017-02-03  0:47       ` Alain.Cochard [this message]
2017-02-03 21:04         ` Nicolas Goaziou
2017-02-04 12:55           ` Alain.Cochard
2017-03-03  8:14           ` Alain.Cochard
2017-03-03 11:26             ` Nicolas Goaziou
2017-03-03 16:29               ` Alain.Cochard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22675.54074.657630.758621@frac.u-strasbg.fr \
    --to=alain.cochard@unistra.fr \
    --cc=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).