From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: ox and links to equation Date: Sun, 15 Feb 2015 12:30:18 +0100 Message-ID: <87d25b76ph.fsf@gmx.us> References: <87zj8gaujl.fsf@gmx.us> <87h9uno5sh.fsf@nicolasgoaziou.fr> 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]:38694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMxPA-0002Ep-N9 for emacs-orgmode@gnu.org; Sun, 15 Feb 2015 06:30:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMxP5-0004Fm-Jy for emacs-orgmode@gnu.org; Sun, 15 Feb 2015 06:30:28 -0500 Received: from mout.gmx.net ([212.227.15.19]:62441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMxP5-0004FU-9T for emacs-orgmode@gnu.org; Sun, 15 Feb 2015 06:30:23 -0500 Received: from W530 ([46.166.186.232]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LqQnR-1XsJUD3oSP-00e4W7 for ; Sun, 15 Feb 2015 12:30:21 +0100 In-Reply-To: <87h9uno5sh.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sun, 15 Feb 2015 10:58:06 +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 Nicolas Goaziou writes: > For the problem at hand, you can use \label{eq:2} directly in the > document. Less pretty and I can't click on it. [For me a custom link type is fine, but every line of customization makes it harder to reproduce down the road]. Anyway, I found out that mathjax upstream now support labeling to equations using the latex format. Try: In equation \eqref{eq:sample}, we find the value of an interesting integral: \begin{equation} \int_0^\infty \frac{x^3}{e^x-1}\,dx =3D \frac{\pi^4}{15} \label{eq:sample} \end{equation} #+OPTIONS: html-scripts:nil #+HTML_HEAD: #+HTML_HEAD: >> * 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 ta= kes >> 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)). b>> >> I have a simple patch that hard-coded equation to \eqref, but I don't kn= ow >> 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. I definitely think it is the more proper way to refer to an equation. But it really depends on the document. E.g. mathtools also offer a set of commands for referring to equations. I was considering an alist of (DESTINATION-TYPE REF-CMD-WITH-DESCRIPTION REF-CMD-WITHOUT-DESCRIPTION) But it might be an overkill, especially seeing that mathjax only supports \ref and \eqref out of the box. =E2=80=94Rasmus --=20 Summon the Mothership!