From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iBVoO5SHTWM5qQAAbAwnHQ (envelope-from ) for ; Mon, 17 Oct 2022 18:49:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kO97O5SHTWPhhQEA9RJhRA (envelope-from ) for ; Mon, 17 Oct 2022 18:49:24 +0200 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 B98C7327E1 for ; Mon, 17 Oct 2022 18:49:24 +0200 (CEST) Received: from localhost ([::1]:49004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okTIn-00050O-Ik for larch@yhetil.org; Mon, 17 Oct 2022 12:49:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okTGv-0004xo-Px for emacs-orgmode@gnu.org; Mon, 17 Oct 2022 12:47:27 -0400 Received: from ciao.gmane.io ([116.202.254.214]:59452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okTGs-0002hJ-W3 for emacs-orgmode@gnu.org; Mon, 17 Oct 2022 12:47:24 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1okTGp-00082B-1h for emacs-orgmode@gnu.org; Mon, 17 Oct 2022 18:47:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: Line breaks and brackets in LaTeX export Date: Mon, 17 Oct 2022 23:46:17 +0700 Message-ID: References: <875ygk6a8z.fsf@posteo.net> <87a65vitbz.fsf_-_@posteo.net> <87edv6izx4.fsf@localhost> <8735bmelgu.fsf@posteo.net> <878rlecx49.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US In-Reply-To: <878rlecx49.fsf@posteo.net> 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.25, NICE_REPLY_A=-0.001, 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.29 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 X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666025364; 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=hjomiMpgWnFr3RlY7PfHFlDOtus5gNWdO6WvKOe6aXU=; b=q9Q2C0Yk+V5jLz44MViPVeZ6BFVuz2FsWnuttrN+vGQS2xZpWQQ6i+dgv+Nnt7MRh3ZVp2 +k3ryOo0TKCpkOiWKBOFGF3wDMP3SgA+g59Gy/NPkKRDj4sKXKZhf3LnNjmtHHKRh4KFtj 1zKrxWxR1Bd+zJOdXiwGC1fhlit3UtCgtE/tZ57DNvcrpXsKqYRtDwJeWYy9v6fVLGoDYv tflN++kvbMTmd3lqVSkPkhz7refyfLLVVcugerZ/v8daWJD+aZqUGLj4MclLQvPWznkbKa 1bOpBSIKeI3T1ksHQLJNTxhb+hOMu/zSK7kZlMJAtq3kOQUVo8FZywrvYkeObQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666025364; a=rsa-sha256; cv=none; b=TGwdjQ5pfutXfPUBLkZ/pif9CJdbcpxfDW4tI1/6OD7p89jAj2yV4J7+syJnbLfsq765A9 VTHollqCoqrsqmGsC6ld2wjwh7mI0FO8VglCtdcUgF9bAst/x2mxEWEG/szjvKelgdiKeW 9TQuHLmTn3PxVd4oq2uwyS6ztJYYI+hMVhpB/ENqlxhg9BUG3BGVwPCUGE8qNQ2R/emcRT ryOfSY5Rk40XVWf97tv7popBUvemosYteWFnMm3HbMym4dNnjYb1m5MBpfar69UtAC6vip ycp+URggmqP8q3eo75q3s0HLGF+qIhK+VD8b7GsSL2MSLeqv5LMmOKtJAGH8PQ== 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+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.28 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+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B98C7327E1 X-Spam-Score: 4.28 X-Migadu-Scanner: scn1.migadu.com X-TUID: 9iBH4ONPwr2v On 17/10/2022 22:01, Juan Manuel MacĂ­as wrote: > > \documentclass{article} > \usepackage{tabularray} LaTeX I have installed is too old for this package. It is marked as "Experimental LaTeX3", so I am unsure, maybe you have found a bug in this package. https://ctan.org/pkg/tabularray You believe that an issue with brackets is extremely rare. It may be true for humanitarian texts. For some users it may be a constant source of pain e.g. in the case of interval notation as [a,b]. I have already mentioned tables generated by code blocks, not typed directly. I can not say that I often need to export my notes, but I was afraid that I will be bitten by this bug because I may try to put dates close to left margin: - Something\\ [2022-10-17 Mon] By default dates wrapped into \textit, but it may be customized to just "%s". Selectively adding some workaround require complete reimplementation of exporters. I have some curiosity concerning pandoc approach, but I am unsure if I will reserve some time to read its code. An idea how to avoid complete redesign: at first add something like %__ORG_PROTECT_NEWLINE__ after each \\, later at an optimizing pass remove the comment if next line does not start from a star or a square bracket, otherwise use some workaround, e.g. "{[}". \relax may be suitable as well (in the beginning of rows, not after \\). I do not like approach with a custom command. It is effectively the same as adding \empty but \\ may be redefined by some packages, so I strongly prefer to keep \\ in exported markup. Redefining of \\ is a way to new issues. I do not feel firm ground with a command that will expand to \\. I am afraid that \\ may still consume following "[" unless \empty or its equivalent is added after it. I am completely unsure concerning tabularray parser that does not rely on TeX primitives. I found \empty when I was looking for an approach with minimal overhead. I expect that e.g. \\[0pt] may have higher performance penalty since it is expanded to several commands. When the idea with "\\\relax" failed I was choosing between "\\{}" and "\\\empty". I decided that the latter minimizes risk to add spurious space. Some problems: I do not see a way to add some LaTeX code between table lines. Semi-verbatim environment may be a source of new bugs. They may be rather selective in respect to what they consider a command and what is passed as raw text. tabularray perhaps is similar in this sense.