From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: ox and links to equation Date: Sun, 15 Feb 2015 10:58:06 +0100 Message-ID: <87h9uno5sh.fsf@nicolasgoaziou.fr> References: <87zj8gaujl.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMvwp-0004MH-La for emacs-orgmode@gnu.org; Sun, 15 Feb 2015 04:57:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMvwh-000277-Ir for emacs-orgmode@gnu.org; Sun, 15 Feb 2015 04:57:07 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:56556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMvwh-000270-CQ for emacs-orgmode@gnu.org; Sun, 15 Feb 2015 04:56:59 -0500 In-Reply-To: <87zj8gaujl.fsf@gmx.us> (rasmus@gmx.us's message of "Sun, 15 Feb 2015 01:27:10 +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: Rasmus Cc: emacs-orgmode@gnu.org Rasmus writes: > I have two issues with linking to equations. > > Consider the following example: > > \begin{alinged} > \Label{eq:1} > \min f(x)\\ > \label{eq:2} > \st c(x)=3D0 > \end{aligned} > Insightful comments on [[eq:1]] and [[eq:2]] > > > * Issue 1 > > If org-link-search-must-match-exact-headline is nil the links will work in > the buffer. However, they will be discarded on export. Eq:1 I can refer > to if I give the latex-environment a #+NAME, but I can't refer to eq:2. I > think it should be possible to put in a link for eq:2. I don't know if it > should depend on org-link-search-must-match-exact-headline or not, > probably not. > > Any ideas how this could be solved and whether it's desirable solving? `org-link-search-must-match-exact-headline' is ignored during export. Since there are other ways to point to a particular location in a document, it is an acceptable limitation. For the problem at hand, you can use \label{eq:2} directly in the document. > * Issue 2 (ox-latex specific) > > Since we now have amsmath in the org-default-package-alist I would like to > \eqref{=C2=B7} to refer to equations. The main difference is that it tak= es > care of the parenthesis automatically. I.e. \ref{eq:2} =E2=86=92 2 and > \eqref(eq:2) =E2=86=92 (2). Also, mathtools works with \eqref, but not \= ref. > However, in old document it could lead to ((2)). > > I have a simple patch that hard-coded equation to \eqref, but I don't know > if a more general approach should be taken. Or if it a filter issue. I'm not sure \eqref is desirable as a default value, (but I don't oppose it if you think it is). OTOH, a filter is easy enough to implement. Regards,