emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Target and link text normalised to `orgtargetn'


From: Nicolas Goaziou
Subject: Re: [O] Target and link text normalised to `orgtargetn'
Date: Fri, 24 Apr 2015 21:42:51 +0200

Rasmus <address@hidden> writes:

> Here's an updated patch.

Thank you. Some comments follow.

> +(defconst org-latex-math-environments-re
> +  (concat (regexp-opt
> +        '("equation" "eqnarray" "math" "displaymath"
> +          "align"  "gather" "multline" "flalign"  "alignat"
> +          "xalignat" "xxalignat"
> +          "subequations"
> +          ;; breqn
> +          "dmath" "dseries" "dgroup" "darray"
> +          ;; empheq
> +          "empheq")) "*?")

ITYM "\\*?", not "*?".

Moreover, I think it is better to check only first line, i.e.,

  (format "\\` *\\begin{%s}" (concat (regexp-opt ...) "\\*?"))

> +                         (save-match-data
> +                           (let ((string (org-element-property :value 
> datum)))
> +                             (string-match
> +                              (nth 1 (assoc "begin" org-latex-regexps))
> +                              string)
> +                             (and (org-string-match-p
> +                                   org-latex-math-environments-re
> +                                   (match-string 2 string))
> +                                  "eq:"))))

This is not needed. Choose an appropriate regexp for
`org-latex-math-environments-re' and forget about `org-latex-regexps'.


Regards,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]