Re: [O] [patch, ox-latex] captions and latex-environments

2017-03-27 Thread Rasmus
Nicolas Goaziou writes: > I'm not sure to understand why would anyone need it. I haven't looked > hard enough, tho. Me neither. Perhaps someone would automatically generate code blocks for inclusion... In any case, no use case exists at the moment. Rasmus -- Got mashed potatoes. Ain't got n

Re: [O] [patch, ox-latex] captions and latex-environments

2017-03-27 Thread Nicolas Goaziou
Hello, Rasmus writes: > I pushed a simplified version that doesn't consider > org-latex-custom-lang-environments. Thank you. > If anyone ever needs that we can add > it. I'm not sure to understand why would anyone need it. I haven't looked hard enough, tho. Regards, -- Nicolas Goaziou

Re: [O] [patch, ox-latex] captions and latex-environments

2017-03-24 Thread Rasmus
Nicolas Goaziou writes: > Hello, > > Rasmus writes: > Another danger is that someone writes something like, \begin{center} \begin{table} ... >>> >>> You can start the regexp with "\\`[ \t]*..." >> >> The point is, that the env. will be center rather than tabl

Re: [O] [patch, ox-latex] captions and latex-environments

2017-03-23 Thread Nicolas Goaziou
Hello, Rasmus writes: >>> Another danger is that someone writes something like, >>> >>> \begin{center} >>> \begin{table} >>> ... >> >> You can start the regexp with "\\`[ \t]*..." > > The point is, that the env. will be center rather than table. So the code > would detect the wrong

Re: [O] [patch, ox-latex] captions and latex-environments

2017-03-20 Thread Rasmus
Hi, Nicolas Goaziou writes: >>> Since environments do not necessary start with \begin{...}, I think the >>> following is better >>> >>> (and (string-match ...) >>>(match-string ...)) >> >> Don't the element `latex-environment' always start \begin{.}? >> Cf. org-element--latex-begin-env

Re: [O] [patch, ox-latex] captions and latex-environments

2017-03-18 Thread Nicolas Goaziou
Hello, Rasmus writes: >> Since environments do not necessary start with \begin{...}, I think the >> following is better >> >> (and (string-match ...) >>(match-string ...)) > > Don't the element `latex-environment' always start \begin{.}? > Cf. org-element--latex-begin-environment. At

Re: [O] [patch, ox-latex] captions and latex-environments

2017-03-17 Thread Rasmus
Hi, Thanks for the feedback. Nicolas Goaziou writes: >> +(defun org-latex-environment--type (latex-environment) > > It should be `org-latex--environment-type'. Yes. > I'd rather avoid using `org-latex-regexps', which predates the parser. > A hard-coded regexp is better. OK. >> + (env (

Re: [O] [patch, ox-latex] captions and latex-environments

2017-03-17 Thread Nicolas Goaziou
Hello, Rasmus writes: > The patch looks a bit dodgy, maybe because I used magit, which I don’t > really understand, instead of the shell. I have attached it anew. Thank you. Some comments follow. > +(defun org-latex-environment--type (latex-environment) It should be `org-latex--environment-ty

Re: [O] [patch, ox-latex] captions and latex-environments

2017-03-16 Thread Rasmus
The patch looks a bit dodgy, maybe because I used magit, which I don’t really understand, instead of the shell. I have attached it anew. -- This message is brought to you by the department of redundant departments >From 4304552a0c8a72c6aeb2805a8cf703eddb5da123 Mon Sep 17 00:00:00 2001 From: Rasmu

[O] [patch, ox-latex] captions and latex-environments

2017-03-16 Thread Rasmus
Hi, I often generate tables directly from R. At the moment, I have to do something like the following because org-latex-latex-environment doesn’t support captions. #+name: tbl:1 #+caption: cap #+begin_table #+begin_center #+include: "tbl.tex" #+end_center #+end_table