【问题标题】:bullet lists not rendering in blogdown .rmd file项目符号列表未在 blogdown .rmd 文件中呈现
【发布时间】:2019-08-06 18:27:43
【问题描述】:

当我在 blogdown 中提供我的网站时,项目符号点不会呈现。我的网站在我的 Windows 10 机器上本地托管。当我添加 html 标签时,该列表实际上有效。当我在另一个项目中打开空白 rmd 文件时,项目符号点会正确呈现。

我在 blogdown .rmd 帖子中的列表代码示例:

* text
* text
* text

以及使用html标签的工作版本:

<ul>
  <li>text</li>
  <li>text</li>
  <li>text</li>
</ul>
>sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0       bookdown_0.9     digest_0.6.18    later_0.8.0      mime_0.6         R6_2.4.0         jsonlite_1.6     magrittr_1.5    
 [9] evaluate_0.13    blogdown_0.11    stringi_1.3.1    rstudioapi_0.9.0 promises_1.0.1   rmarkdown_1.11   tools_3.5.2      servr_0.13      
[17] stringr_1.4.0    httpuv_1.4.5.1   xfun_0.5         yaml_2.2.0       compiler_3.5.2   htmltools_0.3.6  knitr_1.22  

这是我在 Stack Overflow 上提出的第一个问题。我事先做了很多搜索,但如果我错过了答案,请指出正确的方向!

我还遇到了使用“添加图像”插件不起作用的问题。我不知道它们是否相关,但如果相关,可以发布额外的代码 sn-ps。

下面的更好的例子:

---
title: "Methodology and link to BidVis"
author: "Braden"
date: '2019-03-14'
output:
  html_document:
    df_print: paged
categories: []
slug: methodology-and-link-to-bidvis
tags: []
bibliography: []
---

简介

knitr::opts_chunk$set(echo = TRUE)
library(kableExtra)
  options(kableExtra.auto_format = FALSE)
library(tidyverse)
library(data.table)
library(dplyr)
library(rio)
  install_formats()
library(ggrepel)
library(janitor)
library(lubridate)
library(broom)
library(generics)
library(plotly)
library(DT)

In speaking with my classmates and from my own experience, I sought to use the data to answer the following questions:
* How can I predict closing cost for an upcoming class?
* What is the relationship between TCE scores and course closing cost?
* What are the most powerful indicators of a class having a high closing cost?
* Is the "bid point inflation" effect real?

<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>

【问题讨论】:

  • 你能告诉我们在实际代码中使用降价版本的尝试吗?其中许多问题涉及缩进和格式问题
  • 我已经完成了,如果我应该添加其他内容,请告诉我

标签: html r blogdown bullet


【解决方案1】:

在列表前添加一个空行:

In speaking with my classmates and from my own experience, I sought to use the data to answer the following questions:  

* How can I predict closing cost for an upcoming class?
* What is the relationship between TCE scores and course closing cost?
* What are the most powerful indicators of a class having a high closing cost?
* Is the "bid point inflation" effect real?

【讨论】:

  • 每行末尾的两个空格是否必要?在 Stack Overflow markdown 中,只需要前后的空行即可。
  • 根据我的经验,这取决于您用于呈现文档的工具。这两个空格可以指示一行的结尾,而一个空格可以让您在编辑器的下一行继续写该行。在我使用的 RStudio 版本中,这两个空格不是必需的,但有些环境需要显式行尾。
  • 列表前的空行是必须的,但两个空格不应该。
  • 我已从答案中删除了 2 个空格。谢谢@YihuiXie!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-04-13
  • 2021-08-05
  • 1970-01-01
  • 1970-01-01
  • 2021-08-30
  • 2023-03-23
相关资源
最近更新 更多