From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Target and link text normalised to `orgtargetn' Date: Mon, 20 Apr 2015 17:35:57 +0200 Message-ID: <87fv7ubyn6.fsf@nicolasgoaziou.fr> References: <20150414092530.GC2957@chitra.no-ip.org> <20150414120852.GD2957@chitra.no-ip.org> <87zj699ez9.fsf@gmx.us> <20150416001830.GC14328@chitra.no-ip.org> <87egnk9ycz.fsf@gmx.us> <87k2x9cddu.fsf@nicolasgoaziou.fr> <20150419121305.GZ14328@chitra.no-ip.org> <87618smg2i.fsf@nicolasgoaziou.fr> <87d230rzak.fsf@gmx.us> <87vbgsdw2c.fsf@nicolasgoaziou.fr> <87pp70qi9w.fsf@gmx.us> <87oamkdu5v.fsf@nicolasgoaziou.fr> <87lhhoqbsc.fsf@gmx.us> <87fv7wdkz2.fsf@nicolasgoaziou.fr> <87383vqiuh.fsf@gmx.us> <87618rdv3w.fsf@nicolasgoaziou.fr> <87wq17p2x1.fsf@gmx.us> <87wq17ce98.fsf@nicolasgoaziou.fr> <87oamjce2q.fsf@gmx.us> <87sibvccnc.fsf@nicolasgoaziou.fr> <87618rc595.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkDiZ-00033t-Hd for emacs-orgmode@gnu.org; Mon, 20 Apr 2015 11:34:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkDiX-0006vU-Gf for emacs-orgmode@gnu.org; Mon, 20 Apr 2015 11:34:39 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:59823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkDiX-0006tC-9Q for emacs-orgmode@gnu.org; Mon, 20 Apr 2015 11:34:37 -0400 In-Reply-To: <87618rc595.fsf@gmx.us> (rasmus@gmx.us's message of "Mon, 20 Apr 2015 15:13:10 +0200") 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: > Can we have conditional dependence on texmathp? I guess it doesn't hurt. You need to declare it as an external function in order to silence byte-compiler, tho. > If so, maybe something like the attached, though the latex-environment > part is ugly. Another option is to simply extract environment from :value and decide if it is a math environment or not. This is what `texmathp' does (i.e., `texmathp-tex-commands-default') although the list is configurable (through `texmathp-tex-commands'). Nesting is not a problem here since you're only interested if the top-most environment. WDYT? > Results areq pretty ugly. E.g. for headline, table, figure, latex-math > env, latex-env: > > \ref{sec:orgheadline1}, \ref{tab:orgtable1}, \ref{fig:orgparagraph1}, > \ref{eq:orglatexenvironment1}, \ref{orglatexenvironment2} OK. > + (paragraph > + (when (org-element-property :caption datum) > + "fig:"))) Nitpick: (and (org-element-property ...) "fig:") Regards,