From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: Re: Bug: wrong interpretation of LaTeX [8.2.6 (8.2.6-47-ge3d2c1-elpa @ c:/Users/beffa/.emacs.d/elpa/org-20140526/)] Date: Fri, 25 Jul 2014 22:39:29 +0200 Message-ID: References: <87fvhpjnmf.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAmH6-0001OI-BB for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 16:39:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAmH5-0008MN-8Z for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 16:39:32 -0400 Received: from mail-lb0-x22e.google.com ([2a00:1450:4010:c04::22e]:50527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAmH5-0008MH-0j for emacs-orgmode@gnu.org; Fri, 25 Jul 2014 16:39:31 -0400 Received: by mail-lb0-f174.google.com with SMTP id c11so3791352lbj.19 for ; Fri, 25 Jul 2014 13:39:29 -0700 (PDT) In-Reply-To: <87fvhpjnmf.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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Federico Beffa , emacs-orgmode@gnu.org Of course \[ 1+1 \] is valid LaTeX syntax, just as inline \begin{displaymath} 1+1 \end{displaymath} is valid. In LaTeX you can also separate paragraphs with \par without using any empty line, but that's not very readable and in practice this method is only used when constructing macros. My point is that the two forms have identical meaning in LaTeX, but they are represented differently in org-mode. In my opinion a construct which will be displayed on a line by itself and with some space separating it from the preceding and the following text lines such as "\[ ... \]" would be better represented as a latex-environment and not an inline latex-fragment. In this way the org-mode text representation with proper fill-paragraph handling would be much more readable and consistent with the meaning of the syntax that it borrowed. Regards, Fede On Fri, Jul 25, 2014 at 8:32 PM, Nicolas Goaziou wrote: > Hello, > > Federico Beffa writes: > >> According to the LaTeX manual and reference "LaTeX: A Document >> Preparation System", L. Lamport, \[ ... \] is a short form for a >> displaymath environment. Citing the reference: >> "... Because displayed equations are used so frequently in >> mathematics, LaTeX allows you to type \[ ... \] instead of >> \begin{displaymath} ... \end{displaymath}. ..." >> >> However, org-mode classify \[ ... \] as a latex-fragment, the same as >> \(...\). The two are however very different in LaTeX because, while >> the latter displays some mathematical expression *inline*, the former >> makes its content stand out by putting it on *its own line*. > > AFAIK, LaTeX allows to inline "\[...\]" constructs, so something like > > Some \[1+1\] text > > is perfectly valid. Thus, I think we need to support them. > > The other thing to consider is that having the same syntax for an inline > and a non-inline element could introduce some bugs (e.g. when filling > a paragraph). > > OTOH, allowing inline \[...\] is pretty harmless. > >> What I do not like about this is that "org-fill-paragraph" considers >> the \[ ...\] environment part of a paragraph and therefore the >> environment gets "lost" in the middle of a line. > > This is a minor annoyance, indeed. However, you can use the verbose form > in this case (i.e., "\begin{displaymath}"). > > > Regards, > > -- > Nicolas Goaziou