我在Github上主持了一个Jekyll博客,并用Markdown写我的帖子。当我添加图片时,我通过以下方式添加图片:
![name of the image](http://link.com/image.jpg)
这将在文本中显示图像。
但是,我如何告诉Markdown添加一个显示在图像下方或上方的标题?
在用Markdown编写了一份相当长的文档,并使用潘多克将其转换为PDF之后,我发现,令我沮丧的是,许多图像都不合适,它们的备选文本都以标题的形式自豪地显示在它们下面。我的文件很有指导性,所以这种重排对它的可读性是有害的。
我最终找到了一种以内联方式显示图像的方法。不过,我仍然想用标准Markdown编写文档,因此我编写了一个Python脚本,将文档中的所有独立图像转换为这种内联形式。
pandoc_images.py:
import sys
# Convert standalone images in standard Markdown
# to inline images in Pand
在R Markdown中,我试图为图像添加标题,但它不显示。使用RStudio和“针织到超文本标记语言”代码和超文本标记语言截图如下。没有标题,即使它在括号中。 # First test
## SubHeader 1
kl;jdafkjjdsfajk;
![literally the most amazing apple ever](C:/Users/.../Stemilt-Cosmic-Crisp-Apple-2019.jpg) ? This similar question未应答,但看起来需要"fig.cap“。我尝试将{r fig.cap = "caption2
我在R中使用Pandoc将一个markdown文档转换为PDF文档。我试图将标题居中。
到目前为止,我已经尝试过了:
<center># This is my title</center>
和
-># This is my title<-
但这两种方法都没有奏效。有没有办法在使用Pandoc从markdown转换为PDF时将标题居中显示?
我正在尝试创建一个rmarkdown文档。我终于想出了一种方法来解决这个问题,尽管这需要相当长的时间。最后一件事,我希望能够做的是添加一个图像到我的pdf文件的标题页。
我遇到的麻烦是我的标题页是由YAML的顶部定义的。下面是我的example.Rmd文件的内容。我使用RStudio中的“编织PDF”按钮将其转换为PDF。
---
title: "This is a my document"
author: "Prepared by: Dan Wilson"
date: '`r paste("Date:",Sys.Date())`'
我有一个Rmarkdown文件(info.rmd),如下所示:
---
title: "Information"
theme: yeti
date: "4/1/2017"
output: html_document
---
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown
如何将我的Rmarkdown beamer演示文稿的标题页靠左对齐,而不是默认的居中?
例如,默认值为center:
---
title: "Untitled"
author: "S SS"
date: "2/4/2018"
output: beamer_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo =假)
## R Markdown
This is an R Markdown presentation. Markdown is a simple
我试图在Lua过滤器中在一个标记头周围添加一个div,但是标题前面的#消失在输出中。
Header = function(el)
if el.level == 1 then
local content = el.content
local pre = pandoc.RawBlock('markdown','::: test')
local post = pandoc.RawBlock('markdown',':::')
table.insert(content