From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 2LLcBm70S2NHagEAbAwnHQ (envelope-from ) for ; Sun, 16 Oct 2022 14:09: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 mp12.migadu.com with LMTPS id wK2fBm70S2OAaAAAauVa8A (envelope-from ) for ; Sun, 16 Oct 2022 14:09:18 +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 CCA82B698 for ; Sun, 16 Oct 2022 14:09:17 +0200 (CEST) Received: from localhost ([::1]:54230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ok2SC-0003dp-WD for larch@yhetil.org; Sun, 16 Oct 2022 08:09:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ok2Rl-0003Zt-QZ for emacs-orgmode@gnu.org; Sun, 16 Oct 2022 08:08:49 -0400 Received: from mout02.posteo.de ([185.67.36.66]:38207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ok2Rj-0005ON-VN for emacs-orgmode@gnu.org; Sun, 16 Oct 2022 08:08:49 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id ED4AA240101 for ; Sun, 16 Oct 2022 14:08:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665922126; bh=uLPxtSgojGbwx7/1uaIPYHQE8mpG515P4v5LrWzlPps=; h=From:To:Cc:Subject:Date:From; b=m+oOs5XT9300WRExHMGOpFkBAOx8wqblOXiaJES5mXRlVjEE20EHkNxMkCYLm0dwC ilh4bL5AkFkpWBuFo5PGzkYNE7AaNEcfGmzuYqMLPb66mMZJX5EazTKSXrT6jRcM9h JP/Z+0kLGMM8MeRLpLpulAggmcBM0xG+3wSDzxos4NIWxwBzeC+NfX93pL4U83qvhf JTRNiDVkGtdOD5Vq2BMSrk0bx6k3BSzW/sd30849fM+mwix8hNOPj3ROVnZZb0HLWY Vbng54/xOPDB3x8IOub9WinYzPEu7NsQbKphXauz15vT+v7HXRjLbIjm/fh9pdz0it I0Unjhc+jUxKA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MqzRx1Y9pz9rxM; Sun, 16 Oct 2022 14:08:45 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko Cc: orgmode Subject: Re: [bug] `org-latex-line-break-safe' breaks the export of verse blocks to LaTeX References: <875ygk6a8z.fsf@posteo.net> <874jw4qwlj.fsf@localhost> Date: Sun, 16 Oct 2022 12:08:42 +0000 In-Reply-To: <874jw4qwlj.fsf@localhost> (Ihor Radchenko's message of "Sun, 16 Oct 2022 03:24:40 +0000") Message-ID: <874jw4j7hx.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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=1665922158; 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=uLPxtSgojGbwx7/1uaIPYHQE8mpG515P4v5LrWzlPps=; b=rQmugcEbvKRB2Sm5iByMOrNaUvTm2kQ4P3wnAWroiM4G6DcSGlD1zZ6RIeIt4CPk11akRs y3Bq06XdQrwErobCOWEv7mv3avPvS3W8b+JWvI4G08EXSVRmxlcQ15wvrejOlFqkiLzgUH dvQAEuWVhW4bvOKXt417L31+L+wXCLBR89wD8wncjDmvMn6YlWQcW7hj93TpLhlkj1k6yE 8KtBnkxXmd3S/bDcRspzELM0oXH46EcHK12q7GbOnF1U+uFibq5UucdF1bccpRcxGUZfj5 XRvJGutGJBb6rsrLCCzkoHllrmsO3REICeoJtCKIaTomUhm9SCZBXyB2VhgFtg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665922158; a=rsa-sha256; cv=none; b=t+miC+sqMrspEc8maf7DXjH36157BL7nzeixsAu0eb2STCi46FX8HVUmnoVlg9ht8YDUID UhSIfoeNLTTZueeAQrjZ9doKlKqd9w4H6Tbj8dD/XPLGgK4mW3UCHLBU7XQqkYi2g9V0lP hMLe7k5iEiSPUAdw9YAemxIdgPEab4jm+mPwEUaGckGmkrKAVvkHw9+y2JgdDZrAN11Rdm 78z4a9VCAV6ZEn32MeDXruHYEYa2wbKfsQXOGTVCbbqxsSeixQ/7t5bRgQ/mFpYIgAmIlM ixduri2trP3KQ+VcuYSAkzBbFHLc3QegjSa/mNE5SAmJl/SsHck4qDErs7DT9g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=m+oOs5XT; 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: -7.20 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=m+oOs5XT; 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: CCA82B698 X-Spam-Score: -7.20 X-Migadu-Scanner: scn0.migadu.com X-TUID: ZeGra9ajaK7L Ihor Radchenko writes: >> And finally, I think that applying a general solution to this problem is >> something that should be done(IMHO) in LaTeX and not in Org, for >> example, with some new package that would protect certain signs or >> through ad hoc LaTeX/Lua code. > > Either way, we will need to use the new package in ox-latex.el. And our > current approach is somewhat better because users can still use direct > LaTeX @@latex:\\@@ if they want to get "\\" exactly. I'm afraid we differ completely on what Org's priorities are at this point. The way I see it, Org shouldn't try to solve LaTeX problems, because Org isn't proficient in LaTeX. This is a known issue in LaTeX, where a leading bracket can be confused with the optional argument of a preceding macro (such as \\ or \linebreak). And it doesn't just happen in this context. It can also happen with environments that have optional arguments, although the case of \\ is the most common and the case of environments depends on how the environment is defined. For this problem, LaTeX has been recommending various *specific* solutions (because the probability of it appearing is very low, luckily), such as enclosing the brackets in two {} or putting a \relax before . In this case Org intends to solve the LaTeX problem, and it does it, in my opinion, poorly, by generalizing a particular solution for what is even an extremely rare problem. This is the typical case that can be easily solved by the user with a macro or an export filter, as I have been doing for a long time, and at no time have I needed anything else. Org must worry about exporting well and offering the necessary tools for that to happen, as it has been doing until now. And the duty of the users is to know reasonably the language to which they export, to the extent of what they want to obtain when they export. Org should not be a substitute for LaTeX: whoever wants to get special things in LaTeX, must know LaTeX. It's that easy. If Org is going to start trying to solve at its own risk all the *specific* problems that can appear in the typical compilation of a LaTeX document, then I prefer to stop using Org and use pure LaTeX from the beginning. And as for the ox-latex.el file, in its current state it is completely unusable for me. At least the user could be offered the possibility of choosing.