From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacob Gerlach Subject: Escape individual underscore? Date: Tue, 03 Mar 2015 20:08:30 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113535060d3498051067e6a5 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSt7J-0006yC-D7 for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 15:08:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSt7I-0006cr-6R for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 15:08:33 -0500 Received: from mail-qc0-x234.google.com ([2607:f8b0:400d:c01::234]:33884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSt7H-0006cO-Vt for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 15:08:32 -0500 Received: by qcwr17 with SMTP id r17so32461415qcw.1 for ; Tue, 03 Mar 2015 12:08:30 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode --001a113535060d3498051067e6a5 Content-Type: text/plain; charset=UTF-8 Hi List, I want to include a literal underscore in LaTeX export, like FOO_BAR. Right now I get: FOO$_{\text{BAR}}$ Contrary to this stackexchange question , if I try to escape the underscore with a backslash, I get: FOO$\backslash$$_{\text{BAR}} I've found that I can set org-export-with-sub-superscripts to "{}" to avoid this problem, but I'd rather escape individual underscores on a case by case basis. Is this possible? As an aside, section 11.7.2 of the org info says "Configure the variable `org-use-sub-superscripts' to change this convention." Fortunately the docstring for org-use-sub-superscripts points out that display and export functionality are now controlled by separate variables. I would propose a patch to update the info to clarify that two variables are used, but I'm not currently set up to do so. Regards, Jake --001a113535060d3498051067e6a5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi List,

I want to include a literal un= derscore in LaTeX export, like FOO_BAR. Right now I get:
FOO$_{\t= ext{BAR}}$

Contrary to this stackexchange question, if I try to e= scape the underscore with a backslash, I get:
FOO$\backslash$$_{\= text{BAR}}

I've found that I can set=C2=A0org-ex= port-with-sub-superscripts to "{}" to avoid this problem, but I&#= 39;d rather escape individual underscores on a case by case basis. Is this = possible?

As an aside, section 11.7.2 of the = org info says "Configure the variable `org-use-sub-superscripts' t= o
change this convention." Fortunately the docstring for org= -use-sub-superscripts points out that display and export functionality are = now controlled by separate variables. I would propose a patch to update the= info to clarify that two variables are used, but I'm not currently set= up to do so.

Regards,
Jake<= /div>
--001a113535060d3498051067e6a5-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Escape individual underscore? Date: Tue, 03 Mar 2015 15:53:34 -0500 Message-ID: <87lhjddcq9.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YStp9-00024R-Bg for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 15:53:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YStp6-0003b8-33 for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 15:53:51 -0500 Received: from plane.gmane.org ([80.91.229.3]:60549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YStp5-0003ax-SG for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 15:53:48 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YStp0-0007kr-Ac for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 21:53:42 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Mar 2015 21:53:42 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Mar 2015 21:53:42 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Jacob Gerlach writes: > Hi List, > > I want to include a literal underscore in LaTeX export, like FOO_BAR. Right now I get: > FOO$_{\text{BAR}}$ > > Contrary to this stackexchange question, if I try to escape the underscore with a backslash, I get: > FOO$\backslash$$_{\text{BAR}} > > I've found that I can setĀ org-export-with-sub-superscripts to "{}" to avoid this problem, but I'd rather escape individual > underscores on a case by case basis. Is this possible? > I don't think so. FWIW, I always set #+OPTIONS: ^:{} in my files. That allows me to use a_b for the majority of my use cases, but still allows {subscripts} in the rare cases when I need them. I'm not sure how useful it would be but maybe there should be a setting to accommodate the inverse case: mostly subscripts a_b but allow literal underscores using some additional markup. Nick From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Escape individual underscore? Date: Tue, 03 Mar 2015 22:02:23 +0100 Message-ID: <87mw3taj6o.fsf@nicolasgoaziou.fr> References: <87lhjddcq9.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YStwo-0000ga-OF for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 16:01:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YStwl-0006FA-Ea for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 16:01:46 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:40809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YStwl-0006Ec-92 for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 16:01:43 -0500 In-Reply-To: <87lhjddcq9.fsf@alphaville.usersys.redhat.com> (Nick Dokos's message of "Tue, 03 Mar 2015 15:53:34 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nick Dokos Cc: emacs-orgmode@gnu.org Hello, Nick Dokos writes: > I'm not sure how useful it would be but maybe there should be a setting > to accommodate the inverse case: mostly subscripts a_b but allow literal > underscores using some additional markup. You can use \under entity, e.g., a\under{}b Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastien Vauban Subject: Re: Escape individual underscore? Date: Wed, 04 Mar 2015 10:27:19 +0100 Message-ID: <86fv9lxgco.fsf@example.com> References: <87lhjddcq9.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Nick, Nick Dokos wrote: > FWIW, I always set > > #+OPTIONS: ^:{} > > in my files. You could set the following, then: --8<---------------cut here---------------start------------->8--- ;; Interpret "_" and "^" for export when braces are used. (setq org-export-with-sub-superscripts '{}) --8<---------------cut here---------------end--------------->8--- Best regards, Seb -- Sebastien Vauban