Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Joseph Vidal-Rosset
It works also for me. Many thanks! Jo. 2018-05-09 18:01 GMT+02:00 Thomas Shannon : > Works like a charm, auctex and all. Very nice! Thanks. > > Tom S. > > > On May 9, 2018, at 10:27 AM, Russell Adams > wrote: > > > > On Wed, May 09, 2018 at

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Thomas Shannon
Works like a charm, auctex and all. Very nice! Thanks. Tom S. > On May 9, 2018, at 10:27 AM, Russell Adams wrote: > > On Wed, May 09, 2018 at 09:22:35AM -0500, Thomas Shannon wrote: >> HI, Joseph. >> >> Its not the most elegant solution but if I’m doing extensive

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Eric S Fraga
On Wednesday, 9 May 2018 at 17:16, Joseph Vidal-Rosset wrote: > Thanks Eric and Tom. > > At the moment, I do not know what is the most convenient solution. > > this one: > > #+BEGIN_LaTeX latex > > #+END_LaTeX What version of org are you using? This is probably not what you want if you are

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Russell Adams
On Wed, May 09, 2018 at 09:22:35AM -0500, Thomas Shannon wrote: > HI, Joseph. > > Its not the most elegant solution but if I’m doing extensive latex editing I > usually just enter latex mode (esc-x latex-mode). This allows me to use > auctex as well. > > Of course, you have to switch back to

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Joseph Vidal-Rosset
Thanks Eric and Tom. At the moment, I do not know what is the most convenient solution. this one: #+BEGIN_LaTeX latex #+END_LaTeX when the latex export works prints the \LaTeX logo on the file. I've tried Tom's solution. With keybindings it seems to me that it is not a bad option. Best

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Eric S Fraga
On Wednesday, 9 May 2018 at 16:04, Joseph Vidal-Rosset wrote: [...] > and it seems that is the best option for me, but sometimes I meet error > with the export into the latex file. But the highlightings works. For snippets etc., not export blocks, you can also have org display those snippets

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Thomas Shannon
HI, Joseph. Its not the most elegant solution but if I’m doing extensive latex editing I usually just enter latex mode (esc-x latex-mode). This allows me to use auctex as well. Of course, you have to switch back to org-mode after editing. So its not a great solution if you are switching

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Joseph Vidal-Rosset
Yes, I have just tried this solution: https://emacs.stackexchange.com/questions/27866/syntax-highlighting-in-org-mode-begin-latex-block/27891 i.e. #+BEGIN_LaTeX latex #+END_LaTeX and it seems that is the best option for me, but sometimes I meet error with the export into the latex file. But

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Russell Adams
On Wed, May 09, 2018 at 01:31:51PM +0200, Joseph Vidal-Rosset wrote: > But nothing works for highlighting latex. Have you considered making a latex block, and editing it? It'll have full latex syntax highlighting while in the block.

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Joseph Vidal-Rosset
Thanks for your help. At the moment I have in my init.el (in fact my user.el because I am using scimax with -q -l options): (require 'ox-latex) (setq org-src-fontify-natively t) (setq org-highlight-latex-and-related '(latex)) (setq org-highlight-latex-and-related '(latex script entities)) But

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Eric S Fraga
On Wednesday, 9 May 2018 at 11:59, Nicolas Goaziou wrote: > Eric S Fraga writes: > >> Okay. But I have this variable set, to (latex), and it does >> nothing. The regex remains nil. Is there some other configuration >> setting that we have to set to get LaTeX snippets etc.

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Nicolas Goaziou
Eric S Fraga writes: > Okay. But I have this variable set, to (latex), and it does > nothing. The regex remains nil. Is there some other configuration > setting that we have to set to get LaTeX snippets etc. highlighted? You may need to reload Org mode in the current

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Eric S Fraga
On Wednesday, 9 May 2018 at 10:41, Nicolas Goaziou wrote: [...] > This is an internal variable. The OP should tweak > `org-highlight-latex-and-related' instead. Okay. But I have this variable set, to (latex), and it does nothing. The regex remains nil. Is there some other configuration

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Nicolas Goaziou
Hello, Eric S Fraga writes: > On Wednesday, 9 May 2018 at 10:17, Joseph Vidal-Rosset wrote: >> Hello, >> >> I would be happy to highlight latex code in org-mode, but nothing works. It >> is a pity because this lack of highlighting latex code in org-mode entails >> troubles

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Eric S Fraga
On Wednesday, 9 May 2018 at 10:17, Joseph Vidal-Rosset wrote: > Hello, > > I would be happy to highlight latex code in org-mode, but nothing works. It > is a pity because this lack of highlighting latex code in org-mode entails > troubles in exporting in latex and I have always to correct my

Re: [O] highlighting latex code in org-mode

2018-05-09 Thread Eric S Fraga
On Wednesday, 9 May 2018 at 10:17, Joseph Vidal-Rosset wrote: > Hello, > > I would be happy to highlight latex code in org-mode, but nothing works. It > is a pity because this lack of highlighting latex code in org-mode entails > troubles in exporting in latex and I have always to correct my