阻止带图像的类型(重要,警告......)

时间:2017-07-01 21:59:06

标签: r r-markdown bookdown

我想在左边有一个带图像的块。我开始在RStudio中使用该软件包,但即使我使用类型标记它也不起作用。

我认为软件包附带的样式不提供此功能。是对的吗?

1 个答案:

答案 0 :(得分:0)

尝试复制custom blocks

您可以使用谷歌浏览器打开页面按Ctrl + Shift + I

选择源并导航到style.css

您也可以在这里轻松下载相同的图片

的style.css

.rmdcaution, .rmdimportant, .rmdnote, .rmdtip, .rmdwarning {
  padding: 1em 1em 1em 4em;
  margin-bottom: 10px;
  background: #f5f5f5 5px center/3em no-repeat;
}
.rmdcaution {
  background-image: url("../images/caution.png");
}
.rmdimportant {
  background-image: url("../images/important.png");
}
.rmdnote {
  background-image: url("../images/note.png");
}
.rmdtip {
  background-image: url("../images/tip.png");
}
.rmdwarning {
  background-image: url("../images/warning.png");
}
p.caption {
  color: #777;
  margin-top: 10px;
}
p code {
  white-space: inherit;
}
pre {
  word-break: normal;
  word-wrap: normal;
}
pre code {
  white-space: inherit;
}
p.flushright {
  text-align: right;
}
blockquote > p:last-child {
  text-align: right;
}
blockquote > p:first-child {
  text-align: inherit;
}
.header-section-number {
  padding-right: .2em;
  font-weight: 500;
}
.level1 .header-section-number {
  display: inline-block;
  border-bottom: 3px solid;
}
.level1 h1 {
  border-bottom: 1px solid;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
}
h1.title {
  font-weight: 700;
}
.book .book-body .page-wrapper .page-inner section.normal strong {
  font-weight: 500;
}