From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 WAlUMeWNU2OGPgEAbAwnHQ (envelope-from ) for ; Sat, 22 Oct 2022 08:29:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cKxNMeWNU2P7QQEAauVa8A (envelope-from ) for ; Sat, 22 Oct 2022 08:29:57 +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 8E203B96D for ; Sat, 22 Oct 2022 08:29:57 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1om6qK-0004xI-JO; Sat, 22 Oct 2022 01:14:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1om6qI-0004vQ-G4 for emacs-orgmode@gnu.org; Sat, 22 Oct 2022 01:14:42 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1om6qE-0004YA-BS for emacs-orgmode@gnu.org; Sat, 22 Oct 2022 01:14:42 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id F0909240103 for ; Sat, 22 Oct 2022 07:14:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666415675; bh=epy9G2dxwgU+9GnAkGt1YlfT6JG+ioVPAYcKM1lBpHs=; h=From:To:Cc:Subject:Date:From; b=WriukJzkD4kOG0CxFN7c0ePoYYOgMZ5MMy6BVwkPAnBxnQo8oEOug4aKcmaiik2+1 fzUmFCy1b6Cm2j9+LtneJuQw2LTYfRCmQzaD6t/jtlQVAE+snP1hY1OXQnv4E5kJCK bx8ghXKZUGU6fg2nkgohJXCLlsroAhbLoggGmtpKfX8WEO+MstcXJdFlrQBRnWOiUh +9ZRJ501siRdOefI9+AT85Bb3gCr8yh4i/83RQgT7J8E3+srStx8XluJ4FGVsHL7Ls wkFMjEbDk0zhuoTtjXqt6vgZ09KY2kPeyaRa/L8rYk9LMsNTMNHUz/Rt1MX0tBKn7L 9aL6sFJzYXagw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MvTzF2P0pz6tr5; Sat, 22 Oct 2022 07:14:33 +0200 (CEST) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: Line breaks and brackets in LaTeX export In-Reply-To: References: <875ygk6a8z.fsf@posteo.net> <87a65vitbz.fsf_-_@posteo.net> <87edv6izx4.fsf@localhost> <8735bmelgu.fsf@posteo.net> <878rlecx49.fsf@posteo.net> <87h701hhjp.fsf@localhost> <875ygf9j6u.fsf@localhost> <85e80572-33c6-aff5-2654-4f8de5fa143c@gmail.com> <874jvx7shy.fsf@localhost> Date: Sat, 22 Oct 2022 05:15:18 +0000 Message-ID: <87fsfg30d5.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org 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=1666420197; 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=G+I1XT1thxK442n8zneNgGJBYozQF9f/mIHu3pTkpEg=; b=HwZk/GAcvTL58EP/AOChCc1+1TOEmBULXUzRu0gykp1habQ+QCGjfXU1CG6M7bkl5Kzzcj H7NzkZXDNPOc3RlacRZfrnOwtneh2UCwDgoIT/v4MLktFE87GR6I9ZJUUH10ruFurV8+HL Wd9RlKYoO336nt2/sRPG6IEHb8/mVEC1mZDKv5NgrbVMRI1NDtVbCFP758oOFaJSSqCMIc kPl3v1tGstmewOXt83goiSADPn7sTprtnOcjE6/DF1i3hM6lY8lxDG0nYBGr0Y4ABrxqYQ u/QmjBuKfFSs5fl7FMGD+Y8fXla6g0iwhHD/afvFPTbr4OFQngArJs+XxcnN4g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666420197; a=rsa-sha256; cv=none; b=nNLq+KjRmFsd4uWAEUCf8lyHkUCMJTO1wlxH+t4T6Wkf7OHqqCgkvimbLpfIQ9xHAkjcz3 9EGptqsy3uJBCWQmg8HnXskRcFDTqhbPFtq/hil3yY6uAODkmYqU1ZtMzDT2AoFY6fayjw euNsF47WsFWy+DmRJUQ7iJoQZ41YcG34y6qk1oyuvi+GpIcfQ4NkLOl7OyJE+b2RmsgnpT XwO45JwIMi16vU726QpZuhSvZEYrNOx26wIDbd9cMkXnwTgeqEvUCPRllx6z1tMimFVY9T MRPwSRXEJYaS6zn09bBj1MbCxoEZRhKAWK2BV57vZw4N75JKdFc5pjpWb/fQhw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=WriukJzk; 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: -6.94 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=WriukJzk; 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: 8E203B96D X-Spam-Score: -6.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: onk4i6mlrZMx Max Nikulin writes: > Concerning element vs. exported text, consider a derived backend that > ignores italics markers if a paragraph has some attribute. Usually > Paragraph \\ > \emph{[something]} > does not cause any problem, however if italics is ignored it is an error > Paragraph\\ > [something] > That is why namely exported code of adjacent leaf node should be > examined. Ideally there should be a possibility to add some attributes > or properties to distinguish raw export snippet. This is a valid example. > Unfortunately it requires complete redesign of org-export. Thinking about it more, we may actually do post-processing of the exported text. Unless I miss something, constructs like "\\[0pt]\n" can _always_ be replaced with "\\\n" as long as the next line does not match "^[ \t]*\\[". Even when such construct is deliberately placed by the user. There will be no difference in the generated pdf. Or, to be completely safe, we can introduce a defcustom that will control such clean-up (clean up by default). I propose the following: 1. Merge my patch with \\[0pt] safe page breaks 2. Modify org-latex-template to replace unnecessary occurrences of "\\[0pt]" in CONTENTS when org-latex-compact-latex (you may propose other defcustom names) is non-nil. WDYT? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at