缩进而不在RMarkdown中添加项目符号点或数字 [英] Indent without adding a bullet point or number in RMarkdown

查看:699
本文介绍了缩进而不在RMarkdown中添加项目符号点或数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作一个缩进列表,但是我不希望它有项目符号或数字.我在RStudio中使用Rmarkdown,并编织成html.

I want to make an indented list, but I don't want it to have bullet points or numbers. I am using Rmarkdown in RStudio, and knitting to html.

#### bla bla bla  

* Example indented line with bullet point  
    * Another indent with another bullet point  
* Yea this is good except for the stupid bullets!  

1. Example indented line with numbers  
    * sure and an indent with a bullet too  
2. But there's these stupid numbers now!  

  two spaces doesn't indent at all  
    or nest indent with 4  
  yea still no indent with 2.  

    four spaces ALSO doesn't indent  
      just makes some stupid code
    why do you hate indents rmd??

推荐答案

如果要更改列表的外观并输出为HTML,请使用CSS:

If you want to change how a list looks and you're outputting to HTML, use css:

---
title: "ListTest"
output: html_document
---

<style>
.nobullet li {
  list-style-type: none;
}
</style>

<div class="nobullet">
* This list
* Doesn't have bullets
</div>

* This list 
* Is normal

这不适用于其他输出格式.

This won't work for other output formats.

这篇关于缩进而不在RMarkdown中添加项目符号点或数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆