Aloha Nicolas, Nicolas Goaziou <n.goaz...@gmail.com> writes:
> t...@tsdye.com (Thomas S. Dye) writes: > >> I think there might be a problem with the regular expression for >> captions on line 703 or org-e-latex.el. I have a dim understanding of >> regular expressions and the various parsers, but I suspect the problem >> is in this part: [^][]. >> >> At any rate, this input: >> #+CAPTION: [An example photograph]{An example photograph}. >> #+LABEL: fig:photo > > The regexp isn't the problem here. But this all means that I'm breaking > a golden rule: never parse something already parsed. > > Anyway, I have switched caption keyword to the dual keywords > category. That means is syntax is now like results keywords' which can > have an optional string (a hash in this case) before their main value. > > To put it simply, caption syntax can now be: > > #+caption: long name > #+caption[]: long name > #+caption[short name]: long name > > much like > > #+results[hash]: name > > Though, > > #+caption[something]: > > is equivalent to no caption since the main value is mandatory. This input: #+CAPTION[An example photograph]: An example photograph. #+NAME: fig:photo for me, yields: \caption{\label{fig:photo}An example photograph} I was expecting: \caption[An example photograph]{\label{fig:photo}An example photograph} > > As a side note, #+label has been deprecated in favor of #+name (though > the former is immediately translated into the latter at parse time). I agree it is a good idea to abstract this from the LaTeX backend. > > > Regards, All the best, Tom -- Thomas S. Dye http://www.tsdye.com