Knitr - 在R Markdown停止上标 [英] Knitr - stop superscript in R Markdown

查看:348
本文介绍了Knitr - 在R Markdown停止上标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在逗号前停止上标 - 或句号 - 。将 Rmd 文件转换为HTML时,knitr也会以逗号为上标。例如:

example.Rmd
$ b

  MyTitle 
===================================== ===================
J.Smith ^ 1,K.John ^ 2,H.Gone ^ *。

example.html





让我知道如果这是之前问,我找不到相关的问题。

解决方案

您可以将HTML标记直接插入到Markdown文档。要切换上标模式,请使用 sup $ b

  MyTitle 
======================================== ================

J.Smith< sup> 1 / sup,K.John 2 / H.,走<坐席> * LT; / SUP取代。

编辑:您也可以使用圆括号表示要重新格式化文本的部分。

  J.Smith ^(1),K.John ^(2),H.Gone ^(*)

编辑 Markdown V2

  2 ^ 10 
2 ^(10)
2 ^ 10 ^
2 ^(10)^


I need to stop superscript before comma - , or full stop - .. When converting the Rmd file to HTML knitr makes comma superscripted as well. Example:

example.Rmd

MyTitle
========================================================
J.Smith^1, K.John^2, H.Gone^*.

example.html

Let me know if this was asked before, I can't find relevant questions.

解决方案

You may insert HTML tags directly to Markdown documents. To toggle the "superscripting" mode, use sup.

MyTitle
========================================================

J.Smith<sup>1</sup>, K.John<sup>2</sup>, H.Gone<sup>*</sup>.

EDIT: You may also use round brackets to indicate exactly the part of text to be reformatted.

J.Smith^(1), K.John^(2), H.Gone^(*)

EDIT: This has changed for Markdown V2

2^10  
2^(10)  
2^10^  
2^(10)^  

这篇关于Knitr - 在R Markdown停止上标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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