From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aLpXAwYWWGEIYAAAgWs5BA (envelope-from ) for ; Sat, 02 Oct 2021 10:19:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id uKySOgUWWGF3RwAAB5/wlQ (envelope-from ) for ; Sat, 02 Oct 2021 08:19:17 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 873772C4DE for ; Sat, 2 Oct 2021 10:19:17 +0200 (CEST) Received: from localhost ([::1]:40620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWaEm-0007kK-MW for larch@yhetil.org; Sat, 02 Oct 2021 04:19:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWaD6-0006gC-8k for emacs-orgmode@gnu.org; Sat, 02 Oct 2021 04:17:33 -0400 Received: from ciao.gmane.io ([116.202.254.214]:43820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWaD4-0005Qk-Lk for emacs-orgmode@gnu.org; Sat, 02 Oct 2021 04:17:32 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mWaD3-0008XQ-4V for emacs-orgmode@gnu.org; Sat, 02 Oct 2021 10:17:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Org syntax: \[ \] as block element instead of inline object Date: Sat, 2 Oct 2021 15:17:18 +0700 Message-ID: References: <87czoq7z3p.fsf@gmail.com> <87tui1ew1o.fsf@nicolasgoaziou.fr> <871r5599j7.fsf@gmail.com> <87pmspevjy.fsf@nicolasgoaziou.fr> <87bl49kca3.fsf@gmail.com> <87ee95ekrh.fsf@nicolasgoaziou.fr> <87ilygo4uh.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: <87ilygo4uh.fsf@nicolasgoaziou.fr> Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633162757; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=z0tM1fufldtAe6s+mU1BVp8woKW+3lz1TvK4Ibl/Npk=; b=a5iNLgHjuowQJMiZY5E+ND/MuPE10m90gOY+fMDsBhp5SNa1myJYdutDXCwN+F/PdkYJ94 TERezkeXLGvxtl3dEcU5wl1xxqrseiaSuDLOZbsGOIdrRB5qBYHqS3qnkUZfXn4+BQA8/l b7U76M1r14KlBynuBT7pBFxR5Mz27JuEjBN9DlVoLmT6b6iMYhekRAV6OmeOsT/AwVouQX smsffF8MuON5R2wieg7CmRzNfdBUVLyZgOmkffK2Y5hQ5WlZiGKAH1znW6NZL7byFxLlyV vRWkifI1xL38HtFEL1iccWwMQyOOZbrdvxDHCyqmPqpw91E/fnsZ0Utz4Wslgw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633162757; a=rsa-sha256; cv=none; b=as2n7yS1isLGz7YmeRYRiOTx3FzCZPRKhIZQTebxDnzPL6sFA5JUUg9oJFUITljI0yYysw e/g6m8xvKexHY1URe+bwiVzEDAhzVGMaKZs0ESfdMLkzQTRCGm2dEpQ/rYRi61c+LcQAaA QF9SWO8zdeomCJfDuq/YBe/GiySPWuvw9rrMBCUu8EWMy0YSuef/6bKMAB9ACG6albYTIe 5lo+oPKBtxH25cJwWtU3qp3R0By7liMBcySbKsYLryeSRfwccra3XH6VBM9amkG9g1QdA6 Gw4QpSx6OlnVD6rYfFt91VthH5OwFoMzSYw7ZefDwspMKFh2ZFAxUiZ10LNWJQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -0.71 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 873772C4DE X-Spam-Score: -0.71 X-Migadu-Scanner: scn1.migadu.com X-TUID: Rxr0nTMmoXYZ I like Timothy's idea that \[ \] markup should behave like block-level element rather than inline object. On the other hand, Nicolas convinced me that the problem is not only with filling paragraphs in Emacs using M-q and it requires change of Org grammar. That is why I do not think that suggested patch should be applied. Although Org has its own syntax, \[ \] constructs are added for LaTeX snippets, so unless there is a strong reason, such construct should not be a surprise for users familiar with LaTeX. As it pointed out by Nicolas, the following is a compatibility issue with such change. The following will be invalid Org structure, however the problem is hidden in the case of exporting to LaTeX: A \[ 1 \ne 2, \] B It should be typed as A \[ 1 \ne 2, \] B or A \[ 1 \ne 2, \] B On 02/10/2021 03:41, Nicolas Goaziou wrote: > >> I wonder, why it is not a block element. As far as I know, the only >> difference (even in the context of Org) between \(...\) and \[...\] >> is, that the former denotes inline math and the latter denotes a math >> block. And at least exporting to HTML (with MathJax) and LaTeX results >> in a block equation for \[...\]. > > That's not true. Only some export back-ends can tell the difference > between \(...\) and \[...\], so in the context of Org, they are the > same. Is there a valid use case for that backends, so they should not consider \[ \] as a block-level element? Otherwise I would tell that it is a bug in that backend and in Org parser. >> Do you have a short summary or a pointer why \[...\] has been choosen >> to be an inline element? > > Yes: habit. Also, I don't think LaTeX treats it as a block element. > E.g., > > text > \[1+1=3\] > text > > is a single paragraph in LaTeX. It is a single LaTeX paragraphs assembled in vertical mode from parts created in horizontal or math mode. Splitting text into lines (in horizontal mode) is performed for each part of paragraph independently. So LaTeX paragraph is more like "greater element" than just "element". There is no of similar concept in HTML + CSS, there are blocks and inline parts. Formatting like paragraph indents and vertical spacing between paragraphs may be achieved with CSS rules. Visually formatted paragraph may contain several block-level elements. P.S. Examples of HTML vs. LaTeX paragraphs in Org export that were not intuitive for me: https://list.orgmode.org/orgmode/sd9h2q$t9a$1@ciao.gmane.io/T/#u