From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id qDLyFNDQdmedGgEAe85BDQ:P1 (envelope-from ) for ; Thu, 02 Jan 2025 17:45:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id qDLyFNDQdmedGgEAe85BDQ (envelope-from ) for ; Thu, 02 Jan 2025 18:45:52 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=WHR4yAVN; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735839951; 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=55ZvmTIZbSxUckWIlJF5yrHnIuIHQIH932oAM5ywOR0=; b=f7af3wJpPgbTT5cz22H2mKSWANg8J/woYbet5rD54zEACgJ7XiTBt/fs2eQfnSv8gh1d3n 3JEXW6Lt+qW4TQoZnDxaCI0O/T2pk9jgCcjbaFRUq9Spzp5u4eoW5YgFDD20/KhNrmvL/Z afv21BkS0gHM8ZkRjxUvz9AClCjEyL1kt44n+Tdj4WR/SowU4S5zJMJKpwUhy/p0KazPhn Q07DWkBnNTgM5m/BPmv9rOSlc+QlebC5xhS+/COB8TeRdp3X1D/oABuVSfKpmEN9QoQob/ f5o6TrMEmxWCWPbwwDvplLQgy+toOMFWkMDEGJan6FqqUqzsZyjdqklnIEAPlA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=WHR4yAVN; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735839951; a=rsa-sha256; cv=none; b=oDjzmFX1m8TQ4R4iet8Q4iqwVcSUCvJplI11vOmUGfZDnbSg+vWn12fzLNNGQ6d13PGv99 Hs9zA7bVht+b7ZhZJP/lNKhGzXeqMjVWARAWtMP60Q/sv1j2cDjFXqDlkjv9isLgs+V+Q+ e6ho36XIZUKDLwsuvxRzGbTLiwKMlfr9DdTi5qmVTlHINbfqiP08IJScsyTMlkb3DAIdVx PCNdVK6frEIKO1ZxvAiWBAaMSyosF+WSZM/esWBvTsbQ/Rc438OQwfMa5sM4eUWGGyMyPZ ZZZQ+KlYPvuJZ0GVNtTS29zd0eA/83o5lian/ZpJ+7JBw4o03IxivzVxNJl3Mg== 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 CA3817D36D for ; Thu, 02 Jan 2025 18:45:51 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTPFs-0000d5-BK; Thu, 02 Jan 2025 12:45:08 -0500 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 1tTPFp-0000aq-V3 for emacs-orgmode@gnu.org; Thu, 02 Jan 2025 12:45:06 -0500 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 1tTPFm-0001JH-FB for emacs-orgmode@gnu.org; Thu, 02 Jan 2025 12:45:05 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id AAC40240027 for ; Thu, 2 Jan 2025 18:44:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1735839899; bh=liou660rHh3eLjPQ1AUUrC94uC7ytzIZsDTAMU5hgsU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=WHR4yAVNpUe7EBkL2DFB0BLEr+ljH1bg2PSlLr4cCKKH7PL4mORjyLGYhZkgBx5Tj wSC1bK22ZhDgFwUDSLk2SwgwE8o6D76Aco7DZFSHuikUdKPvihOKGWqmRdsfRG+xBe 6x2z5+mjlzjohtZ/S73dA5vTOeRPM3Id4gA/+GwHDgzZIAEEGl8s9y4ROCPHZ9fdiq aM1qM+Hm49FgnIa4iW8gJhIjjiEG36lsp5O7hnuqR+sQm++DgWnbHcajXQ0wZXTqSB UODQ5mPr6VLYwePO+kMwMet/HqJbY/GzEFMNjHkd83FYjcK2EY8cFaLV6trxKDfF+T phSDN7jbQUQeQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YPDcW0Skvz6tm4; Thu, 2 Jan 2025 18:44:58 +0100 (CET) From: Ihor Radchenko To: onf Cc: "G. Branden Robinson" , emacs-orgmode@gnu.org, groff@gnu.org, Ingo Schwarze Subject: [BUG] ox-man: Nested markup is broken (was: [BUG] "\fC" macro in ox-man.el [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.2/lisp/org/)]) In-Reply-To: References: <20241218172040.tyytdhbyl7annyli@illithid> <87ttav7mii.fsf@localhost> <20241231170034.nzmponxxjppqrhf5@illithid> <87bjwrhg6a.fsf@localhost> <87o70qg9gi.fsf@localhost> Date: Thu, 02 Jan 2025 17:47:18 +0000 Message-ID: <87seq1qfa1.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: -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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: CA3817D36D X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -2.39 X-Spam-Score: -2.39 X-TUID: z1MxVlK+bQTH "onf" writes: >> What about \fC\f[CR]Lorem\fP\fP? > > (1) if both C and CR exist, sets Lorem in Courier > (2) if only C or CR exists, sets font to Courier > (3) if neither exists, does nothing > > To understand #2, let's assume that C is defined and CR is not. Then: > \fC -> set font to C > \f[CR] -> ignored > \fP -> restore previous font, set previous font to C > \fP -> restore previous font (back to C) > > It's important to understand that troff commands don't really use > nesting or a stack as one might be used to from HTML and similar > markup languages. That's why it's also not possible to e.g. nest > bold and italic like this: > Normal \fBbold \fIbold-italic\fP bold\fP normal > > ...which actually gives you: > Normal bold italic bold italic Yikes! We currently implicitly rely on the assumption that things are working differently: normal *bold /italic/ bold* normal is exported as .TH "" "1" .PP normal \fBbold \fIitalic\fP bold\fP normal and the last "normal" is indeed rendered as italic. > One has to do one of these instead: > Normal \fBbold \f[BI]bold-italic\fP bold\fR normal > Normal \fBbold \f[BI]bold-italic\fB bold\fR normal > Normal \fBbold\fP \f[BI]bold-italic\fP \fBbold\fP normal I'm afraid that I'll need to rethink that export algo for ox-man to account for this nuance. Probably, the simplest way implementation-wise will be applying faces to each "plain text" segment individually: \fRnormal \fR\fBbold \fR\f[BI]italic\fR\fB bold\fR\fR normal\fR -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at