【发布时间】:2021-04-06 12:12:08
【问题描述】:
我需要使用从 Latex 到 R 内联代码块的变量(即自定义命令的参数)。例如,请参阅:
\newcommand{\textvar}[1]{
\textbf{
\Sexpr{
# Here, I would like to use the one argument of my \textvar command to do somthing in R
}
}
}
当然,我不能像在纯 Tex 中那样只添加 #1,它只会在 R 中注释该行。
【问题讨论】: