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 aBsHNBX1ZWMrAAAAbAwnHQ (envelope-from ) for ; Sat, 05 Nov 2022 06:31:01 +0100 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 cDPnMxX1ZWP3GAEAauVa8A (envelope-from ) for ; Sat, 05 Nov 2022 06:31:01 +0100 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 8A1BEF744 for ; Sat, 5 Nov 2022 06:31:01 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orBke-00044a-OZ; Sat, 05 Nov 2022 01:29:52 -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 1orBkd-00044L-Dc for emacs-orgmode@gnu.org; Sat, 05 Nov 2022 01:29:51 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orBkb-0003av-DJ for emacs-orgmode@gnu.org; Sat, 05 Nov 2022 01:29:51 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0BD72240027 for ; Sat, 5 Nov 2022 06:29:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667626186; bh=2TOD1/qDBtqd12mUKDDofikJVqQgZMalqHEKkdVyPFo=; h=From:To:Cc:Subject:Date:From; b=kcnfYtugpM/wthomovu93LhYZaTX4AaxWrKp7MN77Wjnt6vxvAsuT9Vqty8VDC36B jFEpgKABM5viEC2qWm+fGsLHlgVS472DEhYyTaMQBbsJakVFBr9THn52ixV7bSHYzz L5fddRO/iDV7eHekhRhJUzajj1PQ1L5jZM2q3OlCr8aN8fK1ysm4aHZQuac5RBhLRp o4PjsbdlKXtKayZ/lK6IDy7cws++iYYCG3k6EL+fAyXR16/Zr/3CEvnFaVGq8CXLcD VVT+C3c7yGjIYGGWqVD7eVkvejosiailOHo6q1EFDzyWeWKkKd4WOitMtmlxmt2iYh WFzuuY76XVK2A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N45fF5r21z9rxH; Sat, 5 Nov 2022 06:29:41 +0100 (CET) From: Ihor Radchenko To: Max Nikulin , Daniel Fleischer Cc: emacs-orgmode@gnu.org Subject: Re: Line breaks and brackets in LaTeX export In-Reply-To: References: <875ygk6a8z.fsf@posteo.net> <878rlecx49.fsf@posteo.net> <87h701hhjp.fsf@localhost> <875ygf9j6u.fsf@localhost> <85e80572-33c6-aff5-2654-4f8de5fa143c@gmail.com> <874jvx7shy.fsf@localhost> <87fsfg30d5.fsf@localhost> <87mt9bigra.fsf@localhost> <87edullusk.fsf@localhost> <87bkppluoy.fsf@localhost> <875yfw8sy6.fsf@localhost> <87iljwgk0p.fsf@posteo.net> <871qqj5ow9.fsf@localhost> Date: Sat, 05 Nov 2022 05:30:17 +0000 Message-ID: <87iljuklxy.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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, 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=1667626261; 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=1kEG6GSzFS0YaGSaWzeCpnWWrXCsgaQCw1gb/hlrFcg=; b=qOdgi5zwU1QI1aDXWIRNsgt1Ks9ytlm/p5bBUSF5+8+Z8ZqJyRLoZc8aTfOyT0jQalNxPH pSSeBrZpL5qbjnF35U5n08bItNZiaVcH7AkJ/HYouGew5CM3h2N1pLDV+Vx/bwyz+7IZTb /g1MVMHWPhaKeZmvbHtvImI0n5EkeFDuxSGHvRr7ehlgosM+XrzwxePqiE07zeuuHSESc9 CWWwqMeBwhFiyAuF2vvOrVhHPQYNHCi6i0j7KMj95wzZ+o6Q4McRqC+EXeLIAw/hDIW8xh 8RLwvzcxcuipfNScHriOVARdD/ujk5lrqPnfnjKluXjR23dkkSgta5YupB9sUA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667626261; a=rsa-sha256; cv=none; b=EOKxVqT27Ync3JM/aNIm88jrRR4GKnMr4thY7rd+JLxIms52N+T6p219qltmkFEVb2cnPy NZrG496rmlAYTpso4HL/kdsGklvFC9n3/XbUPWPikoJTtzK6WgkdTNU/WiUdSp/1bQq1FA 4Ot1y7NKno4Y/q7os9NGyh7Kpnxv87zNsjef04MA9paDVuXWF3RhDUKCSOyuGsoJp8lLD0 TpNW43YsOfCqAuZT+kRaJJhdbcwPAtaSzUVBqyJKn5/9yLbbS9n6P0RUbsmm5PVOrctjwX AuN1MmBFYZIU6keGZK3wFZzCv/r32N7P1F24tSO8XynbbSXUaT4i8GXrRa6LAQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=kcnfYtug; 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: -2.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=kcnfYtug; 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: 8A1BEF744 X-Spam-Score: -2.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: riTrejY3emMY Max Nikulin writes: >>> I still believe that >>> >>> something\\[0pt]%__ORG_EXPORT__ >>> >>> is quite safe to remove (depending on the following character) and >>> unlikely harmful if remained for some reason. >> >> What about the side effect you mentioned in a previous email? >> >>> TeX reads >>> >>> "a% comment >>> b" >>> >>> as "ab", dropping newline and starting spaces. > > Unlike in Org, in TeX "a\\b" still contains a line break. Besides exotic > packages and user setups it should just work. After all, during normal > operation all "%__ORG_EXPORT__" should be stripped by a filter. They are > just marks where a decision is necessary whether to retain "[0pt]" or to > remove it. Thanks for the clarification. So, we can 1. Change org-latex-line-break-safe to "\\\\[0pt]%__ORG_EXPORT__", making it unique to distinguish Org-generated line breaks. 2. Establish a regexp criterion when it is safe to strip "[0pt]%__ORG_EXPORT__" from the page break (I am still unsure what will be the most reliable criteria here). If not safe, we just strip the "%__ORG_EXPORT__" part. 3. Write a filter that replaces the above from final output. Note: If we go __ORG_EXPORT__ way, it might be safe to leave the filter on by default as long as we can find a really robust criteria on when it is safe to drop [0pt] part. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at