<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div>[sorry, a bit complicated]<br><div><br></div><div>my bundle "R Console (Rdaemon)" ships with a grammar called "LaTeX Rdaemon" which works under TM 1.5 without problems but under TM 2.0 it fails partially.</div><div><br></div><div>It a bit complicated that's why a bit background information:</div><div>This grammar allows the users to write a normal LaTeX document with an interactive R Console running inside of the LaTeX document. [a kind of interactive Sweaving]</div><div><br></div><div>Here a minimal tex example:</div><div>-------</div><div>% Preamble (fold)<br><br>\documentclass[11pt]{article}  <br>\usepackage{blindtext}<br>\usepackage{verbatim}<br>\newenvironment{Rdaemon}{\comment}{\endcomment} % R code invisible<br><br>\begin{document}<br><br>\section{First section}<br><br>\blindtext<br><br>\begin{Rdaemon}<br>> runif(10,min=0,max=1) <br>\end{Rdaemon}<br><br>\section{Second Section}<br>\blindtext<br><br>\end{document}</div><div>-------<br><br></div><div>Everything between \begin{Rdaemon} and \end{Rdaemon} should controlled by the "R Console (Rdaemon)" bundle scope: 'source.rd.console' and its output will be syntax highlighted via 'source.r' which works under TM 2.0.</div><div><br></div><div>If I place the caret after "runif(10,min=0,max=1)" and press ENTER "runif(10,min=0,max=1)" will be sent to R und the result will be inserted like:</div><div><br></div><div>-------<br>...</div><div>\blindtext<br><br>\begin{Rdaemon}<br>> runif(10,min=0,max=1) <br> [1] 0.482648455 0.874794168 0.904718875 0.585969825 0.859514066 0.865195652 0.003995807 0.904800528<br> [9] 0.918498771 0.158369060<br>> <br>\end{Rdaemon}<br><br>\section{Second Section}</div><div>...<br>-------<br></div><div><br></div><div>Fine, but for some reasons in TM 2.0 the end tag "\end{Rdaemon}" isn't recognized. I looked into that and it seems to me that the grammar definition of 'source.rd.console.prompt' in "R Console (Rdaemon)" "eats" the entire rest of the tex document:</div><div><br></div><div>{<span class="Apple-tab-span" style="white-space:pre">      </span>name = 'source.rd.console.prompt';<br><span class="Apple-tab-span" style="white-space:pre">        </span>begin = '^[>+:] ';<br><span class="Apple-tab-span" style="white-space:pre">     </span>end = '\n\z';<br><span class="Apple-tab-span" style="white-space:pre">     </span>beginCaptures = { 0 = { name = 'keyword.other.embedded.rd.console'; }; };<br><span class="Apple-tab-span" style="white-space:pre"> </span>patterns = ( { include = 'source.r'; } );<br>},<br><br></div><div>[well at least it's my finding ;)]</div></div><div><br></div><div>Correct:</div><div><br></div><div><img id="a7225d61-2f3c-4433-b07e-17445f7f3a6d" height="221" width="507" apple-width="yes" apple-height="yes" src="cid:9CB25023-47A6-4960-B86D-79FEC4C8ED06"></div><div><br></div><div>but in TM 2.0 it looks like:</div><div><br></div><div><img id="45ff0a35-e117-4ccf-b7f8-a284cd313037" height="278" width="507" apple-width="yes" apple-height="yes" src="cid:C2744C05-15BA-491F-A4C5-CB7133E4490B"></div><div><br></div><div>Is anyone out there who can help me fixing it?</div><div><br></div><div>Thanks a lot,</div><div>Hans</div><div><br></div></body></html>