问题描述
我在 R Markdown 的 rticles
包中使用“IEEE 交易”模板。我想要一个跨越整个页面宽度的 2 图像图形。但是,似乎无法从 R 代码块中做到这一点。出现各种错误,例如,当我尝试使用“行业标准”(AFAIK) 为 R Markdown 执行此操作时:
{r TestGraphic,echo=F,out.width='49%',fig.show='hold'}
knitr::include_graphics(c("Test1.jpg","Test2.jpg"))
将上述块插入到标准 IEEE 文章框架中而不进行额外修改,我收到以下错误:
! Undefined control sequence.
l.524 \includegraphics
[width=0.49\linewidth]{Test1}
\includegraphics[width=0.49\linewidth]{Test1}
\includegraphics[width=0.49\linewidth]{Test2}
这与模板描述多列数字的方式完全不同:
\begin{figure*}[!t]
\centering
\subfloat[Case I]{\includegraphics[width=2.5in]{Box}%
\label{fig_first_case}}
\hfil
\subfloat[Case II]{\includegraphics[width=2.5in]{Box}%
\label{fig_second_case}}
\caption{Simulation results for the network.}
\label{fig_sim}
\end{figure*}
所以问题:
- 如何让 R 块输出正确的 LaTex 以提供模板中所述的“使用两个子图的双列浮动图形”?
- 有没有办法从代码块中做到这一点,或者如果我想调整图像大小,我是否必须对 LaTeX 进行硬编码? 2.a.如果是后者,如果我想要一个带有多个子图的单个图,其中包括图像和 R 生成的图怎么办?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)