From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8EgWFbpKTWNqogAAbAwnHQ (envelope-from ) for ; Mon, 17 Oct 2022 14:29:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id AOEYFbpKTWPoEgEA9RJhRA (envelope-from ) for ; Mon, 17 Oct 2022 14:29:46 +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 2A3C01C869 for ; Mon, 17 Oct 2022 14:29:46 +0200 (CEST) Received: from localhost ([::1]:32808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okPFY-0006HA-16 for larch@yhetil.org; Mon, 17 Oct 2022 08:29:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okPDz-0006Dp-Ls for emacs-orgmode@gnu.org; Mon, 17 Oct 2022 08:28:07 -0400 Received: from mout01.posteo.de ([185.67.36.65]:39591) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okPDt-0008Le-RA for emacs-orgmode@gnu.org; Mon, 17 Oct 2022 08:28:07 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E0F14240029 for ; Mon, 17 Oct 2022 14:27:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666009679; bh=PgNhjxYeUO195356JgJm3W9hDHNFu0Q1hnyms7oCFUE=; h=From:To:Cc:Subject:Date:From; b=Zy32mAwqNcLjLKZycqbDT4AKzAbq5tfQuzFjBtp9IK+/Yvi4eTwz7KtkVA7yEgU2W Nj7JuNK5tL86noAoFQWPp0G/qai4YB5AtwQFM5FUa4DoBENmK2tLf9OUFz8b7SAg1H NOsKk095cY0Xfu1yzyVxbAw2DEMxlI+3SZsqA1svhaeTO1zhlCnicA0bvHLCX5MTke l0Pwa4Tgf29uBrOo0YkQhGVv+ddWMusWNpDemlIr2AgGxL7regEqF48bTc4Y8zgXVQ ip1L4tFd9J6nJicl2xIgZrh+0HP3Zq8LJd/QfhiP/Z6BH4ZJYj7w5mTRf7IVmXmhAO ZVmycZi45tXnQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mrbqc4XB7z9rxR; Mon, 17 Oct 2022 14:27:56 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko Cc: Daniel Fleischer , Max Nikulin , emacs-orgmode@gnu.org Subject: Re: Line breaks and brackets in LaTeX export References: <875ygk6a8z.fsf@posteo.net> <87a65vitbz.fsf_-_@posteo.net> <87edv6izx4.fsf@localhost> <8735bmelgu.fsf@posteo.net> <874jw2r7s5.fsf@localhost> Date: Mon, 17 Oct 2022 12:27:54 +0000 In-Reply-To: <874jw2r7s5.fsf@localhost> (Ihor Radchenko's message of "Mon, 17 Oct 2022 11:47:38 +0000") Message-ID: <87v8oid48l.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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=1666009786; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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:dkim-signature; bh=ZlqsscfZJB6BiB99DNBYIlprxq3rAP1ZCmuBI0NHy18=; b=HUs+phROJ5avcrMfKjeGV2IVTs0SFu7id1zHwBRqP8i5+XAS9e12ITAHbg5N4hWMWi69ZM ewjHWggYOYlIoZcIakPNj2tRd5oTlsEAGM+Ohyoq/sc7io7UQnKi5ekGBkEnu4amfnuPVu RfjTJzb7akW7pNYjj4l2+1p5BWL0i2LCfPvuQANm7ttRPqLbVLVldvQdLQPI8odoOuTr4E 1dYjzN6nZxuWkJUJgR2uecwxQG+3rQ9t604BY0yrzAeGfOVuIboH01DA45BnE+ZfkTx/DX BJCFC//qKzjz+OOI1zoWsOraNwUquTOkZA5K+05zoarja4Z3hgp2OrsPCbf5gA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666009786; a=rsa-sha256; cv=none; b=GunCdofIGycYoLe1jX6380G3d8Wms4DWYNJ1ErwDm3oZHDEI6kndI2VwGbCBLdguqDfCwq nf/W6hBQd9ULxN+6scLxLNq9D5CnlH68oLBlXKuUHj5UxjpuicL5y856BzBSnyOYlBpU2N gsK3Kc/uHuoi39jj+1IaS84NoCkArglmwqjXcIQBc8bGsMo/9JSVA4YXtHDdpq+5ii0vCb DFRwJPadnFuzBh7quUI/7ZQzfbZdF4AHeEL0SmD8LK3ZaVMbw9u9N+fF2w5q6lbwkJNN02 tuAY8t+3wHLW0msUOp8BmPS7qcwMiKYzEH84QgtI+SgXvvRXOaU+SaNWGpbKyA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Zy32mAwq; dmarc=pass (policy=none) header.from=posteo.net; 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: -9.22 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Zy32mAwq; dmarc=pass (policy=none) header.from=posteo.net; 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: 2A3C01C869 X-Spam-Score: -9.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: W6DyKr+9LjFq Ihor Radchenko writes: > I haven't seen any publication rule that prevents using valid LaTeX > commands like this. Do you have concrete examples? If not, one could > argue that any auto-generated output could break some imaginary rule. No, I don't have any concrete example. But it is one thing to use a valid LaTeX command and another to use it unnecessarily. It's like putting \vspace{0pt} between each paragraph. > I am also wondering how LaTeX documents generated from LyX or TeXmacs > look like. Are they not using some obvious machine-generated constructs? I don't know, because I haven't seen them. But I'd bet (at the risk of losing the bet) that none of those machine-generated constructs produce anything as unnecessary as Org's present solution. The situation now becomes the following: Pandoc: selective solution. In specific cases it returns {[}...{]} Org: non-selective solution = ugly LaTeX code. >> Anyway. As for the compilation, it is highly unlikely that \empty will >> cause any unexpected error. But LaTeX and its over 6000 packages is >> unpredictable. It also seemed unlikely that \relax would cause any >> problems, and catching up on the last discussion, it had to be replaced >> by \empty because it returned an error just before \hline. \relax is one >> of the recommended solutions from LaTeX, because it tells LaTeX that the >> previous macro has finished expanding, but it is recommended keeping in >> mind that the user will apply it only when needed, not everywhere. And >> before \hline it doesn't make sense because there will never be an >> '\\[...]' error. So, in the current situation, we can ask ourselves: is >> \empty everywhere safe? Everything points to yes. Can we be 100% sure? >> ...? > > My answer is: "\\" is 100% not universally safe. Simply because we have > that bug report with [ ... ] items in tables. > So, anything with no concrete counter-example is better as long as we > are reasonably sure that we are not breaking LaTeX conventions. As I said, this is a known LaTeX problem that occurs in a rare case, for which there is a known solution (or several), which should be applied in the specific case. And Org already provides the necessary tools to apply it. >> The only thing I can think of, for a non-selective solution like the >> current one, is the following: if \\ has an optional argument that must >> be a length, then let's give it, but with a value of zero: \\[0pt], which >> is equivalent to putting the value by default (zero) explicitly. > > This has been proposed and then rejected by Max in > https://list.orgmode.org/orgmode/ti5tdb$rd2$1@ciao.gmane.io/ and he > concluded that some side effects are present when using \\[0pt]: > > Max> \\[0pt] > Max> > Max> causes insertion of some code for negative vertical skip (of zero height > Max> this case). It should not be really harmful, but I would avoid this I would like to see some concrete example where this solution was problematic. \\[0pt] is exactly the same as \\ (as for the effects). Redundant but valid.