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 qFcAI9csSGOAKwAAbAwnHQ (envelope-from ) for ; Thu, 13 Oct 2022 17:20:55 +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 CF4mI9csSGMMXgAA9RJhRA (envelope-from ) for ; Thu, 13 Oct 2022 17:20:55 +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 17E954004B for ; Thu, 13 Oct 2022 17:20:55 +0200 (CEST) Received: from localhost ([::1]:40436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oj010-0004vA-2S for larch@yhetil.org; Thu, 13 Oct 2022 11:20:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oizz7-0004uj-IR for emacs-orgmode@gnu.org; Thu, 13 Oct 2022 11:18:57 -0400 Received: from ciao.gmane.io ([116.202.254.214]:40340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oizz5-00024b-UH for emacs-orgmode@gnu.org; Thu, 13 Oct 2022 11:18:57 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1oizz4-0002k1-4M for emacs-orgmode@gnu.org; Thu, 13 Oct 2022 17:18:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: [PATCH] ox-latex: Use \empty instead of \relax after \\ Date: Thu, 13 Oct 2022 22:18:47 +0700 Message-ID: References: <784cf8be450b7d676ddd60214cc847db@posteo.net> <87zge1smmd.fsf@localhost> <7581529d3dbf83cb799b32da863de76b@posteo.net> <877d15sds9.fsf@localhost> <87tu48tpb0.fsf@localhost> <87wn93re80.fsf@t14.reltub.ca> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------3qE0V0bcWTuw3HJmENR8Ggiy" 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: <87wn93re80.fsf@t14.reltub.ca> 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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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=1665674455; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=KqW92+7W0603AUktjqhA4SPOx8Cf5XtE1nfeYF8U5Ow=; b=u28LdgHdxoCxz+A7ljSVz+sy998EpIG/jtxrLlR95y6OUqoc+Fg7kqq6KN8TDUhaDZNDlW Qy8fLp3QfwhNTR1TlJ+b9vKQjyKojuvCiSGqR4ahTfwZQJd0lYOc0IgJnvagjQo5XvmiGF I2vGFoNoxJ2zK6ylaRHNcgVCEe8xRx4iIE1gUVF2LdlfOd6sI2dp8fl8RlSdtgjNZu4W8U dnswGRnVx2ZYUnkrHC0m4F6/MnlejMyNVaPlxrvIwvfbtX4+kEiBeF1qlP9enOdOyOmGW4 xzoC24D9fefR44tqz3EkK9PLKGx1JRsEMrkrnJWy7eYybPCXlRpYAfmrasRyOQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665674455; a=rsa-sha256; cv=none; b=pzA8uo0xiqgs2HG5jsSZw5F1mkN4XJFU6V+rodauFP9imyQikSg4qZAuBR9yR2LIZtKxLr rF8XG1ZoiFzyQAu7BQgUxYleZIQNlvCkZAdpawKmV5f2BhDbsJgxPpzLEUw6QMbs0rPOsV g9LBG2O/37ctXqEEsvJEl+8PEDg8b7Dg87FJSvrD4jdDkz1wbuH41XyA/zRGk+LXNwQ+TR diycuMDduGhadWl5sZ8uM2K/U2pvH3CUD3YwmZ5P99dS20F5jhCfGgTvOz5qi2rKOaIS1k akAh3A+UFvFxPHBtMHphQlQtTXztODvpNyYkdOtEBOHrZN1B2VWBGGtAFa1f+Q== 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: 5.40 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: 17E954004B X-Spam-Score: 5.40 X-Migadu-Scanner: scn1.migadu.com X-TUID: +YSDe3EmWKo0 This is a multi-part message in MIME format. --------------3qE0V0bcWTuw3HJmENR8Ggiy Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 13/10/2022 21:27, Leo Butler wrote: > > Maybe Org should not use \\ to end lines in a latex-exported table? > The fact that it has many variations argues against its use in Org, IMO. > > My suggestion is to use the TeX command \cr. Various LaTeX packages may redefine \\, so low level \cr might be not enough. Actually I do not like that \\ does not have a robust counterpart with no optional arguments. > Or, define a command in the exported latex, something like > > \newcommand{\orgcr}{\cr} It is better to make `org-latex-line-break-safe' a user option instead of a constant. For a record. Unlike \\, \newline does not have optional argument, but {\centering a\\b\par} and {\centering a\newline b\par} are not equivalent. I hope, \empty will behave better than \relax. --------------3qE0V0bcWTuw3HJmENR8Ggiy Content-Type: text/x-patch; charset=UTF-8; name="0001-ox-latex-Use-empty-instead-of-relax-after.patch" Content-Disposition: attachment; filename="0001-ox-latex-Use-empty-instead-of-relax-after.patch" Content-Transfer-Encoding: base64 RnJvbSBkNzlkYTYwZTZkY2ZiMmYzZDdjMGExZjVhYmY5ZWUyYmM2ODRhMTVjIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpJbi1SZXBseS1UbzogPDg3d245M3JlODAuZnNmQHQxNC5yZWx0 dWIuY2E+ClJlZmVyZW5jZXM6IDw4N3duOTNyZTgwLmZzZkB0MTQucmVsdHViLmNhPgpGcm9t OiBNYXggTmlrdWxpbiA8bWFuaWt1bGluQGdtYWlsLmNvbT4KRGF0ZTogVGh1LCAxMyBPY3Qg MjAyMiAyMjowODoyOSArMDcwMApTdWJqZWN0O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