我试图在我的Rmarkdown文件中使用一些.css。因此,我使用以下文本创建了一个记事本文件:
#nextsteps {
color: blue;
}
.emphasized {
font-size: 1.2em;
}
并将其保存为styles.css
在此之后,我使用以下代码在同一文件夹中创建了一个.Rmd文件:
---
title: "test2"
output: html_document
theme: null
highlight: null
css: styles.css
---
## Next Steps {#nextsteps}
当我尝试编织时,我得到以下错误:
Error in yaml::yaml.load(enc2utf8(string), ...) :
Scanner error: mapping values are not allowed in this context at line 3, column 9
Calls: <Anonymous> ... yaml_load_utf8 -> mark_utf8 -> <Anonymous> -> .Call
Execution halted
对这里出了什么问题的想法?
答案 0 :(得分:1)
格式化与yaml有关。
public static void loadOpenCV_Lib() throws Exception {
// get the model
String model = System.getProperty("sun.arch.data.model");
// the path the .dll lib location
String libraryPath = "C:/opencv/build/java/x86/";
// check if system is 64 or 32
if(model.equals("64")) {
libraryPath = "C:/opencv/build/java/x64/";
}
// set the path
System.setProperty("java.library.path", libraryPath);
Field sysPath = ClassLoader.class.getDeclaredField("sys_paths");
sysPath.setAccessible(true);
sysPath.set(null, null);
// load the lib
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
}