From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0IejBIJnImGqWAAAgWs5BA (envelope-from ) for ; Sun, 22 Aug 2021 17:04:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cNJJAIJnImFGZwAAbx9fmQ (envelope-from ) for ; Sun, 22 Aug 2021 15:04:34 +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 74D301E5A9 for ; Sun, 22 Aug 2021 17:04:33 +0200 (CEST) Received: from localhost ([::1]:38822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHp1S-0000T2-Lf for larch@yhetil.org; Sun, 22 Aug 2021 11:04:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHp0u-0000Su-B7 for emacs-orgmode@gnu.org; Sun, 22 Aug 2021 11:03:56 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:43858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mHp0s-0006On-Kw for emacs-orgmode@gnu.org; Sun, 22 Aug 2021 11:03:56 -0400 Received: by mail-wr1-x433.google.com with SMTP id z9so22070947wrh.10 for ; Sun, 22 Aug 2021 08:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=O57SG3xHq+QRxgIKk+fPAxkgrMqe3ylPbHFEC1cYDIQ=; b=jCXvg6ekWWIA280fA3Zx0cv0q9qwt6LNXpGUUkeXhvUhIzQEa7NrFudQYn+mpBQZS6 BfsCAdNhwmfEa6dAdQpmyAzQSEyQKr9UZ72QLQ+Ko//GtsXW2sa7vmRgNXDKE/MgmBOH qka4EY7lu6x0saJZlLwVet+PL+nIc4TKvLG6Dr4iJyeoa6FTQ2w+X/3nZmeb5OZTUtvI kl9jPVQKsgAyZ9DUcpIss16K7j/4x2NnXX+fHklCSWHjtS8IwGZU28JP8b93B+vWiaV9 kZbr4G6zeBglYltDK1bov/O4o62pp3klU184wPTHtyL2FaSGugp+Ii4qapVwNqPRvgh3 imMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=O57SG3xHq+QRxgIKk+fPAxkgrMqe3ylPbHFEC1cYDIQ=; b=WVOqKkm7zB9/ShIsWQ7kH3pGL4pMlJXl/AfYhfj85mGoDKypODKkkgShrxasdXBuxk QiCgQ+O2RKPtKAZD6sNt3gKoY1dXJr75DJnsukeQnKA9fqV+55NQYTm0PIyN3XTa14fO id8SypvT/jThp74Ei3KN4LFfLpZIzvhyWhE8w6d4pobzkhp42yITefMEiVsTn3x4fYdf jycieP4/j+anv4448DDQXCsVVvJKO0aA0kLchWHzihjpVDESe1D8NVtpIqvp8g1RzEJj phdw7SMD+LF6/BlZAz8I6vRrEtentaT6NvGJqgwd7PrYfSEZ060sh5JlqehbXASRm/cR SMBg== X-Gm-Message-State: AOAM531vnWM+AbizGMGem3z8PsqznJe+0t2VKBwuucBT3z2+1dJ0jAzU p+1DR9bu4W/MUVJQ7eofYS6oq/+pq5IvcWbu X-Google-Smtp-Source: ABdhPJzCsVYEvD95FofYyxkmIQ6QRZVJ30zZi+sZv5sEsE8usizuALcLfbTBDewsruhKtcPXnJFgyQ== X-Received: by 2002:a5d:440d:: with SMTP id z13mr8155757wrq.216.1629644632218; Sun, 22 Aug 2021 08:03:52 -0700 (PDT) Received: from freegnu (ip-95-223-72-77.hsi16.unitymediagroup.de. [95.223.72.77]) by smtp.gmail.com with ESMTPSA id e10sm12065233wrt.82.2021.08.22.08.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Aug 2021 08:03:51 -0700 (PDT) From: Jeremie Juste To: Chlo De Subject: Re: Bug: unexpected behavior of nesting braces when exporting to LaTeX References: <611D10FC-6BAF-41C5-9E81-649D92C47225@gmail.com> <87eeamhrbb.fsf@gmail.com> <466664A7-58C7-4552-A2AF-FC2A8B01BFB4@gmail.com> Date: Sun, 22 Aug 2021 17:03:50 +0200 In-Reply-To: <466664A7-58C7-4552-A2AF-FC2A8B01BFB4@gmail.com> (Chlo De's message of "Sun, 22 Aug 2021 09:03:22 -0400") Message-ID: <878s0tikrt.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=jeremiejuste@gmail.com; helo=mail-wr1-x433.google.com 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org Mode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629644673; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=O57SG3xHq+QRxgIKk+fPAxkgrMqe3ylPbHFEC1cYDIQ=; b=Tm0AgVMJAB+tlwdm8rdOXGprByvAFX6JX0e0TzTtwlfYaZRwpDeoaAo5lIjvfyJ6NgHnpa bt0lt49F+mJDQcP3J4w3/LiXos0888a1EMQ6BRDiMFKVR374Eq0HG7pE/HYrUy+gLnGsXB CzgA/cdaZC50GpOlzokbqTzk74sypG4AfOLd8t7wTISSNCvHpiBabbDXkTHelzMgH0DJHu dsDeSXU/MiyWMJ5ihoPSgZPxRbxNg0BW4OnOtOAV54KUrXF1OUUn5pPiAKXBdMOc5FZ1Or XQqULCfdvQdGzj1Q42f4PVwYsmN3kRC8KwWRyiH4k4eFepF7FJehr4o/0BxKtg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629644673; a=rsa-sha256; cv=none; b=JI9vtjJ8Wa1azdRPqZcw9WRfOnlqry5Q2yy+W6wFvskHjB8zsqMX4nqhfoID4Vzdril0N6 9KHx/x36DfO3S8VySrvg6LlhygFP22MKwNCET5KAewNClaR8FuovKAVhA8HXH7Uqc8PgbG bJ6NzucjK6c8d6/07Hrh2TPNPnuAJ6Q2QtyO8BbVJYl6xjTdfqk1dGguZ0WrBYfcQvcq4S QWu1PlCHZRiRN2ypSZ22Lg0EbtTIASTqxgifOBRajIUw4U9mwhZfJb9iwq7gthkfZDrHxF 1bDOJIjkhYxJGV+7EU0qUSmXRR2vsvfeOalpODw1XqDhrN4dhVOOZy2oZMeO0g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=jCXvg6ek; dmarc=pass (policy=none) header.from=gmail.com; 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-Spam-Score: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=jCXvg6ek; dmarc=pass (policy=none) header.from=gmail.com; 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: 74D301E5A9 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: EbE2+sAl9y1U Hello Yue, Posting your mail below back to the list where you have a better chance of getting the right explanation. I totally understand that many times copy directly latex chunk is a nice feature org-mode offers. >From your example below, exporting the following script to latex would work ok in org-mode. #+BEGIN_SRC org #+options: toc:nil #+LATEX_HEADER: \usepackage{amsthm} #+LATEX_HEADER:\theoremstyle{theorem} #+LATEX_HEADER: \newtheorem{theorem}{Theorem}\usepackage{setspace} #+end_src * Theorem The longest word in this sentence is \emph{emphasized}. \begin{theorem} An emphasized a word looks \emph{distinguished}. \end{theorem} Yes, for my part I usually wrap into a source block, if I need native latex syntax #+BEGIN_SRC latex \emph{{n+1}-a} \textit{a{b}c} #+end_src I don't know if it is the case by design or if it is a bug. HTH, Jeremie On Sunday, 22 Aug 2021 at 09:03, Chlo De wrote: > Hello Jeremie, > > Thank you for your reply.=20 > > As both \emph and \textit are commonly used LaTeX commands, I would > expect everything inside the braces be interpreted in LaTeX way, i.e., > plain { } are for semantic use only and are omitted in the output. > > I appreciate that you mentioned native org-syntax. There are two reasons > that I prefer the LaTeX way.=20 > - I sometimes need to copy large chunk of tex contents from my other > notes or papers. It would be easier if I don=E2=80=99t need to convert th= em one > by one, as it is hard to spot such a thing in a long document. > - \emph is not exactly \textbf or \textit. With its default definition, > in text, \emph behaves like \textit. However, in an environment where the > text is italic by default, say, theorem, \emph will turn the text into > normal font. Here is a minimal example. > \documentclass{article} > \usepackage{amsthm} > \theoremstyle{theorem} > \newtheorem{theorem}{Theorem} > > \begin{document} > The longest word in this sentence is \emph{emphasized}. > \begin{theorem} > An emphasized a word looks \emph{distinguished}. > \end{theorem} > \end{document} > > The output is > > [cid]=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 > > Besides, this question seems related=20 > https://emacs.stackexchange.com/questions/52510/not-scape-braces-in-latex= -org-mode > > Best, > Yue > > On Aug 22, 2021, at 03:27, Jeremie Juste > wrote: > > Hello Yue, > > On Friday, 20 Aug 2021 at 00:45, Chlo De wrote: > > \emph{{n+1}-a} > \textit{a{b}c} > > will be translated as LaTeX expressions > > \emph\{\{n+1\}-a\} > \textit\{a\{b\}c\} > > I'm not sure it is a bug. Could you specify what do you expect in > these > cases? > > Note that there are native org-syntax for \emph and \textbf > > *n+1 - a* > /a{b}c/ > > (info "(org) Emphasis and Monospace") > > HTH, > -- > Jeremie Juste > --=20 Jeremie Juste