From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Links to LaTeX equations Date: Fri, 28 Jun 2019 10:19:11 -0400 Message-ID: References: <87ftntkgxd.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000002feb93058c62f714" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38685) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgrir-0005KM-K6 for emacs-orgmode@gnu.org; Fri, 28 Jun 2019 10:19:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgriq-0007bt-3q for emacs-orgmode@gnu.org; Fri, 28 Jun 2019 10:19:29 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:51510) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hgrip-0007aU-Ck for emacs-orgmode@gnu.org; Fri, 28 Jun 2019 10:19:28 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 207so9292636wma.1 for ; Fri, 28 Jun 2019 07:19:26 -0700 (PDT) In-Reply-To: <87ftntkgxd.fsf@ucl.ac.uk> 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" To: "Fraga, Eric" Cc: Emacs Org mode mailing list --0000000000002feb93058c62f714 Content-Type: text/plain; charset="UTF-8" Org-ref provides a ref link for exactly this purpose. It looks like ref:an-equation and if you click on it it jumps to the label. The link is red if the label doesn't exist and maroonish if it does. It exports in latex as \ref{an-equation}. It sounds like just what you need. You can get org-ref on melpa. On Fri, Jun 28, 2019 at 9:15 AM Fraga, Eric wrote: > Hello all, > > it's that time of year where I have to think about revamping my lecture > slides (having just finished one year, the next one starts...). I write > these in org and export to beamer obviously! > > I teach a technical subject. I therefore have quite a few equations in > my slides and I use LaTeX for these. I would like to be able to use org > fully with respect to links and targets. If I define a label in LaTeX > directly, \label{an-equation} for instance, I get no benefit from using > an org link to it, e.g. [[an-equation]] (by default, this leads to the > org exporter complaining about a missing target and if I tell org not to > complain I subsequently miss real errors). So I use inline LaTeX to > provide the link, as in \ref{an-equation}. But then I lose the ability > to jump to the target within org, something which is quite useful given > that I have many slides for the full module I teach. > > The only satisfactory solution I have found is to do something along > these lines: > > #+begin_src org > The equation is: > ,#+begin_equation > <> > y = x + 3 > ,#+end_equation > > (later) In equation [[an-equation]], we see nothing much. > #+end_src > > This works in that I can jump to the label by clicking on the link but I > lose the ability to edit the equation in LaTeX mode. > > Any pointers would be welcome. > > Thanks, > eric > > -- > Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-379-g1b74ae > -- John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu --0000000000002feb93058c62f714 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Org-ref provides a ref link for exactly this pu= rpose. It looks like ref:an-equation and if you click on it it jumps to the= label. The link is red if the label doesn't exist and maroonish if it = does. It exports in latex as \ref{an-equation}. It sounds like just what yo= u need.

You can ge= t org-ref on melpa.

On Fri, Jun 28, 2019 at 9:15 AM Fraga, Eric &= lt;e.fraga@ucl.ac.uk= > wrote:
Hello all,

it's that time of year where I have to think about revamping my lecture=
slides (having just finished one year, the next one starts...).=C2=A0 I wri= te
these in org and export to beamer obviously!

I teach a technical subject.=C2=A0 I therefore have quite a few equations i= n
my slides and I use LaTeX for these.=C2=A0 I would like to be able to use o= rg
fully with respect to links and targets.=C2=A0 If I define a label in LaTeX=
directly, \label{an-equation} for instance, I get no benefit from using
an org link to it, e.g. [[an-equation]] (by default, this leads to the
org exporter complaining about a missing target and if I tell org not to complain I subsequently miss real errors).=C2=A0 So I use inline LaTeX to provide the link, as in \ref{an-equation}.=C2=A0 But then I lose the abilit= y
to jump to the target within org, something which is quite useful given
that I have many slides for the full module I teach.

The only satisfactory solution I have found is to do something along
these lines:

#+begin_src org
=C2=A0 The equation is:
=C2=A0 ,#+begin_equation
=C2=A0 <<an-equation>>
=C2=A0 y =3D x + 3
=C2=A0 ,#+end_equation

=C2=A0 (later) In equation [[an-equation]], we see nothing much.
#+end_src

This works in that I can jump to the label by clicking on the link but I lose the ability to edit the equation in LaTeX mode.

Any pointers would be welcome.

Thanks,
eric

--
Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-379-g1b74ae
--
John

--------= ---------------------------
Professor John Kitchin=C2=A0
Doherty Hall= A207F
Department of Chemical Engineering
Carnegie Mellon University<= br>Pittsburgh, PA 15213
412-268-7803
--0000000000002feb93058c62f714--