When I run your code , I dont see any problem to fix.
When I extend your code to add things that could possible break or be wrong; I still dont.
What does this result in for you ?
---
title: "Retail Strategy and Analytics "
author: "Ogai"
date: "2023-04-12"
output: pdf_document
pdf_document:
df_print: default
highlight: tango
keep_tex: yes
latex_engine: xelatex
header-includes: \usepackage{fvextra}\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,commandchars=\\\{\}}
---
```{r setup, include=FALSE}
# set options for R markdown knitting
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(linewidth=80)
```
```{r knitr line wrap setup, include=FALSE}
# set up line wrapping in MD knit output
library(knitr)
library(tidyverse)
hook_output = knit_hooks$get("output")
knit_hooks$set(output = function(x, options)
{
# this hook is used only when the linewidth option is not NULL
if (!is.null(n <- options$linewidth))
{
x = knitr:::split_lines(x)
# any lines wider than n should be wrapped
if (any(nchar(x) > n))
x = strwrap(x, width = n)
x = paste(x, collapse = "\n")
}
hook_output(x, options)
})
```
Some Plain Text
```{r, include=TRUE}
ggplot(data=iris,aes(x=Sepal.Length,y=Petal.Length,color=Species))+geom_point()
```
Some More Plain Text