r软件包文档中的方程不起作用 [英] Equations in r package documentation do not work

查看:72
本文介绍了r软件包文档中的方程不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在包装说明中使用了roxygen2,并且我希望文档中包含数学方程式.例如,我想像公式一样写n_ {u}.当我在@details中写\ eqn {n_ {u}}时,什么都没有发生,但是文本是斜体.我用control,shift和d记录了程序包,然后按清理并重建". 我忘了什么吗?

I'm using roxygen2 for my package description and I want to have mathematic equations in my documentation. For example I want to write n_{u} like a formula. When I write \eqn{n_{u}} in @details nothing happens but the text is italic. I document the package with control, shift and d and then i push "Clean and rebuild". Did I forget anything?

推荐答案

这是预期的行为. R文档格式没有像从Mathjax或其他成熟的Latex引擎中获得的真实"方程式;它使用一种基本表示形式,该表示形式仅复制您的方程式文本,但将其设置为斜体.认为它更类似于代码,而不是数学符号.

This is expected behaviour. The R documentation format doesn't have "real" equations like you might get from Mathjax or another fully-fledged Latex engine; it uses a basic representation that just copies your equation text but sets it in italics. Think of it as more akin to code, rather than mathematical notation.

这篇关于r软件包文档中的方程不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆