我有一个Rmarkdown文件,其中包含以下CSS规则:
h1.title {
font-size: 20px;
font-weight: bold;
font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
color: #AF272F;
}
h1.author {
font-size: 16px;
font-weight: bold;
font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
color: #AF272F;
}
h1 { /* Header 1 */
font-size: 28px;
font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
color: #101820;
}
h2 { /* Header 2 */
font-size: 22px;
font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
color: #101820;
}
h3 { /* Header 3 */
font-size: 18px;
font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
color: #101820;
}
h4 { /* Header 4 */
font-size: 12px;
color: #101820;
}
code.r{ /* Code block */
font-size: 12px;
font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
}
pre { /* Code block - determines code spacing between lines */
font-size: 14px;
font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
}
body{ /* Normal */
font-size: 14px;
font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
}
td { /* Table */
font-size: 12px;
font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
}
</style>
后来,我试图包含一个嵌入了计算值的语句。但是,当我真的希望将其放入Trebuchet时,输出似乎仅在快递员Markdown的手中。
示例:
original <- nrow(df1)
step_1 <- nrow(df2)
step_1_diff <- original - step_1
statement_1 <- paste("Our record count went from ", original, " to ", step_1, ". (Difference: ",step_1_diff,")", sep="")
当我将statement_1放在代码块中并使用cat时,我很欣赏并没有[1]前导的statement_1,但是当我将其打印为HTML时,它仍然处于快递状态。有人可以分享我需要添加到CSS的内容,这样就不会发生吗?