From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kLHzBmcH118cfQAA0tVLHw (envelope-from ) for ; Mon, 14 Dec 2020 06:34:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eDXNAmcH11+1SAAA1q6Kng (envelope-from ) for ; Mon, 14 Dec 2020 06:34:15 +0000 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 7D4149401BF for ; Mon, 14 Dec 2020 06:34:14 +0000 (UTC) Received: from localhost ([::1]:36084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kohQz-0001lH-Df for larch@yhetil.org; Mon, 14 Dec 2020 01:34:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kohQF-0001jE-VX for emacs-orgmode@gnu.org; Mon, 14 Dec 2020 01:33:27 -0500 Received: from lxc-smtp.ens-lyon.fr ([140.77.167.80]:53224) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kohQC-00078h-Tn for emacs-orgmode@gnu.org; Mon, 14 Dec 2020 01:33:27 -0500 Received: from localhost (localhost [127.0.0.1]) by lxc-smtp.ens-lyon.fr (Postfix) with ESMTP id A8E2B23A75; Mon, 14 Dec 2020 07:33:18 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.11.0 (20160426) (Debian) at ens-lyon.fr Received: from lxc-smtp.ens-lyon.fr ([127.0.0.1]) by localhost (lxc-smtp.ens-lyon.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EweDKEs517a2; Mon, 14 Dec 2020 07:33:18 +0100 (CET) Received: from Inspiron.Inspiron (lfbn-idf2-1-1313-107.w92-169.abo.wanadoo.fr [92.169.127.107]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by lxc-smtp.ens-lyon.fr (Postfix) with ESMTPSA id 8EF1123A73; Mon, 14 Dec 2020 07:33:18 +0100 (CET) From: Firmin Martin To: Eric S Fraga Subject: Re: Bug: LaTeX: inline maths expression in \textrm is not fully supported In-Reply-To: <87r1nuvw90.fsf@ucl.ac.uk> References: <87h7oq1oig.fsf@ens-lyon.fr> <87r1nuvw90.fsf@ucl.ac.uk> Date: Mon, 14 Dec 2020 07:33:16 +0100 Message-ID: <87eejs28yb.fsf@ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=140.77.167.80; envelope-from=firmin.martin@ens-lyon.fr; helo=lxc-smtp.ens-lyon.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.30 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 7D4149401BF X-Spam-Score: -2.30 X-Migadu-Scanner: scn1.migadu.com X-TUID: sg6t3L7YA32q > I think you may be expecting too much of org's simple inline LaTeX > parser. As soon as you have complex LaTeX, it's best to be explicit > about it being LaTeX, e.g.: > > 1. @@latex:$A = \{n : \textrm{$n$ odd in $X$}\}$@@ Thank you for the advice! This does work for LaTeX export, but if one would also want to export in HTML, the LaTeX expression is lost. I will stay with the "multiple \textrm" solution for now. Best, Firmin Eric S Fraga writes: > On Sunday, 13 Dec 2020 at 02:30, Firmin Martin wrote: >> Sometimes, we want to nest inline maths expression in \textrm to >> handle spaces easily and avoid repetition. >> >> Examples: >> >> 1. $A = \{n : \textrm{$n$ odd in $X$}\}$ > > I think you may be expecting too much of org's simple inline LaTeX > parser. As soon as you have complex LaTeX, it's best to be explicit > about it being LaTeX, e.g.: > > 1. @@latex:$A = \{n : \textrm{$n$ odd in $X$}\}$@@ > > HTH, > eric > > -- > : Eric S Fraga via Emacs 28.0.50, Org release_9.4-160-g7c8dce