Hi, Currently I use VS-Code to write codes in R. While it is very good, it does not allow me to write Latex expressions in comments, which I am willing to have to write corresponding mathematical expressions as comments in my code files. Does there exist any Code editor for R, that allows me to write Latex in comments? Any information will be appreciated. Thanks,
Presumably there's nothing stopping you *writing* LaTeX in comments -- do you want a code editor that will render and display the LaTeX as you write? (Or am I misunderstanding something?) Does anyone do classic literate programming *sensu* Knuth any more? https://rpubs.com/bbolker/3153 https://cran.r-project.org/web/packages/noweb/vignettes/noweb.pdf On 2023-11-29 10:57 a.m., Christofer Bogaso wrote:> Hi, > > Currently I use VS-Code to write codes in R. While it is very good, it > does not allow me to write Latex expressions in comments, which I am > willing to have to write corresponding mathematical expressions as > comments in my code files. > > Does there exist any Code editor for R, that allows me to write Latex > in comments? > > Any information will be appreciated. > > Thanks, > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
I believe RMarkdown can use and render latex comments. RStudio/Posix provides ide extensions (e.g. R Notebooks) that seem to do what you want, but I have no experience with them. As Ben suggested, there are likely others, depending on exactly what you want to do. -- Bert On Wed, Nov 29, 2023 at 7:58?AM Christofer Bogaso <bogaso.christofer at gmail.com> wrote:> > Hi, > > Currently I use VS-Code to write codes in R. While it is very good, it > does not allow me to write Latex expressions in comments, which I am > willing to have to write corresponding mathematical expressions as > comments in my code files. > > Does there exist any Code editor for R, that allows me to write Latex > in comments? > > Any information will be appreciated. > > Thanks, > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
? Wed, 29 Nov 2023 21:27:37 +0530 Christofer Bogaso <bogaso.christofer at gmail.com> ?????:> Does there exist any Code editor for R, that allows me to write Latex > in comments?While I cannot guarantee that you'll like it, may I suggest GNU Emacs? Its R support is provided by the ESS package <https://ess.r-project.org/>, and there's the 'texfrag' package <https://emacs.stackexchange.com/a/33959> for rendering LaTeX math from the comments. In many ways, VS Code is the continuation of the Emacs idea of an infinitely configurable programmer's text editor [*], although you will immediately notice major differences in the design decisions taken by their respective developers. In particular, Emacs key-bindings predate not only the IBM CUA standard which inspired today's user interfaces, but many of the mailing list members themselves. -- Best regards, Ivan [*] https://en.wikipedia.org/wiki/Zawinski's_law#Zawinski's_Law
Sublime Text. On all platforms. On 29/11/2023 17:57, Christofer Bogaso wrote:> Hi, > > Currently I use VS-Code to write codes in R. While it is very good, it > does not allow me to write Latex expressions in comments, which I am > willing to have to write corresponding mathematical expressions as > comments in my code files. > > Does there exist any Code editor for R, that allows me to write Latex > in comments? > > Any information will be appreciated. > > Thanks, >