Edit
As David rightly pointed out in the comment, I did not post what I intended. The desired output is a pull quote, that is a quote positioned on the right-hand or left-hand side of the page, wrapped by the main text, with the desired colored background declared by colorquote
.
——————————————————————————————————————————
I’ve just started to learn how new environments work, so please bear with me.
I have tried the following:
\documentclass[12pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{Archivo}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{sectsty}
\usepackage{xcolor}
\usepackage{tcolorbox}
%%%%This is the environment I’m trying to create%%%%
\definecolor{colorquote}{HTML}{e8e9f5}
\newtcolorbox{myquote}{colback=colorquote, colframe=colorquote}
\newenvironment{pullquote}[1]
\begin{wrapfigure}{#1}{0.4\textwidth}
\begin{myquote}
\end{myquote}
\end{wrapfigure}
\author{}
\title{Title}
\begin{document}
\maketitle
\section{This is some section title}
\lipsum[1]
\begin{pullquote}{R}
Here is a quotation
\end{pullquote}
\lipsum[3]
\end{document}
Even when I try on one line:
\newenvironment{pullquote}[1]{\begin{wrapfigure}{#1}{0.4\textwidth}\begin{myquote}\end{myquote}\end{wrapfigure}}
The new environment just won’t work, and I cannot figure out why. What is wrong with it?
Also, I need the variable, but I’m not sure that I’m using it correctly. The variable would be used to either put the quoted text on the right-hand side or the left-hand side.
tcolorbox
overrides the entire LaTeX document regarding environment declaration?tcolorbox
... it’s how I can create a background color for the quote..