Home > Net >  How can a whole list inside an .rmd File be displayed in italic?
How can a whole list inside an .rmd File be displayed in italic?

Time:11-22

In .rmd Files we can display text italic by wrapping it inside single *-signs. But how is it possible to put a whole list to italic?


I tried:

---
title: "Untitled"
output: pdf_document
date: '2022-11-21'
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## R Markdown

My list:

i) One;
i) Two;
i) Three.

---

*My italic list, first try:

i) One;
i) Two;
i) Three.*

---

*My italic list, second try:*

*i) One;
i) Two;
i) Three.*

---

*My italic list, third try:*

*i) One;*
*i) Two;*
*i) Three.*

---

*My italic list, fourth try:*

i) *One;*
i) *Two;*
i) *Three.*

This produces:

enter image description here

Version 4 is nearly what I need: The elements are italic, but the numbering isn't.


How can I produce a numbered list that is entirely italic?

P.S.: I render to .pdf. So LaTex is welcome..

CodePudding user response:

You could use \itshape

---
title: "Italic Block"
output: pdf_document
---

## Block

\begin{itemize}
 \itshape
\item [i)] One
\item [ii)] Two
\item [iii)] Three
\end{itemize}

enter image description here

CodePudding user response:

For html output we could use html tag <i> </i>

<i>
My list:

i)  One;
ii) Two;
iii) Three.

</i>

Gives: enter image description here

  • Related