【问题标题】:Difficulty knitting $$编织困难$$
【发布时间】:2021-11-28 00:41:47
【问题描述】:

我正在编写如下 RMD 代码:

$$

\text{We start with the following equation}\\
\mu=\lambda*\theta^E*PT\\


\text{The following represents a model for lambda within the context of our question}\\
\lambda=\lambda_0*\theta_1^M*\theta_2^{M_75}*\theta_3^{M_80}*\theta_4^{M_85}*\theta_5^{M2000}*\theta_6^{M2005}*PT\\


\log(\lambda)=log(\lambda_0)+log(\theta_1)*M+log(\theta_2)*M75+log(\theta_3)*M80+log(\theta_4)*M85+log(\theta_5)*M2000+log(\theta_6)*M2005+log(PT)\\


$$

在我的 R 工作室中,我得到了预期的输出:

.

但是,当我将文件编织成 HTML 时,我得到了一个意外的输出:

.

有人知道这里发生了什么吗?

【问题讨论】:

    标签: knitr


    【解决方案1】:

    你应该这样做:

    $\text{We start with the following equation}\\$
    $$\mu=\lambda*\theta^E*PT\\$$
    
    $\text{The following represents a model for lambda within the context of our question}\\$
    $$\lambda=\lambda_0*\theta_1^M*\theta_2^{M_75}*\theta_3^{M_80}*\theta_4^{M_85}*\theta_5^{M2000}*\theta_6^{M2005}*PT\\$$
    
    $\text{My big equation}\\$
    $$\log(\lambda)=log(\lambda_0)+log(\theta_1)*M+log(\theta_2)*M75+log(\theta_3)*M80+log(\theta_4)*M85+log(\theta_5)*M2000+log(\theta_6)*M2005+log(PT)\\$$
    

    $ - 内联公式,$$ - “居中”公式

    【讨论】:

    • 完美运行!干杯并感谢您的澄清
    • @Lior133 没问题,你可以接受我的回答;)
    猜你喜欢
    • 2016-12-24
    • 2018-10-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-14
    • 1970-01-01
    相关资源
    最近更新 更多