Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Knitr - stop superscript in R Markdown

Tags:

format

r

knitr

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

enter image description here

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

like image 322
zx8754 Avatar asked Feb 14 '23 02:02

zx8754


1 Answers

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)^  

enter image description here

like image 163
gagolews Avatar answered Feb 16 '23 03:02

gagolews