emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Firmin Martin <firmin.martin@ens-lyon.fr>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: LaTeX: inline maths expression in \textrm is not fully supported
Date: Mon, 14 Dec 2020 07:33:16 +0100	[thread overview]
Message-ID: <87eejs28yb.fsf@ens-lyon.fr> (raw)
In-Reply-To: <87r1nuvw90.fsf@ucl.ac.uk>

> 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 <e.fraga@ucl.ac.uk> 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


      reply	other threads:[~2020-12-14  6:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-13  1:30 Bug: LaTeX: inline maths expression in \textrm is not fully supported Firmin Martin
2020-12-13 10:24 ` Eric S Fraga
2020-12-14  6:33   ` Firmin Martin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eejs28yb.fsf@ens-lyon.fr \
    --to=firmin.martin@ens-lyon.fr \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).